39 #include <unordered_map>
56 typedef std::vector<ConstRibonucleotidePtr>::const_iterator
ConstIterator;
73 return ribonucleotides_.begin();
79 return ribonucleotides_.end();
121 std::map<std::string, std::pair<ConstRibonucleotidePtr, ConstRibonucleotidePtr>>
ambiguity_map_;
Database of ribonucleotides (modified and unmodified)
Definition: RibonucleotideDB.h:51
RibonucleotideDB()
default constructor
static RibonucleotideDB * getInstance()
replacement for constructor (singleton pattern)
ConstRibonucleotidePtr parseRow_(const std::string &row, Size line_count)
create a (modified) nucleotide from an input row
std::pair< ConstRibonucleotidePtr, ConstRibonucleotidePtr > getRibonucleotideAlternatives(const std::string &code)
Get the alternatives for an ambiguous modification code.
RibonucleotideDB & operator=(const RibonucleotideDB &other)=delete
assignment operator not available
virtual ~RibonucleotideDB()
destructor
RibonucleotideDB(const RibonucleotideDB &other)=delete
copy constructor not available
ConstRibonucleotidePtr getRibonucleotide(const std::string &code)
Get a ribonucleotide by its code (short name)
ConstIterator end() const
Const iterator to end of database.
Definition: RibonucleotideDB.h:77
std::unordered_map< std::string, Size > code_map_
mapping of codes (short names) to indexes into ribonucleotides_
Definition: RibonucleotideDB.h:118
std::vector< ConstRibonucleotidePtr >::const_iterator ConstIterator
const iterator type definition
Definition: RibonucleotideDB.h:56
Size max_code_length_
Definition: RibonucleotideDB.h:123
ConstIterator begin() const
Const iterator to beginning of database.
Definition: RibonucleotideDB.h:71
ConstRibonucleotidePtr getRibonucleotidePrefix(const std::string &seq)
Get the ribonucleotide with the longest code that matches a prefix of seq.
void readFromFile_(const std::string &path)
read (modified) nucleotides from input file
std::map< std::string, std::pair< ConstRibonucleotidePtr, ConstRibonucleotidePtr > > ambiguity_map_
mapping of ambiguity codes to the alternatives they represent
Definition: RibonucleotideDB.h:121
std::vector< ConstRibonucleotidePtr > ribonucleotides_
list of known (modified) nucleotides
Definition: RibonucleotideDB.h:115
Representation of a ribonucleotide (modified or unmodified)
Definition: Ribonucleotide.h:52
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47