ModificationsDB

class pyopenms.ModificationsDB

Bases: object

Cython implementation of _ModificationsDB

Documentation is available at http://www.openms.de/current_doxygen/html/classOpenMS_1_1ModificationsDB.html

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

addModification

Cython signature: const ResidueModification * addModification(const ResidueModification & new_mod) Add a new modification to ModificationsDB.

findModificationIndex

Cython signature: size_t findModificationIndex(const String & mod_name) Returns the index of the modification in the mods_ vector; a unique name must be given

getAllSearchModifications

Cython signature: void getAllSearchModifications(libcpp_vector[String] & modifications) Collects all modifications that can be used for identification searches

getBestModificationByDiffMonoMass

Cython signature: const ResidueModification * getBestModificationByDiffMonoMass(double mass, double max_error, const String & residue, TermSpecificity term_spec)

getModification

  • Cython signature: const ResidueModification * getModification(size_t index)

getNumberOfModifications

Cython signature: size_t getNumberOfModifications() Returns the number of modifications read from the unimod.xml file

has

Cython signature: bool has(String modification) Returns true if the modification exists

isInstantiated

Cython signature: bool isInstantiated() Check whether ModificationsDB was instantiated before

searchModifications

Cython signature: void searchModifications(libcpp_set[const ResidueModification *] & mods, const String & mod_name, const String & residue, TermSpecificity term_spec)

searchModificationsByDiffMonoMass

Cython signature: void searchModificationsByDiffMonoMass(libcpp_vector[String] & mods, double mass, double max_error, const String & residue, TermSpecificity term_spec) Collects all modifications with delta mass inside a tolerance window

addModification()

Cython signature: const ResidueModification * addModification(const ResidueModification & new_mod) Add a new modification to ModificationsDB. If the modification already exists (based on its fullID) it is not added. Returns the modification in the ModificationDB (which can differ from input if mod was already present).

findModificationIndex()

Cython signature: size_t findModificationIndex(const String & mod_name) Returns the index of the modification in the mods_ vector; a unique name must be given

getAllSearchModifications()

Cython signature: void getAllSearchModifications(libcpp_vector[String] & modifications) Collects all modifications that can be used for identification searches

getBestModificationByDiffMonoMass()

Cython signature: const ResidueModification * getBestModificationByDiffMonoMass(double mass, double max_error, const String & residue, TermSpecificity term_spec)

Query the modifications DB to get the best matching modification with the given delta mass at the given residue (NULL pointer means no result, maybe the maximal error tolerance needs to be increased). Possible input for CAM modification would be a delta mass of 57 and a residue of “C”. —– Note: If there are multiple possible matches with equal masses, it will choose the _first_ match which defaults to the first matching UniMod entry. —– :param residue: The residue at which the modifications occurs :param mass: The monoisotopic mass of the residue including the mass of the modification :param max_error: The maximal mass error in the modification search :returns: A pointer to the best matching modification (or NULL if none was found)

getModification()
  • Cython signature: const ResidueModification * getModification(size_t index) Returns the modification with the given index

  • Cython signature: const ResidueModification * getModification(const String & mod_name) Returns the modification with the given name

  • Cython signature: const ResidueModification * getModification(const String & mod_name, const String & residue, TermSpecificity term_spec) Returns the modification with the given arguments

getNumberOfModifications()

Cython signature: size_t getNumberOfModifications() Returns the number of modifications read from the unimod.xml file

has()

Cython signature: bool has(String modification) Returns true if the modification exists

isInstantiated()

Cython signature: bool isInstantiated() Check whether ModificationsDB was instantiated before

searchModifications()

Cython signature: void searchModifications(libcpp_set[const ResidueModification *] & mods, const String & mod_name, const String & residue, TermSpecificity term_spec)

If residue is set, only modifications with matching residue of origin are considered If term_spec is set, only modifications with matching term specificity are considered The resulting set of modifications will be empty if no modification exists that fulfills the criteria

searchModificationsByDiffMonoMass()

Cython signature: void searchModificationsByDiffMonoMass(libcpp_vector[String] & mods, double mass, double max_error, const String & residue, TermSpecificity term_spec) Collects all modifications with delta mass inside a tolerance window