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

ModifierRep Class Reference

Implements modification for suffix arrays. More...

#include <OpenMS/CHEMISTRY/ModifierRep.h>

List of all members.

Public Member Functions

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

Protected Attributes

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

Detailed Description

Implements modification for suffix arrays.


Constructor & Destructor Documentation

ModifierRep (  ) 

Constructor.

ModifierRep ( const ModifierRep source  ) 

copy constructor

virtual ~ModifierRep (  )  [virtual]

destructor


Member Function Documentation

Size getMaxModificationMasses (  ) 

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

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

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

Parameters:
m masse
seq peptide sequence
Returns:
vector of strings the getModificationsForMass (double & m) will be used. then a chacater histogramm of the sequence is created as well as for every possible combination of modifications. Then only modifications that are possible are returned.
std::vector<String> getModificationsForMass ( double m  ) 

gets all modification possibilities for a given mass

Parameters:
m masse
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.
const std::vector<std::vector<double> >& getModificationTable (  ) 

getter for the modification table

Returns:
const reference to the modofication table
Size getNumberOfModifications (  )  const

getter for number of modifications

Returns:
number of modifications
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_map reference to the map holding the possible modifications
c const 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 occure 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.

void setNumberOfModifications ( Size  i  ) 

setter for number of modifications

Parameters:
i number of modifications

Member Data Documentation

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

maps a mass to the combination of modifications

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

all possible modifications

number of maximal modifications


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