ppALIGN API documentation
Sequence Class Reference
#include <sequence.hpp>
Classes | |
| class | ParseError |
Public Types | |
| typedef std::vector< int > | parent_t |
Public Member Functions | |
| const Alphabet & | GetAlphabet () const |
| Sequence & | operator+= (const char ch) |
| void | Append (const char *str, int len) |
| Sequence & | operator/= (int mask) |
| Sequence | operator/ (int mask) const |
| bool | CString (char *str, int max_length) const |
constructors | |
| Sequence (const Alphabet &a) | |
| Sequence (const Sequence &seq) | |
| Sequence (const Alphabet &a, const std::string &str) | |
| Sequence (const Alphabet &a, const_iterator begin, const_iterator end) | |
| Sequence (const Alphabet &a, const char *str) | |
| Sequence (const Alphabet &a, char c) | |
assignment operators | |
| Sequence & | operator= (const char *str) |
| Sequence & | operator= (const std::string &str) |
| Sequence & | operator= (const Sequence &seq) |
| Sequence & | operator+= (const char *str) |
| Sequence & | operator+= (const std::string &str) |
| Sequence & | operator+= (const Sequence &seq) |
| Sequence & | operator+= (const int i) |
| Sequence & | operator+= (const unsigned int i) |
Friends | |
| bool | operator== (const Sequence &a, const Sequence &b) |
| bool | operator== (char a, const Sequence &b) |
| bool | operator== (const std::string &a, const Sequence &b) |
| bool | operator== (int a, const Sequence &b) |
| bool | operator== (unsigned int a, const Sequence &b) |
| bool | operator== (const Sequence &a, char b) |
| bool | operator== (const Sequence &a, const std::string &b) |
| bool | operator== (const Sequence &a, int b) |
| bool | operator== (const Sequence &a, unsigned int b) |
| bool | operator!= (const Sequence &a, const Sequence &b) |
| bool | operator!= (char a, const Sequence &b) |
| bool | operator!= (const std::string &a, const Sequence &b) |
| bool | operator!= (int a, const Sequence &b) |
| bool | operator!= (unsigned int a, const Sequence &b) |
| bool | operator!= (const Sequence &a, char b) |
| bool | operator!= (const Sequence &a, const std::string &b) |
| bool | operator!= (const Sequence &a, int b) |
| bool | operator!= (const Sequence &a, unsigned int b) |
| std::ostream & | operator<< (std::ostream &ost, const Sequence &s) |
| std::istream & | operator>> (std::istream &ist, Sequence &s) |
concatenation operators | |
| Sequence | operator+ (const Sequence &a, const Sequence &b) |
| Sequence | operator+ (char a, const Sequence &b) |
| Sequence | operator+ (const std::string &a, const Sequence &b) |
| Sequence | operator+ (int a, const Sequence &b) |
| Sequence | operator+ (unsigned int a, const Sequence &b) |
| Sequence | operator+ (const Sequence &a, char b) |
| Sequence | operator+ (const Sequence &a, const std::string &b) |
| Sequence | operator+ (const Sequence &a, int b) |
| Sequence | operator+ (const Sequence &a, unsigned int b) |
Detailed Description
class for molecular sequences. One can use the + and += operators in a natural way. When a character does not fit into the provided alphabet an exception is thrown. Sequence::operator/ and Sequence::operator/= can be used to resrict the sequence on a subalphabet
Definition at line 38 of file sequence.hpp.
Constructor & Destructor Documentation
| Sequence::Sequence | ( | const Alphabet & | a | ) | [inline] |
construct an empty sequence over alphabet a.
Definition at line 68 of file sequence.hpp.
Member Function Documentation
| void Sequence::Append | ( | const char * | str, | |
| int | len | |||
| ) |
Encode a string of length l and append the sequence.
- Parameters:
-
str input string len number of characters to be read
| bool Sequence::CString | ( | char * | str, | |
| int | max_length | |||
| ) | const |
convert the sequence into a c-string.
- Parameters:
-
str max_length (max. length of str, including the termination charakter), to copy the complete sequence at least size()+1 bytes have to be allocated
- Returns:
- true if the complete sequence was copied
| Sequence& Sequence::operator+= | ( | const char | ch | ) | [inline] |
Encode letter and add it to the sequence
Definition at line 142 of file sequence.hpp.
| Sequence Sequence::operator/ | ( | int | mask | ) | const [inline] |
Restrict the sequence to a subalphabet The sub-alphabet is given a or'ed combination of SubAlphabetMask
- Remarks:
- is slower than Restrict(int mask,self_t & s) const;
- Parameters:
-
mask or encoded subalphabet combination
Definition at line 273 of file sequence.hpp.
| Sequence& Sequence::operator/= | ( | int | mask | ) | [inline] |
Restrict the sequence to a subalphabet The sub-alphabet is given a or'ed combination of SubAlphabetMask
- Parameters:
-
mask or encoded subalphabet combination
Definition at line 253 of file sequence.hpp.
The documentation for this class was generated from the following file:
- src/sequence.hpp