Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

ModifierRep Class Reference

#include <OpenMS/CHEMISTRY/ModifierRep.h>

List of all members.


Detailed Description

Implements modification for suffix arrays.

Public Member Functions

 ModifierRep ()
 Constructor.
 ModifierRep (const ModifierRep &source)
 copy constructor
virtual ~ModifierRep ()
 destructor
void setNumberOfModifications (const unsigned int i)
 setter for number of modifications
UInt getNumberOfModifications () const
 getter for number of modifications
const std::vector< std::vector
< double > > & 
getModificationTable ()
 getter for the modification table
void refreshModificationList (std::map< double, int > &mod_map, const char &c)
 updates the modifications list if with the modifications of a new amino acid
UInt 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
int number_of_modifications_
 number of maximal modifications
std::map< String, std::vector
< String > > 
mass_mapping_
 maps a mass to the combination of modifications

Constructor & Destructor Documentation

ModifierRep (  ) 

Constructor.

ModifierRep ( const ModifierRep source  ) 

copy constructor

virtual ~ModifierRep (  )  [virtual]

destructor


Member Function Documentation

void setNumberOfModifications ( const unsigned int  i  ) 

setter for number of modifications

Parameters:
i number of modifications

UInt getNumberOfModifications (  )  const

getter for number of modifications

Returns:
number of modifications

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

getter for the modification table

Returns:
const reference to the modofication table

void refreshModificationList ( std::map< double, int > &  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.

UInt getMaxModificationMasses (  ) 

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

Returns:
int

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.

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.


Member Data Documentation

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

all possible modifications

int number_of_modifications_ [protected]

number of maximal modifications

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

maps a mass to the combination of modifications


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1