libsequence
1.9.5
|
Abstract interface to sequence objects. More...
#include <Sequence/Seq.hpp>
Public Types | |
typedef std::string::iterator | iterator |
typedef std::string::const_iterator | const_iterator |
typedef std::string::reference | reference |
typedef std::string::const_reference | const_reference |
typedef std::string::size_type | size_type |
Public Member Functions | |
Seq (void) | |
template<typename T > | |
Seq (T &&name_, T &&seq_) | |
Seq (const char *n, const char *s) | |
Seq (const Seq &seq)=default | |
Seq (Seq &&seq)=default | |
std::string | GetName (void) const |
std::string | GetSeq (void) const |
std::string | substr (std::string::size_type beg, std::string::size_type len) const |
std::string | substr (std::string::size_type beg) const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
void | Revcom (void) |
void | Subseq (const unsigned &, const unsigned &) |
void | Complement (void) |
size_type | length (void) const |
size_type | size (void) const |
size_type | UngappedLength (void) const |
bool | IsGapped (void) const |
reference | operator[] (const size_type &i) |
const_reference | operator[] (const size_type &i) const |
bool | operator== (const Seq &rhs) const |
bool | operator!= (const Seq &rhs) const |
Seq & | operator= (const Seq &rhs)=default |
Seq & | operator= (Seq &&rhs)=default |
operator std::string () const | |
const char * | c_str (void) const |
virtual std::istream & | read (std::istream &s)=0 |
virtual std::ostream & | print (std::ostream &s) const =0 |
Public Attributes | |
std::string | name |
std::string | seq |
Abstract interface to sequence objects.
Abstract interface to sequence objects. A sequence consists of a name and a sequence, both of which are stored as C++ std::strings. Most of the rest of the member functions of this class are to make the behavior of Sequence::Seq more "std::string"-like.
typedef std::string::const_iterator Sequence::Seq::const_iterator |
typedef std::string::iterator Sequence::Seq::iterator |
Seq::iterator Sequence::Seq::begin | ( | ) |
Seq::const_iterator Sequence::Seq::begin | ( | ) | const |
const char * Sequence::Seq::c_str | ( | void | ) | const |
Seq::const_iterator Sequence::Seq::cbegin | ( | ) | const |
Seq::const_iterator Sequence::Seq::cend | ( | ) | const |
void Sequence::Seq::Complement | ( | void | ) |
Seq::iterator Sequence::Seq::end | ( | ) |
Seq::const_iterator Sequence::Seq::end | ( | ) | const |
std::string Sequence::Seq::GetName | ( | void | ) | const |
std::string Sequence::Seq::GetSeq | ( | void | ) | const |
bool Sequence::Seq::IsGapped | ( | void | ) | const |
Seq::size_type Sequence::Seq::length | ( | void | ) | const |
Sequence::Seq::operator std::string | ( | ) | const |
bool Sequence::Seq::operator!= | ( | const Seq & | rhs | ) | const |
bool Sequence::Seq::operator== | ( | const Seq & | rhs | ) | const |
Seq::reference Sequence::Seq::operator[] | ( | const size_type & | i | ) |
Seq::const_reference Sequence::Seq::operator[] | ( | const size_type & | i | ) | const |
|
pure virtual |
read an object of type Sequence::Seq from an istream
Implemented in Sequence::Fasta, and Sequence::fastq.
|
pure virtual |
read an object of type Sequence::Seq from an istream
Implemented in Sequence::Fasta, and Sequence::fastq.
void Sequence::Seq::Revcom | ( | void | ) |
Seq::size_type Sequence::Seq::size | ( | void | ) | const |
void Sequence::Seq::Subseq | ( | const unsigned & | beg, |
const unsigned & | length | ||
) |
beg | the index along the sequence at which the substring begins |
length | the length of the subseq Acts via std::string.substr(). Note that this modifies the data in the object by changing thestd::string–if you want to keep the original sequence, you need to make a copy of the object first. |
std::string Sequence::Seq::substr | ( | std::string::size_type | beg, |
std::string::size_type | len | ||
) | const |
Mimics the std::string member function of the same name.
std::string Sequence::Seq::substr | ( | std::string::size_type | beg | ) | const |
Mimics the standardstd::string member function of the same name.
Seq::size_type Sequence::Seq::UngappedLength | ( | void | ) | const |