Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Static Public Member Functions | Protected Attributes

ModificationsDB Class Reference
[Chemistry]

database which holds all residue modifications from UniMod More...

#include <OpenMS/CHEMISTRY/ModificationsDB.h>

List of all members.

Public Member Functions

Size getNumberOfModifications () const
 returns the number of modifications read from the unimod.xml file
const ResidueModificationgetModification (Size index) const
 returns the modification with the given index
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
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
const ResidueModificationgetTerminalModification (const String &name, ResidueModification::Term_Specificity term_spec) const
 returns the modifications of the given name
const ResidueModificationgetModification (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 ResidueModificationgetModification (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
void getTerminalModificationsByDiffMonoMass (std::vector< String > &mods, DoubleReal mass, DoubleReal error, ResidueModification::Term_Specificity term_spec)
 query the modifications DB to get the terminal modifications with mass
void getModificationsByDiffMonoMass (std::vector< String > &mods, DoubleReal mass, DoubleReal 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, DoubleReal mass, DoubleReal error=0.0)
 query the modifications DB to get modifications with the given mass at the given residue
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 getAllSearchModifications (std::vector< String > &modifications)
 get all modifications that can be used for identification searches

Static Public Member Functions

static ModificationsDBgetInstance ()

Protected Attributes

std::vector
< ResidueModification * > 
mods_
 stores the modifications
Map< String, std::set< const
ResidueModification * > > 
modification_names_
 stores the mappings of (unique) names to the modifications

Private Member Functions

Constructors and Destructors

 ModificationsDB ()
 default constructor
 ModificationsDB (const ModificationsDB &residue_db)
 copy constructor
virtual ~ModificationsDB ()
 destructor
Assignment

ModificationsDBoperator= (const ModificationsDB &aa)
 assignment operator

Detailed Description

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.


Constructor & Destructor Documentation

ModificationsDB (  )  [private]

default constructor

ModificationsDB ( const ModificationsDB residue_db  )  [private]

copy constructor

virtual ~ModificationsDB (  )  [private, virtual]

destructor


Member Function Documentation

Size findModificationIndex ( const String mod_name  )  const

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

static ModificationsDB* getInstance (  )  [inline, static]
const ResidueModification& getModification ( const String modification  )  const
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 ( Size  index  )  const

returns the modification with the given index

void getModificationsByDiffMonoMass ( std::vector< String > &  mods,
const String residue,
DoubleReal  mass,
DoubleReal  error = 0.0 
)

query the modifications DB to get modifications with the given mass at the given residue

void getModificationsByDiffMonoMass ( std::vector< String > &  mods,
DoubleReal  mass,
DoubleReal  error = 0.0 
)

query the modifications DB to get the modifications with mass, without any specific origin

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!

Exceptions:
ElementNotFound is thrown if no or more than one element is found
void getTerminalModificationsByDiffMonoMass ( std::vector< String > &  mods,
DoubleReal  mass,
DoubleReal  error,
ResidueModification::Term_Specificity  term_spec 
)

query the modifications DB to get the terminal modifications with mass

ModificationsDB& operator= ( const ModificationsDB aa  )  [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 mod_name,
ResidueModification::Term_Specificity  term_spec 
) const

returns all modification which have the given name as synonym

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 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


Member Data Documentation

Map<String, std::set<const ResidueModification *> > modification_names_ [protected]

stores the mappings of (unique) names to the modifications

std::vector<ResidueModification *> mods_ [protected]

stores the modifications


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:50 using doxygen 1.7.1