16#include <unordered_map>
33 typedef std::vector<std::unique_ptr<Ribonucleotide>>::const_iterator
ConstIterator;
49 explicit RibonucleotideDB(std::vector<std::unique_ptr<RibonucleotideDataProvider>> providers);
54 return ribonucleotides_.begin();
60 return ribonucleotides_.end();
96 std::map<std::string, std::pair<ConstRibonucleotidePtr, ConstRibonucleotidePtr>>
ambiguity_map_;
Database of ribonucleotides (modified and unmodified)
Definition RibonucleotideDB.h:28
RibonucleotideDB()
default constructor
std::vector< std::unique_ptr< Ribonucleotide > > ribonucleotides_
list of known (modified) nucleotides
Definition RibonucleotideDB.h:90
std::vector< std::unique_ptr< Ribonucleotide > >::const_iterator ConstIterator
const iterator type definition
Definition RibonucleotideDB.h:33
static const RibonucleotideDB * getInstance()
RibonucleotideDB(const RibonucleotideDB &other)=delete
copy constructor not available
void loadFromProviders_(std::vector< std::unique_ptr< RibonucleotideDataProvider > > &providers)
load ribonucleotides from the given data providers
ConstIterator end() const
Const iterator to end of database.
Definition RibonucleotideDB.h:58
ConstRibonucleotidePtr getRibonucleotide(const std::string &code) const
Get a ribonucleotide by its code (short name)
ConstRibonucleotidePtr getRibonucleotidePrefix(const std::string &seq) const
Get the ribonucleotide with the longest code that matches a prefix of seq.
std::unordered_map< std::string, Size > code_map_
mapping of codes (short names) to indexes into ribonucleotides_
Definition RibonucleotideDB.h:93
RibonucleotideDB & operator=(const RibonucleotideDB &other)=delete
assignment operator not available
Size max_code_length_
Definition RibonucleotideDB.h:98
ConstIterator begin() const
Const iterator to beginning of database.
Definition RibonucleotideDB.h:52
std::map< std::string, std::pair< ConstRibonucleotidePtr, ConstRibonucleotidePtr > > ambiguity_map_
mapping of ambiguity codes to the alternatives they represent
Definition RibonucleotideDB.h:96
RibonucleotideDB(std::vector< std::unique_ptr< RibonucleotideDataProvider > > providers)
constructor that loads from the given data providers
~RibonucleotideDB()=default
destructor
std::pair< ConstRibonucleotidePtr, ConstRibonucleotidePtr > getRibonucleotideAlternatives(const std::string &code) const
Get the alternatives for an ambiguous modification code.
Representation of a ribonucleotide (modified or unmodified)
Definition Ribonucleotide.h:28
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