16#include <unordered_map>
33 typedef std::vector<std::unique_ptr<Ribonucleotide>>::const_iterator
ConstIterator;
48 explicit RibonucleotideDB(std::vector<std::unique_ptr<RibonucleotideDataProvider>> providers);
53 return ribonucleotides_.begin();
59 return ribonucleotides_.end();
95 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:89
std::vector< std::unique_ptr< Ribonucleotide > >::const_iterator ConstIterator
const iterator type definition
Definition RibonucleotideDB.h:33
RibonucleotideDB(const RibonucleotideDB &other)=delete
copy constructor not available
ConstRibonucleotidePtr getRibonucleotide(const std::string &code)
Get a ribonucleotide by its code (short name)
void loadFromProviders_(std::vector< std::unique_ptr< RibonucleotideDataProvider > > &providers)
load ribonucleotides from the given data providers
static RibonucleotideDB * getInstance()
replacement for constructor (singleton pattern)
ConstIterator end() const
Const iterator to end of database.
Definition RibonucleotideDB.h:57
std::unordered_map< std::string, Size > code_map_
mapping of codes (short names) to indexes into ribonucleotides_
Definition RibonucleotideDB.h:92
RibonucleotideDB & operator=(const RibonucleotideDB &other)=delete
assignment operator not available
Size max_code_length_
Definition RibonucleotideDB.h:97
ConstIterator begin() const
Const iterator to beginning of database.
Definition RibonucleotideDB.h:51
ConstRibonucleotidePtr getRibonucleotidePrefix(const std::string &seq)
Get the ribonucleotide with the longest code that matches a prefix of seq.
std::map< std::string, std::pair< ConstRibonucleotidePtr, ConstRibonucleotidePtr > > ambiguity_map_
mapping of ambiguity codes to the alternatives they represent
Definition RibonucleotideDB.h:95
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)
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