bpp-seq3  3.0.0
RNA.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_SEQ_ALPHABET_RNA_H
6 #define BPP_SEQ_ALPHABET_RNA_H
7 
8 
9 #include "NucleicAlphabet.h"
10 
11 // From the STL:
12 #include <string>
13 
14 namespace bpp
15 {
23 class RNA :
24  public NucleicAlphabet
25 {
26 public:
31  RNA(bool exclamationMarkCountsAsGap = false);
32 
33  RNA(const RNA& bia) : NucleicAlphabet(bia) {}
34 
35  RNA& operator=(const RNA& bia)
36  {
38  return *this;
39  }
40 
41  RNA* clone() const
42  {
43  return new RNA(*this);
44  }
45 
46  virtual ~RNA() {}
47 
48 public:
49  bool isResolvedIn(int state1, int state2) const;
50  std::vector<int> getAlias(int state) const;
51  std::vector<std::string> getAlias(const std::string& state) const;
52  int getGeneric(const std::vector<int>& states) const;
53  std::string getGeneric(const std::vector<std::string>& states) const;
54  std::string getAlphabetType() const { return "RNA"; }
55 };
56 } // end of namespace bpp.
57 #endif // BPP_SEQ_ALPHABET_RNA_H
The abstract base class for nucleic alphabets.
NucleicAlphabet & operator=(const NucleicAlphabet &bia)
This alphabet is used to deal with RNA sequences.
Definition: RNA.h:25
std::string getAlphabetType() const
Identification method.
Definition: RNA.h:54
int getGeneric(const std::vector< int > &states) const
Get the generic state that match a set of states.
Definition: RNA.cpp:122
bool isResolvedIn(int state1, int state2) const
Tells if a given (potentially unresolved) state can be resolved in another resolved state.
Definition: RNA.cpp:51
virtual ~RNA()
Definition: RNA.h:46
RNA * clone() const
Definition: RNA.h:41
RNA(const RNA &bia)
Definition: RNA.h:33
std::vector< int > getAlias(int state) const
Get all resolved states that match a generic state.
Definition: RNA.cpp:84
RNA & operator=(const RNA &bia)
Definition: RNA.h:35
RNA(bool exclamationMarkCountsAsGap=false)
Definition: RNA.cpp:19
This alphabet is used to deal NumericAlphabet.