ModificationDefinitionsSet#
- class pyopenms.ModificationDefinitionsSet#
Bases:
object
Cython implementation of _ModificationDefinitionsSet
Original C++ documentation is available here
Representation of a set of modification definitions
This class enhances the modification definitions as defined in the class ModificationDefinition into a set of definitions. This is also e.g. used as input parameters in search engines.
- __init__()#
Overload:
- __init__(self) None
Overload:
- __init__(self, in_0: ModificationDefinitionsSet) None
Overload:
- __init__(self, fixed_modifications: List[bytes], variable_modifications: List[bytes]) None
Methods
Overload:
addModification
(self, mod_def)Adds a modification definition to the set
Returns only the names of the fixed modifications
getFixedModifications
(self)Returns the stored fixed modification definitions
getMaxModifications
(self)Return the maximal number of modifications allowed per peptide
Overload:
getModifications
(self)Returns the stored modification definitions
Returns the number of fixed modifications stored in this set
getNumberOfModifications
(self)Returns the number of modifications stored in this set
Returns the number of variable modifications stored in this set
Returns only the names of the variable modifications
getVariableModifications
(self)Returns the stored variable modification definitions
inferFromPeptides
(self, peptides)Infers the sets of defined modifications from the modifications present on peptide identifications
isCompatible
(self, peptide)Returns true if the peptide is compatible with the definitions, e.g.
setMaxModifications
(self, max_mod)Sets the maximal number of modifications allowed per peptide
Overload:
- addModification(self, mod_def: ModificationDefinition) None #
Adds a modification definition to the set
- getFixedModificationNames(self) Set[bytes] #
Returns only the names of the fixed modifications
- getFixedModifications(self) Set[ModificationDefinition] #
Returns the stored fixed modification definitions
- getMaxModifications(self) int #
Return the maximal number of modifications allowed per peptide
- getModificationNames()#
Overload:
- getModificationNames(self, fixed_modifications: List[bytes], variable_modifications: List[bytes]) None
Populates the output lists with the modification names (use e.g. for
Overload:
- getModificationNames(self) Set[bytes]
Returns only the names of the modifications stored in the set
- getModifications(self) Set[ModificationDefinition] #
Returns the stored modification definitions
- getNumberOfFixedModifications(self) int #
Returns the number of fixed modifications stored in this set
- getNumberOfModifications(self) int #
Returns the number of modifications stored in this set
- getNumberOfVariableModifications(self) int #
Returns the number of variable modifications stored in this set
- getVariableModificationNames(self) Set[bytes] #
Returns only the names of the variable modifications
- getVariableModifications(self) Set[ModificationDefinition] #
Returns the stored variable modification definitions
- inferFromPeptides(self, peptides: List[PeptideIdentification]) None #
Infers the sets of defined modifications from the modifications present on peptide identifications
- isCompatible(self, peptide: AASequence) bool #
Returns true if the peptide is compatible with the definitions, e.g. does not contain other modifications
- setMaxModifications(self, max_mod: int) None #
Sets the maximal number of modifications allowed per peptide
- setModifications()#
Overload:
- setModifications(self, mod_defs: Set[ModificationDefinition]) None
Sets the modification definitions
Overload:
- setModifications(self, fixed_modifications: bytes | str | String, variable_modifications: String) None
Set the modification definitions from a string
The strings should contain a comma separated list of modifications. The names can be PSI-MOD identifier or any other unique name supported by PSI-MOD. TermSpec definitions and other specific definitions are given by the modifications themselves.
Overload:
- setModifications(self, fixed_modifications: List[bytes], variable_modifications: List[bytes]) None
Same as above, but using StringList instead of comma separated strings