A library for working with phylogenetic and population genetic data.
v0.27.0
Sequence Class Reference

#include <genesis/sequence/sequence.hpp>

Detailed Description

Definition at line 40 of file sequence/sequence.hpp.

Public Member Functions

 Sequence ()=default
 
 Sequence (Sequence &&)=default
 
 Sequence (Sequence const &)=default
 
 Sequence (std::string const &label, std::string const &sites, size_t abundance=1)
 
 ~Sequence ()=default
 
size_t abundance () const
 
void abundance (size_t value)
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
void clear ()
 
iterator end ()
 
const_iterator end () const
 
std::string & label ()
 
std::string const & label () const
 
void label (std::string &&value)
 
void label (std::string const &value)
 
size_t length () const
 Return the length (number of sites) of this sequence. More...
 
Sequenceoperator= (Sequence &&)=default
 
Sequenceoperator= (Sequence const &)=default
 
char & operator[] (size_t index)
 
char operator[] (size_t index) const
 
std::vector< unsigned char > & phred_scores ()
 
std::vector< unsigned char > const & phred_scores () const
 
void phred_scores (std::vector< unsigned char > &&value)
 
void phred_scores (std::vector< unsigned char > const &value)
 
char & site_at (size_t index)
 
char site_at (size_t index) const
 
std::string & sites ()
 
std::string const & sites () const
 
void sites (std::string &&value)
 
void sites (std::string const &value)
 
size_t size () const
 Alias for length(). More...
 
void swap (Sequence &other)
 

Public Types

typedef std::string::const_iterator const_iterator
 
typedef std::string::iterator iterator
 

Constructor & Destructor Documentation

◆ Sequence() [1/4]

Sequence ( )
default

◆ Sequence() [2/4]

Sequence ( std::string const &  label,
std::string const &  sites,
size_t  abundance = 1 
)
inline

Definition at line 57 of file sequence/sequence.hpp.

◆ ~Sequence()

~Sequence ( )
default

◆ Sequence() [3/4]

Sequence ( Sequence const &  )
default

◆ Sequence() [4/4]

Sequence ( Sequence &&  )
default

Member Function Documentation

◆ abundance() [1/2]

size_t abundance ( ) const
inline

Definition at line 150 of file sequence/sequence.hpp.

◆ abundance() [2/2]

void abundance ( size_t  value)
inline

Definition at line 155 of file sequence/sequence.hpp.

◆ begin() [1/2]

iterator begin ( )
inline

Definition at line 204 of file sequence/sequence.hpp.

◆ begin() [2/2]

const_iterator begin ( ) const
inline

Definition at line 214 of file sequence/sequence.hpp.

◆ cbegin()

const_iterator cbegin ( ) const
inline

Definition at line 224 of file sequence/sequence.hpp.

◆ cend()

const_iterator cend ( ) const
inline

Definition at line 229 of file sequence/sequence.hpp.

◆ clear()

void clear ( )
inline

Definition at line 78 of file sequence/sequence.hpp.

◆ end() [1/2]

iterator end ( )
inline

Definition at line 209 of file sequence/sequence.hpp.

◆ end() [2/2]

const_iterator end ( ) const
inline

Definition at line 219 of file sequence/sequence.hpp.

◆ label() [1/4]

std::string& label ( )
inline

Definition at line 90 of file sequence/sequence.hpp.

◆ label() [2/4]

std::string const& label ( ) const
inline

Definition at line 95 of file sequence/sequence.hpp.

◆ label() [3/4]

void label ( std::string &&  value)
inline

Definition at line 105 of file sequence/sequence.hpp.

◆ label() [4/4]

void label ( std::string const &  value)
inline

Definition at line 100 of file sequence/sequence.hpp.

◆ length()

size_t length ( ) const
inline

Return the length (number of sites) of this sequence.

Definition at line 167 of file sequence/sequence.hpp.

◆ operator=() [1/2]

Sequence& operator= ( Sequence &&  )
default

◆ operator=() [2/2]

Sequence& operator= ( Sequence const &  )
default

◆ operator[]() [1/2]

char& operator[] ( size_t  index)
inline

Definition at line 190 of file sequence/sequence.hpp.

◆ operator[]() [2/2]

char operator[] ( size_t  index) const
inline

Definition at line 195 of file sequence/sequence.hpp.

◆ phred_scores() [1/4]

std::vector<unsigned char>& phred_scores ( )
inline

Definition at line 130 of file sequence/sequence.hpp.

◆ phred_scores() [2/4]

std::vector<unsigned char> const& phred_scores ( ) const
inline

Definition at line 135 of file sequence/sequence.hpp.

◆ phred_scores() [3/4]

void phred_scores ( std::vector< unsigned char > &&  value)
inline

Definition at line 145 of file sequence/sequence.hpp.

◆ phred_scores() [4/4]

void phred_scores ( std::vector< unsigned char > const &  value)
inline

Definition at line 140 of file sequence/sequence.hpp.

◆ site_at() [1/2]

char& site_at ( size_t  index)
inline

Definition at line 180 of file sequence/sequence.hpp.

◆ site_at() [2/2]

char site_at ( size_t  index) const
inline

Definition at line 185 of file sequence/sequence.hpp.

◆ sites() [1/4]

std::string& sites ( )
inline

Definition at line 110 of file sequence/sequence.hpp.

◆ sites() [2/4]

std::string const& sites ( ) const
inline

Definition at line 115 of file sequence/sequence.hpp.

◆ sites() [3/4]

void sites ( std::string &&  value)
inline

Definition at line 125 of file sequence/sequence.hpp.

◆ sites() [4/4]

void sites ( std::string const &  value)
inline

Definition at line 120 of file sequence/sequence.hpp.

◆ size()

size_t size ( ) const
inline

Alias for length().

Definition at line 175 of file sequence/sequence.hpp.

◆ swap()

void swap ( Sequence other)
inline

Definition at line 71 of file sequence/sequence.hpp.

Member Typedef Documentation

◆ const_iterator

typedef std::string::const_iterator const_iterator

Definition at line 49 of file sequence/sequence.hpp.

◆ iterator

typedef std::string::iterator iterator

Definition at line 48 of file sequence/sequence.hpp.


The documentation for this class was generated from the following file: