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

ResidueDB Class Reference
[Chemistry]

residue data base which holds residues More...

#include <OpenMS/CHEMISTRY/ResidueDB.h>

List of all members.

Public Types

Typedefs

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

Public Member Functions

Constructors and Destructors

virtual ~ResidueDB ()
 destructor
Accessors

Size getNumberOfResidues () const
 returns the number of residues stored
Size getNumberOfModifiedResidues () const
const ResiduegetResidue (const String &name) const
 returns a pointer to the residue with name, 3 letter code or 1 letter code name
const ResiduegetModifiedResidue (const String &name)
const ResiduegetModifiedResidue (const Residue *residue, const String &name)
const std::set< const Residue * > getResidues (const String &residue_set="All") const
 returns a set of all residues stored in this residue db
const std::set< String > & getResidueSets () const
 returns all residue sets that are registered which this instance
void setResidues (const String &filename)
 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 hasResidue (const String &name) const
 returns true if the db contains a residue with the given name
bool hasResidue (const Residue *residue) const
 returns true if the db contains the residue of the given pointer
Iterators

ResidueIterator beginResidue ()
ResidueIterator endResidue ()
ResidueConstIterator beginResidue () const
ResidueConstIterator endResidue () const

Static Public Member Functions

static ResidueDBgetInstance ()
 this member function serves as a replacement of the constructor

Protected Member Functions

void readResiduesFromFile_ (const String &filename)
 reads residues from the given file
ResidueparseResidue_ (Map< String, String > &values)
 parses a residue, given the key/value pairs from i.e. an XML file
void clear_ ()
 deletes all sub-instances of the stored data like modifications and residues
void clearResidues_ ()
 clears the residues
void buildResidueNames_ ()
 builds an index of residue names for fast access, synonyms are also considered
void addResidue_ (Residue *residue)
Private Constructors

 ResidueDB ()
 default constructor
 ResidueDB (const ResidueDB &residue_db)
 copy constructor
Assignment

ResidueDBoperator= (const ResidueDB &aa)
 assignment operator

Protected Attributes

Map< String, Residue * > residue_names_
Map< String, Map< String,
Residue * > > 
residue_mod_names_
std::set< Residue * > residues_
std::set< const Residue * > const_residues_
std::set< Residue * > modified_residues_
std::set< const Residue * > const_modified_residues_
Map< String, std::set< const
Residue * > > 
residues_by_set_
std::set< Stringresidue_sets_

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

By default no modified residues are stored in an instance. However, if one queries the instance with getModifiedResidue, a new modified residue is added.


Member Typedef Documentation

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

Constructor & Destructor Documentation

virtual ~ResidueDB (  )  [virtual]

destructor

ResidueDB (  )  [protected]

default constructor

ResidueDB ( const ResidueDB residue_db  )  [protected]

copy constructor


Member Function Documentation

void addResidue ( const Residue residue  ) 

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

void addResidue_ ( Residue residue  )  [protected]
ResidueIterator beginResidue (  )  [inline]
ResidueConstIterator beginResidue (  )  const [inline]
void buildResidueNames_ (  )  [protected]

builds an index of residue names for fast access, synonyms are also considered

void clear_ (  )  [protected]

deletes all sub-instances of the stored data like modifications and residues

void clearResidues_ (  )  [protected]

clears the residues

ResidueConstIterator endResidue (  )  const [inline]
ResidueIterator endResidue (  )  [inline]
static ResidueDB* getInstance (  )  [inline, static]

this member function serves as a replacement of the constructor

const Residue* getModifiedResidue ( const Residue residue,
const String name 
)
const Residue* getModifiedResidue ( const String name  ) 
Size getNumberOfModifiedResidues (  )  const
Size getNumberOfResidues (  )  const

returns the number of residues stored

const Residue* getResidue ( const String name  )  const

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

const std::set<const Residue *> getResidues ( const String residue_set = "All"  )  const

returns a set of all residues stored in this residue db

The possible residues are defined in share/OpenMS/CHEMISTRY/Residues.xml. At the moment the following sets are available: All - all residues stored in the file Natural20 - default 20 naturally occuring residues Natural19WithoutI - default natural amino acids, excluding isoleucine (isobaric to leucine) Natural19WithoutL - default natural amino acids, excluding leucine (isobaric to isoleucine) Natural19J - default natural amino acids, (isobaric leucine/isoleucine are marked by 'J') AmbiguousWithoutX - all amino acids, including ambiguous ones B (asparagine or aspartate) Z (glutamine or glutamate) J (isoleucine or leucine) Ambiguous - all amino acids including all ambiguous ones (X can be every other amino acid) AllNatural - naturally occuring residues, including selenocysteine (U)

const std::set<String>& getResidueSets (  )  const

returns all residue sets that are registered which this instance

bool hasResidue ( const String name  )  const

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

bool hasResidue ( const Residue residue  )  const

returns true if the db contains the residue of the given pointer

ResidueDB& operator= ( const ResidueDB aa  )  [protected]

assignment operator

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

parses a residue, given the key/value pairs from i.e. an XML file

void readResiduesFromFile_ ( const String filename  )  [protected]

reads residues from the given file

void setResidues ( const String filename  ) 

sets the residues from given file


Member Data Documentation

std::set<const Residue *> const_modified_residues_ [protected]
std::set<const Residue *> const_residues_ [protected]
std::set<Residue *> modified_residues_ [protected]
Map<String, Residue *> residue_names_ [protected]
std::set<String> residue_sets_ [protected]
std::set<Residue *> residues_ [protected]
Map<String, std::set<const Residue *> > residues_by_set_ [protected]

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