#include <Nucleotide.h>
Public Member Functions | |
Nucleotide () | |
Create a nucleotide with value Nucleotide::N (any). | |
Nucleotide (char c) throw (ParseException) | |
Create a nucleotide by parsing a character. | |
char | toChar () const |
Get the uppercase character representation for this nucleotide. | |
int | intRep () const |
Get the internal representation. | |
bool | operator== (const Nucleotide &other) const |
Are two nucleotides identical ? | |
bool | operator!= (const Nucleotide &other) const |
Are two nucleotides different ? | |
bool | isAmbiguity () const |
Is the nucleotide ambiguous ? Only A,C,G,T are considered non-ambiguous. | |
void | sampleAmbiguity () |
Replace the (ambiguos) nucleotide with a random non-ambigiuos nucleotide that is represented by the ambiguity symbol. | |
void | nonAmbiguousNucleotides (std::vector< Nucleotide > &result) const |
Get all non ambiguous nucleotides represented by this nucleotide. | |
bool | operator< (const Nucleotide other) const |
So that you can use it as a key for STL containers. | |
Static Public Member Functions | |
static Nucleotide | fromRep (int rep) |
Create a nucleotide using the internal representation directly. | |
Static Public Attributes | |
Constants used in the internal representation. | |
| |
static const int | NT_A = 0 |
static const int | NT_C = 1 |
static const int | NT_G = 2 |
static const int | NT_T = 3 |
static const int | NT_M = 4 |
static const int | NT_R = 5 |
static const int | NT_W = 6 |
static const int | NT_S = 7 |
static const int | NT_Y = 8 |
static const int | NT_K = 9 |
static const int | NT_V = 10 |
static const int | NT_H = 11 |
static const int | NT_D = 12 |
static const int | NT_B = 13 |
static const int | NT_N = 14 |
static const int | NT_GAP = 15 |
Nucleotide constants. | |
static const Nucleotide | A |
static const Nucleotide | C |
static const Nucleotide | G |
static const Nucleotide | T |
static const Nucleotide | M |
static const Nucleotide | R |
static const Nucleotide | W |
static const Nucleotide | S |
static const Nucleotide | Y |
static const Nucleotide | K |
static const Nucleotide | V |
static const Nucleotide | H |
static const Nucleotide | D |
static const Nucleotide | B |
static const Nucleotide | N |
static const Nucleotide | GAP |
The nucleotide is represented internally using an integer representation. This may be helpful for e.g. indexing into a table. Therefore, it is possible to both retrieve this internal representation with intRep() and construct a Nucleotide from an internal representation directly with fromRep(int).
|
Create a nucleotide with value Nucleotide::N (any).
|
|
Create a nucleotide by parsing a character. Accepted are the characters from the FASTA file definition.
|
|
Create a nucleotide using the internal representation directly. Only valid representations are accepted, see the NT_* constants. Illegal representations are fenced off by an assert() statement.
|
|
Get the internal representation.
|
|
Is the nucleotide ambiguous ? Only A,C,G,T are considered non-ambiguous.
|
|
Get all non ambiguous nucleotides represented by this nucleotide.
|
|
Are two nucleotides different ?
|
|
So that you can use it as a key for STL containers.
|
|
Are two nucleotides identical ?
|
|
Replace the (ambiguos) nucleotide with a random non-ambigiuos nucleotide that is represented by the ambiguity symbol.
|
|
Get the uppercase character representation for this nucleotide.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|