ModificationDefinitionsSet#

class pyopenms.ModificationDefinitionsSet#

Bases: object

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__() → None#
__init__(arg: pyopenms.ModificationDefinitionsSet, /) → None
__init__(arg0: list[str], arg1: list[str], /) → None

Methods

__init__()

addModification(mod_def)

Adds a modification definition to the set

getFixedAndVariableModificationNames()

Returns a tuple of (fixed_modification_names, variable_modification_names)

getFixedModificationNames()

Returns only the names of the fixed modifications

getFixedModifications()

Returns the stored fixed modification definitions

getMaxModifications()

Return the maximal number of modifications allowed per peptide

getModificationNames()

Returns only the names of the modifications stored in the set

getModifications()

Returns the stored modification definitions

getNumberOfFixedModifications()

Returns the number of fixed modifications stored in this set

getNumberOfModifications()

Returns the number of modifications stored in this set

getNumberOfVariableModifications()

Returns the number of variable modifications stored in this set

getVariableModificationNames()

Returns only the names of the variable modifications

getVariableModifications()

Returns the stored variable modification definitions

inferFromPeptides(peptides)

Infers the sets of defined modifications from the modifications present on peptide identifications

isCompatible(peptide)

Returns true if the peptide is compatible with the definitions, e.g. does not contain other modifications.

setMaxModifications(max_mod)

Sets the maximal number of modifications allowed per peptide

setModifications(mod_defs)

Overloaded function.

addModification(mod_def: pyopenms.ModificationDefinition) → None#

Adds a modification definition to the set

getFixedAndVariableModificationNames() → tuple#

Returns a tuple of (fixed_modification_names, variable_modification_names)

getFixedModificationNames() → set[str]#

Returns only the names of the fixed modifications

getFixedModifications() → set[pyopenms.ModificationDefinition]#

Returns the stored fixed modification definitions

getMaxModifications() → int#

Return the maximal number of modifications allowed per peptide

getModificationNames() → set[str]#

Returns only the names of the modifications stored in the set

getModifications() → set[pyopenms.ModificationDefinition]#

Returns the stored modification definitions

getNumberOfFixedModifications() → int#

Returns the number of fixed modifications stored in this set

getNumberOfModifications() → int#

Returns the number of modifications stored in this set

getNumberOfVariableModifications() → int#

Returns the number of variable modifications stored in this set

getVariableModificationNames() → set[str]#

Returns only the names of the variable modifications

getVariableModifications() → set[pyopenms.ModificationDefinition]#

Returns the stored variable modification definitions

inferFromPeptides(peptides: pyopenms.PeptideIdentificationList) → None#

Infers the sets of defined modifications from the modifications present on peptide identifications

isCompatible(peptide: pyopenms.AASequence) → bool#

Returns true if the peptide is compatible with the definitions, e.g. does not contain other modifications

setMaxModifications(max_mod: int) → None#

Sets the maximal number of modifications allowed per peptide

setModifications(mod_defs: collections.abc.Set[pyopenms.ModificationDefinition]) → None#
setModifications(fixed_modifications: str, variable_modifications: str) → None
setModifications(fixed_modifications: list[str], variable_modifications: list[str]) → None

Overloaded function.

  1. setModifications(mod_defs: collections.abc.Set[pyopenms.ModificationDefinition]) -> None

Sets the modification definitions

  1. setModifications(fixed_modifications: str, variable_modifications: str) -> 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.

  1. setModifications(fixed_modifications: list[str], variable_modifications: list[str]) -> 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.