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

enzyme database which holds enzymes More...

#include <OpenMS/CHEMISTRY/EnzymesDB.h>

Public Types

Typedefs
typedef std::set< const Enzyme * >
::const_iterator 
ConstEnzymeIterator
 
typedef std::set< const Enzyme * >
::iterator 
EnzymeIterator
 

Public Member Functions

Constructors and Destructors
virtual ~EnzymesDB ()
 destructor More...
 
Accessors
const Enzyme * getEnzyme (const String &name) const
 
const Enzyme * getEnzymeByRegEx (const String &cleavage_regex) const
 
void setEnzymes (const String &filename)
 load enzymes from given file More...
 
void addEnzyme (const Enzyme &enzyme)
 
void clear ()
 deletes all enzymes, resulting in an empty database More...
 
void getAllNames (std::vector< String > &all_names) const
 returns all the enzyme names (does NOT include synonym names) More...
 
void getAllXTandemNames (std::vector< String > &all_names) const
 returns all the enzyme names available for XTandem More...
 
void getAllOMSSANames (std::vector< String > &all_names) const
 returns all the enzyme names available for OMSSA More...
 
Predicates
bool hasEnzyme (const String &name) const
 returns true if the db contains a enzyme with the given name (supports synonym names) More...
 
bool hasRegEx (const String &cleavage_regex) const
 returns true if the db contains a enzyme with the given regex More...
 
bool hasEnzyme (const Enzyme *enzyme) const
 returns true if the db contains the enzyme of the given pointer More...
 
Iterators
ConstEnzymeIterator beginEnzyme () const
 
ConstEnzymeIterator endEnzyme () const
 

Static Public Member Functions

static EnzymesDB * getInstance ()
 this member function serves as a replacement of the constructor More...
 

Protected Member Functions

 EnzymesDB ()
 
 EnzymesDB (const EnzymesDB &enzyme_db)
 copy constructor More...
 
void readEnzymesFromFile_ (const String &filename)
 reads enzymes from the given file More...
 
const Enzyme * parseEnzyme_ (Map< String, String > &values) const
 parses a enzyme, given the key/value pairs from i.e. an XML file More...
 
void addEnzyme_ (const Enzyme *enzyme)
 
Assignment
EnzymesDB & operator= (const EnzymesDB &enzymes_db)
 assignment operator More...
 

Protected Attributes

boost::unordered_map< String,
const Enzyme * > 
enzyme_names_
 
Map< String, const Enzyme * > enzyme_regex_
 
std::set< const Enzyme * > const_enzymes_
 

Detailed Description

enzyme database which holds enzymes

The enzymes stored in this DB are defined in a XML file under share/CHEMISTRY/Enzymes.xml

Member Typedef Documentation

typedef std::set<const Enzyme *>::const_iterator ConstEnzymeIterator
typedef std::set<const Enzyme *>::iterator EnzymeIterator

Constructor & Destructor Documentation

virtual ~EnzymesDB ( )
virtual

destructor

EnzymesDB ( )
protected
EnzymesDB ( const EnzymesDB &  enzyme_db)
protected

copy constructor

Member Function Documentation

void addEnzyme ( const Enzyme &  enzyme)

adds a new enzyme, e.g. a new enzyme, where only the cleavage regex is known

Note
name of enzyme is registered also in a toLowercase() variant
void addEnzyme_ ( const Enzyme *  enzyme)
protected
ConstEnzymeIterator beginEnzyme ( ) const
inline
void clear ( )

deletes all enzymes, resulting in an empty database

ConstEnzymeIterator endEnzyme ( ) const
inline
void getAllNames ( std::vector< String > &  all_names) const

returns all the enzyme names (does NOT include synonym names)

Referenced by SimpleSearchEngine::registerOptionsAndFlags_().

void getAllOMSSANames ( std::vector< String > &  all_names) const

returns all the enzyme names available for OMSSA

void getAllXTandemNames ( std::vector< String > &  all_names) const

returns all the enzyme names available for XTandem

const Enzyme* getEnzyme ( const String &  name) const

returns a pointer to the enzyme with name (supports synonym names)

Exceptions
Exception::ElementNotFoundif enzyme is unknown
Note
enzymes are registered in regular and in toLowercase() style, if unsure use toLowercase
const Enzyme* getEnzymeByRegEx ( const String &  cleavage_regex) const

returns a pointer to the enzyme with cleavage regex

Exceptions
Exception::IllegalArgumentif enzyme regex is unregistered.
static EnzymesDB* getInstance ( )
inlinestatic

this member function serves as a replacement of the constructor

Referenced by SimpleSearchEngine::registerOptionsAndFlags_().

bool hasEnzyme ( const String &  name) const

returns true if the db contains a enzyme with the given name (supports synonym names)

bool hasEnzyme ( const Enzyme *  enzyme) const

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

bool hasRegEx ( const String &  cleavage_regex) const

returns true if the db contains a enzyme with the given regex

EnzymesDB& operator= ( const EnzymesDB &  enzymes_db)
protected

assignment operator

const Enzyme* parseEnzyme_ ( Map< String, String > &  values) const
protected

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

void readEnzymesFromFile_ ( const String &  filename)
protected

reads enzymes from the given file

void setEnzymes ( const String &  filename)

load enzymes from given file

Member Data Documentation

std::set<const Enzyme*> const_enzymes_
protected
boost::unordered_map<String, const Enzyme*> enzyme_names_
protected
Map<String, const Enzyme*> enzyme_regex_
protected

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Jan 31 2017 06:40:16 using doxygen 1.8.8