database which holds all residue modifications from UniMod More...
#include <OpenMS/CHEMISTRY/ModificationsDB.h>
Public Member Functions | |
Size | getNumberOfModifications () const |
returns the number of modifications read from the unimod.xml file More... | |
const ResidueModification & | getModification (Size index) const |
returns the modification with the given index More... | |
void | searchTerminalModifications (std::set< const ResidueModification * > &mods, const String &name, ResidueModification::Term_Specificity term_spec) const |
returns all modifications which have the given name as synonym More... | |
void | searchModifications (std::set< const ResidueModification * > &mods, const String &orgin, const String &mod_name, ResidueModification::Term_Specificity term_spec) const |
returns all modification which have the given name as synonym and the given origin More... | |
void | searchModifications (std::set< const ResidueModification * > &mods, const String &mod_name, ResidueModification::Term_Specificity term_spec) const |
returns all modification which have the given name as synonym More... | |
const ResidueModification & | getTerminalModification (const String &name, ResidueModification::Term_Specificity term_spec) const |
returns the modifications of the given name More... | |
const ResidueModification & | getModification (const String &residue_name, const String &mod_name, ResidueModification::Term_Specificity term_spec) const |
returns the modification with the given name and given residue More... | |
const ResidueModification & | getModification (const String &modification) const |
Size | findModificationIndex (const String &mod_name) const |
returns the index of the modification in the mods_ vector; a unique name must be given More... | |
void | getTerminalModificationsByDiffMonoMass (std::vector< String > &mods, double mass, double error, ResidueModification::Term_Specificity term_spec) |
query the modifications DB to get the terminal modifications with mass More... | |
void | getModificationsByDiffMonoMass (std::vector< String > &mods, double mass, double error=0.0) |
query the modifications DB to get the modifications with mass, without any specific origin More... | |
void | getModificationsByDiffMonoMass (std::vector< String > &mods, const String &residue, double mass, double error=0.0) |
query the modifications DB to get modifications with the given delta mass at the given residue More... | |
const ResidueModification * | getBestModificationsByMonoMass (const String &residue, double mass, double max_error=0.0) |
returns the best matching modification for the given mass and residue More... | |
const ResidueModification * | getBestModificationsByDiffMonoMass (const String &residue, double mass, double max_error=0.0) |
returns the best matching modification for the given delta mass and residue More... | |
void | readFromOBOFile (const String &filename) |
adds modifications from a given file in OBO format More... | |
void | readFromUnimodXMLFile (const String &filename) |
adds modifications from a given file in Unimod XML format More... | |
void | getAllSearchModifications (std::vector< String > &modifications) |
get all modifications that can be used for identification searches More... | |
Static Public Member Functions | |
static ModificationsDB * | getInstance () |
Protected Attributes | |
std::vector< ResidueModification * > | mods_ |
stores the modifications More... | |
Map< String, std::set< const ResidueModification * > > | modification_names_ |
stores the mappings of (unique) names to the modifications More... | |
Private Member Functions | |
Constructors and Destructors | |
ModificationsDB () | |
default constructor More... | |
ModificationsDB (const ModificationsDB &residue_db) | |
copy constructor More... | |
virtual | ~ModificationsDB () |
destructor More... | |
Assignment | |
ModificationsDB & | operator= (const ModificationsDB &aa) |
assignment operator More... | |
database which holds all residue modifications from UniMod
This singleton class serves as a storage of the available modifications represented by UniMod (www.unimod.org). The modifications are identified by there name and possibly other ids from UniMod or the PSI-MOD ontology. Modifications can have different specificities, e.g. they can occur only at the termini, anywhere or only at specific amino acids.
The modifications are defined in share/OpenMS/CHEMISTRY/unimod.xml and in share/OpenMS/CHEMISTRY/PSI-MOD.obo. The unimod file can be directly downloaded from unimod.org and replaced if the modifications change.
To add a new modification, not contained in UniMod, one should follow the way described at the unimod.org website and download the file then from unimod.org. The same can be done to add support for the modifications to search engines, e.g. Mascot.
|
private |
default constructor
|
private |
copy constructor
|
privatevirtual |
destructor
returns the index of the modification in the mods_ vector; a unique name must be given
void getAllSearchModifications | ( | std::vector< String > & | modifications | ) |
get all modifications that can be used for identification searches
Referenced by SimpleSearchEngine::registerOptionsAndFlags_().
const ResidueModification* getBestModificationsByDiffMonoMass | ( | const String & | residue, |
double | mass, | ||
double | max_error = 0.0 |
||
) |
returns the best matching modification for the given delta mass and residue
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".
residue | The residue at which the modifications occurs |
mass | The monoisotopic mass of the residue including the mass of the modification |
max_error | The maximal mass error in the modification search |
const ResidueModification* getBestModificationsByMonoMass | ( | const String & | residue, |
double | mass, | ||
double | max_error = 0.0 |
||
) |
returns the best matching modification for the given mass and residue
Query the modifications DB to get the best matching modification with the given 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 mass of 160 and a residue of "C".
residue | The residue at which the modifications occurs |
mass | The monoisotopic mass of the residue including the mass of the modification |
max_error | The maximal mass error in the modification search |
|
inlinestatic |
const ResidueModification& getModification | ( | Size | index | ) | const |
returns the modification with the given index
const ResidueModification& getModification | ( | const String & | residue_name, |
const String & | mod_name, | ||
ResidueModification::Term_Specificity | term_spec | ||
) | const |
returns the modification with the given name and given residue
const ResidueModification& getModification | ( | const String & | modification | ) | const |
void getModificationsByDiffMonoMass | ( | std::vector< String > & | mods, |
double | mass, | ||
double | error = 0.0 |
||
) |
query the modifications DB to get the modifications with mass, without any specific origin
void getModificationsByDiffMonoMass | ( | std::vector< String > & | mods, |
const String & | residue, | ||
double | mass, | ||
double | error = 0.0 |
||
) |
query the modifications DB to get modifications with the given delta mass at the given residue
Size getNumberOfModifications | ( | ) | const |
returns the number of modifications read from the unimod.xml file
const ResidueModification& getTerminalModification | ( | const String & | name, |
ResidueModification::Term_Specificity | term_spec | ||
) | const |
returns the modifications of the given name
This can either be the PSI-MOD identifier or every other unique identifier which can be found in the PSI-MOD definitions file.
To search for more than one modification searchModifications() can be used!
ElementNotFound | is thrown if no or more than one element is found |
void getTerminalModificationsByDiffMonoMass | ( | std::vector< String > & | mods, |
double | mass, | ||
double | error, | ||
ResidueModification::Term_Specificity | term_spec | ||
) |
query the modifications DB to get the terminal modifications with mass
|
private |
assignment operator
void readFromOBOFile | ( | const String & | filename | ) |
adds modifications from a given file in OBO format
void readFromUnimodXMLFile | ( | const String & | filename | ) |
adds modifications from a given file in Unimod XML format
void searchModifications | ( | std::set< const ResidueModification * > & | mods, |
const String & | orgin, | ||
const String & | mod_name, | ||
ResidueModification::Term_Specificity | term_spec | ||
) | const |
returns all modification which have the given name as synonym and the given origin
void searchModifications | ( | std::set< const ResidueModification * > & | mods, |
const String & | mod_name, | ||
ResidueModification::Term_Specificity | term_spec | ||
) | const |
returns all modification which have the given name as synonym
void searchTerminalModifications | ( | std::set< const ResidueModification * > & | mods, |
const String & | name, | ||
ResidueModification::Term_Specificity | term_spec | ||
) | const |
returns all modifications which have the given name as synonym
|
protected |
stores the mappings of (unique) names to the modifications
|
protected |
stores the modifications
OpenMS / TOPP release 2.0.0 | Documentation generated on Sat May 16 2015 16:13:56 using doxygen 1.8.9.1 |