Modifying peptides with options ‘ntermX’ and ‘ctermY’

Issue #20 resolved
Vasyka
created an issue

I want to make modifications with the first residue in the peptide. As I understand from documentation, I can do it using function parser.isoforms(sequence, **kwargs) and setting ‘ntermX’ value in the argument variable mods . But when I run this code:

set(parser.isoforms("PEPTIDE", variable_mods={'[p]': 'ntermX'}))

I get only 'PEPTIDE' in set. So, why it is not working?

Comments (4)

  1. Lev Levitsky repo owner

    Hi,

    the way it's supposed to work is like this:

    In [1]: from pyteomics import parser
    
    In [2]: set(parser.isoforms("PEPTIDE", variable_mods={'p': ['ntermP']}))
    Out[2]: {'PEPTIDE', 'pPEPTIDE'}
    

    ntermX is an example which means, you can set a modification on "P" or on "ntermP", etc.

    Alternatively, you can set an N-terminal modification:

    In [3]: set(parser.isoforms("PEPTIDE", variable_mods={'p-': ['P']}))
    Out[3]: {'PEPTIDE', 'p-PEPTIDE'}
    
    In [4]: set(parser.isoforms("PEPTIDE", variable_mods={'p-': True}))
    Out[4]: {'PEPTIDE', 'p-PEPTIDE'}
    
  2. Log in to comment