Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Attributes | List of all members
ModifierRep Class Reference

Implements modification for suffix arrays. More...

#include <OpenMS/CHEMISTRY/ModifierRep.h>

Public Member Functions

 ModifierRep ()
 Constructor. More...
 
 ModifierRep (const ModifierRep &source)
 copy constructor More...
 
virtual ~ModifierRep ()
 destructor More...
 
void setNumberOfModifications (Size i)
 setter for number of modifications More...
 
Size getNumberOfModifications () const
 getter for number of modifications More...
 
const std::vector< std::vector< double > > & getModificationTable ()
 getter for the modification table More...
 
void refreshModificationList (std::map< double, SignedSize > &mod_map, const char &c)
 updates the modifications list if with the modifications of a new amino acid More...
 
Size getMaxModificationMasses ()
 calculates the maximal number unique masses of combinations of modifications (maximal possible size of the modification map) More...
 
std::vector< StringgetModificationsForMass (double &m)
 gets all modification possibilities for a given mass More...
 
std::vector< StringgetModificationsForMass (double &m, const String &seq)
 gets all modification possibilities for a given mass and for the given peptide More...
 

Protected Attributes

std::vector< std::vector< double > > modification_table_
 all possible modifications More...
 
Size number_of_modifications_
 number of maximal modifications More...
 
std::map< String, std::vector< String > > mass_mapping_
 maps a mass to the combination of modifications More...
 

Detailed Description

Implements modification for suffix arrays.

Constructor & Destructor Documentation

◆ ModifierRep() [1/2]

Constructor.

◆ ModifierRep() [2/2]

ModifierRep ( const ModifierRep source)

copy constructor

◆ ~ModifierRep()

virtual ~ModifierRep ( )
virtual

destructor

Member Function Documentation

◆ getMaxModificationMasses()

Size getMaxModificationMasses ( )

calculates the maximal number unique masses of combinations of modifications (maximal possible size of the modification map)

Returns
Size

◆ getModificationsForMass() [1/2]

std::vector<String> getModificationsForMass ( double m)

gets all modification possibilities for a given mass

Parameters
mmasse
Returns
vector of strings therefor at first the massmapping is calculated. This massmapping will be saved as private member mass_mapping_ so that it has to be calculated only once.

◆ getModificationsForMass() [2/2]

std::vector<String> getModificationsForMass ( double m,
const String seq 
)

gets all modification possibilities for a given mass and for the given peptide

Parameters
mmass
seqpeptide sequence
Returns
vector of strings the getModificationsForMass (double & m) will be used. then a character histogram of the sequence is created as well as for every possible combination of modifications. Then only modifications that are possible are returned.

◆ getModificationTable()

const std::vector<std::vector<double> >& getModificationTable ( )

getter for the modification table

Returns
const reference to the modofication table

◆ getNumberOfModifications()

Size getNumberOfModifications ( ) const

getter for number of modifications

Returns
number of modifications

◆ refreshModificationList()

void refreshModificationList ( std::map< double, SignedSize > &  mod_map,
const char &  c 
)

updates the modifications list if with the modifications of a new amino acid

Parameters
mod_mapreference to the map holding the possible modifications
cconst character for the amino acid

All modification for the given amino acid are added to the map. The key is the mass, the value is the number of modifications for that mass. So the advantage of using a map is that a value will occur only once. The mass of the modification is added to all elements in the map whose number of modifications is smaller than the maximal number of modifications.

◆ setNumberOfModifications()

void setNumberOfModifications ( Size  i)

setter for number of modifications

Parameters
inumber of modifications

Member Data Documentation

◆ mass_mapping_

std::map<String, std::vector<String> > mass_mapping_
protected

maps a mass to the combination of modifications

◆ modification_table_

std::vector<std::vector<double> > modification_table_
protected

all possible modifications

◆ number_of_modifications_

Size number_of_modifications_
protected

number of maximal modifications


OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:10 using doxygen 1.8.13