Example #1
0
 def map_peptide(target_up_id, peptide, pos):
     seq = uniprot_client.get_sequence(target_up_id)
     peptide_start = seq.find(peptide)
     # Peptide not found in sequence, return None
     if peptide_start == -1:
         return None
     target_pos = peptide_start + pos
     return target_pos
Example #2
0
def test_get_sequence():
    seq = uniprot_client.get_sequence('P00533')
    assert len(seq) > 1000
Example #3
0
 def motif_from_position(up_id, pos, window=7):
     seq = uniprot_client.get_sequence(up_id)
     return ProtMapper.motif_from_position_seq(seq, pos, window)