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

ResidueDB Class Reference
[Chemistry]

#include <OpenMS/CHEMISTRY/ResidueDB.h>

List of all members.


Detailed Description

residue data base which holds residues

The residues stored in this DB are defined in a XML file under data/CHEMISTRY/residues.xml

Public Types

Typedefs
typedef std::set< Residue * >
::iterator 
ResidueIterator
typedef std::set< const
Residue * >::const_iterator 
ResidueConstIterator
typedef std::set
< ResidueModification * >
::iterator 
ResidueModificationIterator
typedef std::set< const
ResidueModification * >
::const_iterator 
ResidueModificationConstIterator

Public Member Functions

Constructors and Destructors
 ResidueDB ()
 default constructor
 ResidueDB (const ResidueDB &residue_db)
 copy constructor
 ResidueDB (const String &res_filename, const String &mod_filename) throw (Exception::FileNotFound, Exception::ParseError)
 constructor with filename where the residues are stored in
virtual ~ResidueDB ()
 destructor
Assignment
ResidueDBoperator= (const ResidueDB &aa)
 assignment operator
Accessors
UInt getNumberOfResidues () const
 returns the number of residues stored
UInt getNumberOfResidueModifications () const
 returns the number of modifications stored in this residue db
const ResidueModificationgetModification (const String &name) const
 resturns a pointer to modification with name name, if non is found 0 is returned
std::set< const
ResidueModification * > 
getModifications (const Residue *residue) const
 returns a set of modifications which can be applied to the given residue
std::set< const
ResidueModification * > 
getModifications (const String &res_name) const
 returns a set of modifications which can be applied to the given residue
const std::set< const
ResidueModification * > & 
getModifications () const
 returns a set of all modifications stored in this residue db
const ResiduegetResidue (const String &name) const
 returns a pointer to the residue with name, 3 letter code or 1 letter code name
std::set< const Residue * > getResidues (const ResidueModification *modification) const
 returns a set of residues which can have the given modification
std::set< const Residue * > getResidues (const String &mod_name) const
 returns a set of residues which can have the given modification
const std::set< const Residue * > & getResidues () const
 returns a set of all residues stored in this residue db
void setModifications (const String &filename) throw (Exception::FileNotFound, Exception::ParseError)
 sets the modifications from given file
void addResidueModification (ResidueModification modification)
 adds a modification, i.e. an unknown modification, where only the weights are known
void setResidues (const String &filename) throw (Exception::FileNotFound, Exception::ParseError)
 sets the residues from given file
void addResidue (const Residue &residue)
 adds a residue, i.e. a unkown residue, where only the weight is known
Predicates
bool hasResidueModification (const String &name) const
 returns true if the db contains a modification with the given name
bool hasResidue (const String &name) const
 returns true if the db contains a residue with the given name
bool operator== (const ResidueDB &rhs) const
 equality operator
bool operator!= (const ResidueDB &rhs) const
 inequality operator
Iterators
ResidueIterator beginResidue ()
ResidueIterator endResidue ()
ResidueConstIterator beginResidue () const
ResidueConstIterator endResidue () const
ResidueModificationIterator beginResidueModification ()
ResidueModificationIterator endResidueModification ()
ResidueModificationConstIterator beginResidueModification () const
ResidueModificationConstIterator endResidueModification () const

Protected Member Functions

void readResiduesFromFile_ (const String &filename) throw (Exception::FileNotFound, Exception::ParseError)
ResidueparseResidue_ (HashMap< String, String > &values) throw ()
void readResidueModificationsFromFile_ (const String &filename) throw (Exception::FileNotFound, Exception::ParseError)
void clear_ ()
void clearResidues_ ()
void clearResidueModifications_ ()
void buildResidueNames_ ()
void buildResidueModificationNames_ ()
void buildModifiedResidues_ ()

Protected Attributes

HashMap< String, Residue * > residue_names_
std::set< Residue * > residues_
std::set< const Residue * > const_residues_
HashMap< String,
ResidueModification * > 
modification_names_
std::set< ResidueModification * > modifications_
std::set< const
ResidueModification * > 
const_modifications_


Member Typedef Documentation

typedef std::set<Residue*>::iterator ResidueIterator

typedef std::set<const Residue*>::const_iterator ResidueConstIterator

typedef std::set<ResidueModification*>::iterator ResidueModificationIterator

typedef std::set<const ResidueModification*>::const_iterator ResidueModificationConstIterator


Constructor & Destructor Documentation

ResidueDB (  ) 

default constructor

ResidueDB ( const ResidueDB residue_db  ) 

copy constructor

ResidueDB ( const String res_filename,
const String mod_filename 
) throw (Exception::FileNotFound, Exception::ParseError)

constructor with filename where the residues are stored in

virtual ~ResidueDB (  )  [virtual]

destructor


Member Function Documentation

ResidueDB& operator= ( const ResidueDB aa  ) 

assignment operator

UInt getNumberOfResidues (  )  const

returns the number of residues stored

UInt getNumberOfResidueModifications (  )  const

returns the number of modifications stored in this residue db

const ResidueModification* getModification ( const String name  )  const

resturns a pointer to modification with name name, if non is found 0 is returned

std::set<const ResidueModification*> getModifications ( const Residue residue  )  const

returns a set of modifications which can be applied to the given residue

std::set<const ResidueModification*> getModifications ( const String res_name  )  const

returns a set of modifications which can be applied to the given residue

const std::set<const ResidueModification*>& getModifications (  )  const

returns a set of all modifications stored in this residue db

const Residue* getResidue ( const String name  )  const

returns a pointer to the residue with name, 3 letter code or 1 letter code name

std::set<const Residue*> getResidues ( const ResidueModification modification  )  const

returns a set of residues which can have the given modification

std::set<const Residue*> getResidues ( const String mod_name  )  const

returns a set of residues which can have the given modification

const std::set<const Residue*>& getResidues (  )  const

returns a set of all residues stored in this residue db

void setModifications ( const String filename  )  throw (Exception::FileNotFound, Exception::ParseError)

sets the modifications from given file

void addResidueModification ( ResidueModification  modification  ) 

adds a modification, i.e. an unknown modification, where only the weights are known

void setResidues ( const String filename  )  throw (Exception::FileNotFound, Exception::ParseError)

sets the residues from given file

void addResidue ( const Residue residue  ) 

adds a residue, i.e. a unkown residue, where only the weight is known

bool hasResidueModification ( const String name  )  const

returns true if the db contains a modification with the given name

bool hasResidue ( const String name  )  const

returns true if the db contains a residue with the given name

bool operator== ( const ResidueDB rhs  )  const

equality operator

bool operator!= ( const ResidueDB rhs  )  const

inequality operator

ResidueIterator beginResidue (  )  [inline]

ResidueIterator endResidue (  )  [inline]

ResidueConstIterator beginResidue (  )  const [inline]

ResidueConstIterator endResidue (  )  const [inline]

ResidueModificationIterator beginResidueModification (  )  [inline]

ResidueModificationIterator endResidueModification (  )  [inline]

ResidueModificationConstIterator beginResidueModification (  )  const [inline]

ResidueModificationConstIterator endResidueModification (  )  const [inline]

void readResiduesFromFile_ ( const String filename  )  throw (Exception::FileNotFound, Exception::ParseError) [protected]

Residue* parseResidue_ ( HashMap< String, String > &  values  )  throw () [protected]

void readResidueModificationsFromFile_ ( const String filename  )  throw (Exception::FileNotFound, Exception::ParseError) [protected]

void clear_ (  )  [protected]

void clearResidues_ (  )  [protected]

void clearResidueModifications_ (  )  [protected]

void buildResidueNames_ (  )  [protected]

void buildResidueModificationNames_ (  )  [protected]

void buildModifiedResidues_ (  )  [protected]


Member Data Documentation

HashMap<String, Residue*> residue_names_ [protected]

std::set<Residue*> residues_ [protected]

std::set<const Residue*> const_residues_ [protected]

HashMap<String, ResidueModification*> modification_names_ [protected]

std::set<ResidueModification*> modifications_ [protected]

std::set<const ResidueModification*> const_modifications_ [protected]


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