![]() |
OpenMS
3.0.0
|
OpenMS stores a central database of all residues in the ResidueDB. All (unmodified) residues are added to the database on construction. Modified residues get created and added if getModifiedResidue is called. More...
#include <OpenMS/CHEMISTRY/ResidueDB.h>
Public Member Functions | |
Constructors and Destructors | |
virtual | ~ResidueDB () |
destructor More... | |
Accessors | |
Size | getNumberOfResidues () const |
returns the number of residues stored More... | |
Size | getNumberOfModifiedResidues () const |
returns the number of modified residues stored More... | |
const Residue * | getResidue (const String &name) const |
returns a pointer to the residue with name, 3 letter code or 1 letter code name More... | |
const Residue * | getResidue (const unsigned char &one_letter_code) const |
returns a pointer to the residue with 1 letter code name More... | |
const Residue * | getModifiedResidue (const String &name) |
Returns a pointer to a modified residue given a modification name. More... | |
const Residue * | getModifiedResidue (const Residue *residue, const String &name) |
Returns a pointer to a modified residue given a residue and a modification name. More... | |
const Residue * | getModifiedResidue (const Residue *residue, const ResidueModification *mod) |
const std::set< const Residue * > | getResidues (const String &residue_set="All") const |
returns a set of all residues stored in this residue db More... | |
const std::set< String > | getResidueSets () const |
returns all residue sets that are registered which this instance More... | |
Predicates | |
bool | hasResidue (const String &name) const |
returns true if the db contains a residue with the given name More... | |
bool | hasResidue (const Residue *residue) const |
returns true if the db contains the residue of the given pointer More... | |
Static Public Member Functions | |
static ResidueDB * | getInstance () |
singleton More... | |
Protected Member Functions | |
void | initResidues_ () |
initializes all residues by building More... | |
void | buildResidues_ () |
void | insertResidueAndAssociateWithResidueSet_ (Residue *residue, const std::vector< String > &residue_sets) |
creates and adds residues to a lookup table including the residue set More... | |
void | addResidue_ (Residue *residue) |
add residue and add names to lookup More... | |
void | addResidueNames_ (const Residue *) |
adds names of single residue to the index More... | |
void | addModifiedResidueNames_ (const Residue *) |
adds names of single modified residue to the index More... | |
Private Constructors | |
ResidueDB () | |
default constructor More... | |
ResidueDB (const ResidueDB &residue_db) | |
copy constructor More... | |
Assignment | |
ResidueDB & | operator= (const ResidueDB &aa)=delete |
assignment operator More... | |
Protected Attributes | |
std::map< String, std::map< String, const Residue * > > | residue_mod_names_ |
std::set< const Residue * > | const_residues_ |
all (unmodified) residues More... | |
std::set< const Residue * > | const_modified_residues_ |
all modified residues More... | |
std::set< String > | residue_sets_ |
std::unordered_map< String, const Residue * > | residue_names_ |
lookup from name to residue More... | |
std::array< const Residue *, 256 > | residue_by_one_letter_code_ = {{nullptr}} |
fast lookup table for residues More... | |
std::map< String, std::set< const Residue * > > | residues_by_set_ |
OpenMS stores a central database of all residues in the ResidueDB. All (unmodified) residues are added to the database on construction. Modified residues get created and added if getModifiedResidue is called.
|
virtual |
destructor
|
protected |
default constructor
|
protected |
adds names of single modified residue to the index
|
protected |
add residue and add names to lookup
|
protected |
adds names of single residue to the index
|
protected |
|
static |
singleton
Referenced by OpenMS::NuXLPresets::getPresets().
Returns a pointer to a modified residue given a modification name.
The "base" residue is looked up in ModificationsDB using the modification name. The modified residue is added to the database if it doesn't exist yet.
Returns a pointer to a modified residue given a residue and a modification name.
The modified residue is added to the database if it doesn't exist yet.
Exception::IllegalArgument | if the residue was not found |
Exception::InvalidValue | if no matching modification was found (via ModificationsDB::getModification) |
const Residue* getModifiedResidue | ( | const Residue * | residue, |
const ResidueModification * | mod | ||
) |
Size getNumberOfModifiedResidues | ( | ) | const |
returns the number of modified residues stored
Size getNumberOfResidues | ( | ) | const |
returns the number of residues stored
returns a pointer to the residue with name, 3 letter code or 1 letter code name
Referenced by OpenMS::NuXLPresets::getPresets().
const Residue* getResidue | ( | const unsigned char & | one_letter_code | ) | const |
returns a pointer to the residue with 1 letter code name
returns a set of all residues stored in this residue db
Following sets are available: All - all residues Natural20 - default 20 naturally occurring 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 occurring residues, including selenocysteine (U)
returns an empty set if the specified residue set is not defined
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
|
protected |
initializes all residues by building
|
protected |
creates and adds residues to a lookup table including the residue set
|
protected |
all modified residues
|
protected |
all (unmodified) residues
|
protected |
fast lookup table for residues
|
protected |