yat
0.14.5pre
|
#include <yat/omic/DNA.h>
Public Member Functions | |
DNA (void) | |
Default Constructor. More... | |
DNA (const DNA &) | |
Copy Constructor. | |
DNA (char c) | |
DNA | complement (void) const |
char | get (void) const |
DNA & | operator&= (const DNA &rhs) |
DNA & | operator|= (const DNA &rhs) |
DNA & | operator^= (const DNA &rhs) |
DNA & | operator= (char c) |
assign from a char More... | |
Friends | |
bool | operator== (const DNA &, const DNA &) |
Related Functions | |
(Note that these are not member functions.) | |
std::string | expand (const DNA &) |
bool | operator== (const DNA &lhs, const DNA &rhs) |
std::ostream & | operator<< (std::ostream &os, const DNA &dna) |
Class for DNA e.g. A, C, G, or T. Nucleotides can be overloaded e.g. 'A' | 'G' == 'R'. Null object (opposite to 'N') is denoted by space, ' '.
A | A |
T | T |
G | G |
C | C |
R | G or A |
Y | T or C |
M | A or C |
K | G or T |
S | G or C |
W | A or T |
H | A or C or T |
B | G or T or C |
V | G or C or A |
D | G or T or A |
N | A or C or T or G |
' ' | none |
theplu::yat::omic::DNA::DNA | ( | void | ) |
Default Constructor.
Equivalent to DNA(' ').
|
explicit |
c | must be one of the following 16 characters, A, C, G, T, M, R, W, S, Y, K, B, D, H, V, N, or ' '. |
std::invalid_argument | if c is not one of 16 allowed characters |
DNA theplu::yat::omic::DNA::complement | ( | void | ) | const |
Calculates complement, i.e., 'A' becomes 'T' and 'G' becomes 'C' etc. In case of combination the returned DNA will be the combination of all complements, i.e., 'R' becomes 'Y.
char theplu::yat::omic::DNA::get | ( | void | ) | const |
Modifies lhs and keeps those bases present on both sides, i.e., if lhs, for example, is 'R' and rhs is 'M' the overlap is 'A' so resulting lhs will be an 'A'.
As DNA inherits boost::operators<DNA> corresponding operator&(const DNA&, const DNA&) is also available.
DNA& theplu::yat::omic::DNA::operator= | ( | char | c | ) |
Modifies lhs to a combination of bases that are present on one side (not both). If, for example, lhs is 'M' and rhs is 'A', resulting lhs will be 'C'.
As DNA inherits boost::operators<DNA> corresponding operator^(const DNA&, const DNA&) is also available.
Modifies lhs to a combination of bases present on either side. If, for example, lhs is 'A' and rhs is 'C', resuting lhs will be 'M'.
As DNA inherits boost::operators<DNA> corresponding operator|(const DNA&, const DNA&) is also available.
|
related |
|
related |