How to use the protmapper.ProtMapper function in protmapper

To help you get started, we’ve selected a few protmapper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sorgerlab / indra / indra / sources / hprd / processor.py View on Github external
def _get_seq_motif(self, refseq_id, residue, pos_str):
        seq = self.seq_dict[refseq_id]
        pos_1ix = int(pos_str)
        pos_0ix = pos_1ix - 1
        if seq[pos_0ix] != residue:
            self.invalid_site_pos.append((refseq_id, residue, pos_str))
            if seq[pos_0ix + 1] == residue:
                self.off_by_one.append((refseq_id, residue, pos_str))
                motif, respos = \
                   ProtMapper.motif_from_position_seq(seq, pos_1ix + 1,
                                                      self.motif_window)
                return {'site_motif': {'motif': motif, 'respos': respos,
                                       'off_by_one': True}}
            else:
                return {}
        else:
            # The index of the residue at the start of the window
            motif, respos = ProtMapper.motif_from_position_seq(seq, pos_1ix,
                                                             self.motif_window)
            return {'site_motif': {'motif': motif, 'respos': respos,
                                   'off_by_one': False}}
github sorgerlab / indra / indra / sources / hprd / processor.py View on Github external
pos_1ix = int(pos_str)
        pos_0ix = pos_1ix - 1
        if seq[pos_0ix] != residue:
            self.invalid_site_pos.append((refseq_id, residue, pos_str))
            if seq[pos_0ix + 1] == residue:
                self.off_by_one.append((refseq_id, residue, pos_str))
                motif, respos = \
                   ProtMapper.motif_from_position_seq(seq, pos_1ix + 1,
                                                      self.motif_window)
                return {'site_motif': {'motif': motif, 'respos': respos,
                                       'off_by_one': True}}
            else:
                return {}
        else:
            # The index of the residue at the start of the window
            motif, respos = ProtMapper.motif_from_position_seq(seq, pos_1ix,
                                                             self.motif_window)
            return {'site_motif': {'motif': motif, 'respos': respos,
                                   'off_by_one': False}}

protmapper

Map protein sites to human reference sequence.

BSD-2-Clause
Latest version published 11 months ago

Package Health Score

48 / 100
Full package analysis

Similar packages