OpenMS
2.8.0
|
Digestion enzyme database (base class) More...
#include <OpenMS/CHEMISTRY/DigestionEnzymeDB.h>
Public Member Functions | |
Constructors and Destructors | |
virtual | ~DigestionEnzymeDB () |
destructor More... | |
Accessors | |
const DigestionEnzymeType * | getEnzyme (const String &name) const |
const DigestionEnzymeType * | getEnzymeByRegEx (const String &cleavage_regex) const |
void | getAllNames (std::vector< String > &all_names) const |
returns all the enzyme names (does NOT include synonym names) 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 DigestionEnzymeType *enzyme) const |
returns true if the db contains the enzyme of the given pointer More... | |
Typedefs | |
typedef std::set< const DigestionEnzymeType * >::const_iterator | ConstEnzymeIterator |
typedef std::set< const DigestionEnzymeType * >::iterator | EnzymeIterator |
static InstanceType * | getInstance () |
this member function serves as a replacement of the constructor More... | |
Assignment | |
Map< String, const DigestionEnzymeType * > | enzyme_names_ |
index by names More... | |
Map< String, const DigestionEnzymeType * > | enzyme_regex_ |
index by regex More... | |
std::set< const DigestionEnzymeType * > | const_enzymes_ |
set of enzymes More... | |
DigestionEnzymeDB & | operator= (const DigestionEnzymeDB &enzymes_db)=delete |
assignment operator More... | |
void | readEnzymesFromFile_ (const String &filename) |
reads enzymes from the given file More... | |
const DigestionEnzymeType * | parseEnzyme_ (Map< String, String > &values) const |
parses an enzyme, given the key/value pairs from an XML file More... | |
void | addEnzyme_ (const DigestionEnzymeType *enzyme) |
add to internal data; also update indices for search by name and regex More... | |
Iterators | |
ConstEnzymeIterator | beginEnzyme () const |
ConstEnzymeIterator | endEnzyme () const |
DigestionEnzymeDB (const String &db_file="") | |
DigestionEnzymeDB (const DigestionEnzymeDB &enzymes_db)=delete | |
copy constructor More... | |
Digestion enzyme database (base class)
Template parameters: DigestionEnzymeType
should be a subclass of DigestionEnzyme. InstanceType
should be a subclass of DigestionEnzymeDB ("Curiously Recurring Template Pattern", see https://stackoverflow.com/a/34519373).
typedef std::set<const DigestionEnzymeType*>::const_iterator ConstEnzymeIterator |
typedef std::set<const DigestionEnzymeType*>::iterator EnzymeIterator |
|
inlinevirtual |
destructor
References DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::const_enzymes_.
|
inlineprotected |
|
protecteddelete |
copy constructor
|
inlineprotected |
add to internal data; also update indices for search by name and regex
References DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::const_enzymes_, DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::enzyme_names_, DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::enzyme_regex_, and String::toLower().
Referenced by DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::readEnzymesFromFile_().
|
inline |
|
inline |
|
inline |
returns all the enzyme names (does NOT include synonym names)
References DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::const_enzymes_.
Referenced by NucleicAcidSearchEngine::registerOptionsAndFlags_().
|
inline |
returns a pointer to the enzyme with name (supports synonym names)
Exception::ElementNotFound | if enzyme is unknown |
References DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::enzyme_names_.
Referenced by NucleicAcidSearchEngine::main_().
|
inline |
returns a pointer to the enzyme with cleavage regex
Exception::IllegalArgument | if enzyme regex is unregistered. |
References DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::enzyme_regex_.
|
inlinestatic |
this member function serves as a replacement of the constructor
|
inline |
returns true if the db contains the enzyme of the given pointer
References DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::const_enzymes_.
|
inline |
returns true if the db contains a enzyme with the given name (supports synonym names)
References DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::enzyme_names_.
|
inline |
returns true if the db contains a enzyme with the given regex
References DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::enzyme_regex_.
|
protecteddelete |
assignment operator
parses an enzyme, given the key/value pairs from an XML file
References OPENMS_LOG_ERROR.
Referenced by DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::readEnzymesFromFile_().
|
inlineprotected |
reads enzymes from the given file
References DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::addEnzyme_(), Param::begin(), Param::empty(), Param::end(), File::find(), Param::ParamIterator::getName(), ParamXMLFile::load(), DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::parseEnzyme_(), String::split(), and OpenMS::StringUtils::split().
Referenced by DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::DigestionEnzymeDB().
|
protected |
set of enzymes
Referenced by DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::addEnzyme_(), DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::beginEnzyme(), DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::endEnzyme(), DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::getAllNames(), DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::hasEnzyme(), and DigestionEnzymeDB< DigestionEnzymeType, InstanceType >::~DigestionEnzymeDB().