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 EnzymegetEnzyme (const String &name) const
 
const EnzymegetEnzymeByRegEx (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 getAllCometNames (std::vector< String > &all_names) const
 returns all the enzyme names available for Comet More...
 
void getAllOMSSANames (std::vector< String > &all_names) const
 returns all the enzyme names available for OMSSA More...
 
void getAllMSGFNames (std::vector< String > &all_names) const
 returns all the enzyme names available for MSGFPlus 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 EnzymesDBgetInstance ()
 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 EnzymeparseEnzyme_ (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
EnzymesDBoperator= (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

◆ ConstEnzymeIterator

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

◆ EnzymeIterator

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

Constructor & Destructor Documentation

◆ ~EnzymesDB()

virtual ~EnzymesDB ( )
virtual

destructor

◆ EnzymesDB() [1/2]

EnzymesDB ( )
protected

◆ EnzymesDB() [2/2]

EnzymesDB ( const EnzymesDB enzyme_db)
protected

copy constructor

Member Function Documentation

◆ addEnzyme()

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

◆ addEnzyme_()

void addEnzyme_ ( const Enzyme enzyme)
protected

◆ beginEnzyme()

ConstEnzymeIterator beginEnzyme ( ) const
inline

◆ clear()

void clear ( )

deletes all enzymes, resulting in an empty database

◆ endEnzyme()

ConstEnzymeIterator endEnzyme ( ) const
inline

◆ getAllCometNames()

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

returns all the enzyme names available for Comet

◆ getAllMSGFNames()

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

returns all the enzyme names available for MSGFPlus

◆ getAllNames()

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

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

Referenced by SimpleSearchEngine::registerOptionsAndFlags_(), and RNPxlSearch::registerOptionsAndFlags_().

◆ getAllOMSSANames()

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

returns all the enzyme names available for OMSSA

◆ getAllXTandemNames()

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

returns all the enzyme names available for XTandem

◆ getEnzyme()

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

Referenced by SimpleSearchEngine::postProcessHits_().

◆ getEnzymeByRegEx()

const Enzyme* getEnzymeByRegEx ( const String cleavage_regex) const

returns a pointer to the enzyme with cleavage regex

Exceptions
Exception::IllegalArgumentif enzyme regex is unregistered.

◆ getInstance()

static EnzymesDB* getInstance ( )
inlinestatic

this member function serves as a replacement of the constructor

Referenced by SimpleSearchEngine::postProcessHits_(), SimpleSearchEngine::registerOptionsAndFlags_(), and RNPxlSearch::registerOptionsAndFlags_().

◆ hasEnzyme() [1/2]

bool hasEnzyme ( const String name) const

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

◆ hasEnzyme() [2/2]

bool hasEnzyme ( const Enzyme enzyme) const

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

◆ hasRegEx()

bool hasRegEx ( const String cleavage_regex) const

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

◆ operator=()

EnzymesDB& operator= ( const EnzymesDB enzymes_db)
protected

assignment operator

◆ parseEnzyme_()

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

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

◆ readEnzymesFromFile_()

void readEnzymesFromFile_ ( const String filename)
protected

reads enzymes from the given file

◆ setEnzymes()

void setEnzymes ( const String filename)

load enzymes from given file

Member Data Documentation

◆ const_enzymes_

std::set<const Enzyme*> const_enzymes_
protected

◆ enzyme_names_

boost::unordered_map<String, const Enzyme*> enzyme_names_
protected

◆ enzyme_regex_

Map<String, const Enzyme*> enzyme_regex_
protected

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:08 using doxygen 1.8.13