11#include <unordered_map>
22 class ResidueModification;
113 const std::set<const Residue*>
getResidues(
const std::string& residue_set =
"All")
const;
182 std::array<const Residue*, 256> residue_by_one_letter_code_ = {{
nullptr}};
OpenMS stores a central database of all residues in the ResidueDB. All (unmodified) residues are adde...
Definition ResidueDB.h:40
void insertResidueAndAssociateWithResidueSet_(Residue *residue, const std::vector< std::string > &residue_sets)
creates and adds residues to a lookup table including the residue set
ResidueDB & operator=(const ResidueDB &aa)=delete
assignment operator
void addModifiedResidueNames_(const Residue *) const
adds names of single modified residue to the index
const Residue * getResidue(const unsigned char &one_letter_code) const
returns a pointer to the residue with 1 letter code name
std::map< std::string, std::map< std::string, const Residue * > > residue_mod_names_
cache of name -> modification-name -> modified residue (lazily filled by getModifiedResidue)
Definition ResidueDB.h:168
const Residue * getModifiedResidue(const Residue *residue, const std::string &name) const
Returns a pointer to a modified residue given a residue and a modification name.
std::unordered_map< std::string, const Residue * > residue_names_
lookup from name to residue
Definition ResidueDB.h:179
void initResidues_()
initializes all residues by building
bool hasResidue(const Residue *residue) const
returns true if the db contains the residue of the given pointer
std::map< std::string, std::set< const Residue * > > residues_by_set_
Definition ResidueDB.h:184
const Residue * getResidue(const std::string &name) const
returns a pointer to the residue with name, 3 letter code or 1 letter code name
void addModifiedResidue_(Residue *residue) const
static const ResidueDB * getInstance()
singleton
Size getNumberOfModifiedResidues() const
returns the number of modified residues stored
const Residue * getModifiedResidue(const std::string &name) const
Returns a pointer to a modified residue given a modification name.
ResidueDB()
default constructor
const Residue * getModifiedResidue(const Residue *residue, const ResidueModification *mod) const
Returns a pointer to a modified residue given a residue and a pointer to a modification from the Modi...
virtual ~ResidueDB()
destructor
Size getNumberOfResidues() const
returns the number of residues stored
bool hasResidue(const std::string &name) const
returns true if the db contains a residue with the given name
const std::set< const Residue * > getResidues(const std::string &residue_set="All") const
returns a set of all residues stored in this residue db
std::set< const Residue * > const_residues_
all (unmodified) residues
Definition ResidueDB.h:171
std::set< const Residue * > const_modified_residues_
all modified residues (lazily filled by getModifiedResidue)
Definition ResidueDB.h:174
const std::set< std::string > getResidueSets() const
returns all residue sets that are registered which this instance
std::set< std::string > residue_sets_
Definition ResidueDB.h:176
void addResidueNames_(const Residue *)
adds names of single residue to the index
ResidueDB(const ResidueDB &residue_db)
copy constructor
Representation of a modification on an amino acid residue.
Definition ResidueModification.h:55
Representation of an amino acid residue.
Definition Residue.h:41
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19