libsequence
1.9.5
|
Representation and manipulation of variation data. More...
Classes | |
struct | Sequence::col_view_iterator< POINTER > |
Iterator for column views. More... | |
struct | Sequence::internal::row_view_< T > |
Implementation details for Sequence::RowView and Sequence::ConstRowView. More... | |
struct | Sequence::internal::col_view_< T > |
Implementation details for Sequence::ColView and Sequence::ConstColView. More... | |
struct | Sequence::StateCounts |
Track character state occurrence at a site in a VariantMatrix. More... | |
class | Sequence::VariantMatrix |
Matrix representation of variation data. More... | |
Typedefs | |
using | Sequence::RowView = internal::row_view_< std::int8_t * > |
View of a VariantMatrix row (a variable site) | |
using | Sequence::ConstRowView = internal::row_view_< const std::int8_t * > |
Const view of a VariantMatrix row (a variable site) | |
using | Sequence::ColView = internal::col_view_< std::int8_t * > |
View of a VariantMatrix column ("haplotype") | |
using | Sequence::ConstColView = internal::col_view_< const std::int8_t * > |
Const view of a VariantMatrix column ("haplotype") | |
Functions | |
template<typename POINTER > | |
col_view_iterator< POINTER > | Sequence::operator+ (col_view_iterator< POINTER > i, typename col_view_iterator< POINTER >::difference_type d) |
template<typename POINTER > | |
col_view_iterator< POINTER > | Sequence::operator+ (typename col_view_iterator< POINTER >::difference_type d, col_view_iterator< POINTER > i) |
template<typename POINTER > | |
col_view_iterator< POINTER > & | Sequence::operator++ (col_view_iterator< POINTER > &i) |
template<typename POINTER > | |
col_view_iterator< POINTER > | Sequence::operator- (col_view_iterator< POINTER > i, typename col_view_iterator< POINTER >::difference_type d) |
template<typename POINTER > | |
col_view_iterator< POINTER > | Sequence::operator- (typename col_view_iterator< POINTER >::difference_type d, col_view_iterator< POINTER > i) |
template<typename POINTER > | |
col_view_iterator< POINTER > & | Sequence::operator-- (col_view_iterator< POINTER > &i) |
template<typename POINTER > | |
col_view_iterator< POINTER > & | Sequence::operator+= (col_view_iterator< POINTER > &i, typename col_view_iterator< POINTER >::difference_type d) |
template<typename POINTER > | |
col_view_iterator< POINTER > & | Sequence::operator-= (col_view_iterator< POINTER > &i, typename col_view_iterator< POINTER >::difference_type d) |
template<typename POINTER > | |
col_view_iterator< POINTER >::difference_type | Sequence::operator- (col_view_iterator< POINTER > i, col_view_iterator< POINTER > j) |
std::vector< StateCounts > | Sequence::process_variable_sites (const VariantMatrix &m, const std::vector< std::int8_t > &refstates) |
std::vector< StateCounts > | Sequence::process_variable_sites (const VariantMatrix &m, const std::int8_t refstate) |
std::vector< StateCounts > | Sequence::process_variable_sites (const VariantMatrix &m) |
template<typename streamtype > | |
VariantMatrix | Sequence::from_msformat (streamtype &input_stream) |
Create VariantMatrix from "ms"-like input format. More... | |
template<typename output_stream > | |
void | Sequence::to_msformat (const VariantMatrix &m, output_stream &o) |
Write VariantMatrix in "ms" format. More... | |
ConstRowView | Sequence::get_RowView (const VariantMatrix &m, const std::size_t row) |
Return a ConstRowView from VariantMatrix m at row row . std::out_of_range is thrown if row is out of range. | |
RowView | Sequence::get_RowView (VariantMatrix &m, const std::size_t row) |
ConstRowView | Sequence::get_ConstRowView (const VariantMatrix &m, const std::size_t row) |
Return a ConstRowView from VariantMatrix m at row row . std::out_of_range is thrown if row is out of range. | |
ConstRowView | Sequence::get_ConstRowView (VariantMatrix &m, const std::size_t row) |
Return a ConstRowView from VariantMatrix m at row row . std::out_of_range is thrown if row is out of range. | |
ColView | Sequence::get_ColView (VariantMatrix &m, const std::size_t col) |
Return a ColView from VariantMatrix m at col col . std::out_of_range is thcoln if col is out of range. | |
ConstColView | Sequence::get_ColView (const VariantMatrix &m, const std::size_t col) |
Return a ConstColView from VariantMatrix m at col col . std::out_of_range is thcoln if col is out of range. | |
ConstColView | Sequence::get_ConstColView (VariantMatrix &m, const std::size_t col) |
Return a ConstColView from VariantMatrix m at col col . std::out_of_range is thcoln if col is out of range. | |
ConstColView | Sequence::get_ConstColView (const VariantMatrix &m, const std::size_t col) |
Return a ConstColView from VariantMatrix m at col col . std::out_of_range is thcoln if col is out of range. | |
Representation and manipulation of variation data.
|
inline |
Create VariantMatrix from "ms"-like input format.
input_stream | A model of std::istream |
See ms_to_VariantMatrix.cc for example.
Definition at line 20 of file msformat.hpp.
RowView Sequence::get_RowView | ( | VariantMatrix & | m, |
const std::size_t | row | ||
) |
Return a RowView from VariantMatrix m
at row row
. std::out_of_range is thrown if row
is out of range.
Definition at line 38 of file VariantMatrixViews.cc.
|
inline |
Add to an iterator
Definition at line 113 of file col_view_iterator.hpp.
|
inline |
Add to an iterator
Definition at line 125 of file col_view_iterator.hpp.
|
inline |
Increment an iterator by one
Definition at line 135 of file col_view_iterator.hpp.
|
inline |
Increment an iterator
Definition at line 177 of file col_view_iterator.hpp.
|
inline |
Subtract from an iterator
Definition at line 145 of file col_view_iterator.hpp.
|
inline |
Subtract from an iterator
Definition at line 157 of file col_view_iterator.hpp.
|
inline |
Distance between two iterators
Definition at line 199 of file col_view_iterator.hpp.
|
inline |
Decrement iterator by one
Definition at line 167 of file col_view_iterator.hpp.
|
inline |
Decrement an iterator
Definition at line 188 of file col_view_iterator.hpp.
std::vector< StateCounts > Sequence::process_variable_sites | ( | const VariantMatrix & | m, |
const std::vector< std::int8_t > & | refstates | ||
) |
Create a vector of StateCounts from a VariantMatrix. If refstates
is not empty and differs in length from m.nsites
, then std::invalid_argument
is thrown.
Definition at line 68 of file StateCounts.cc.
std::vector< StateCounts > Sequence::process_variable_sites | ( | const VariantMatrix & | m, |
const std::int8_t | refstate | ||
) |
Create a vector of StateCounts with a specific reference state used for all sites
Definition at line 94 of file StateCounts.cc.
std::vector< StateCounts > Sequence::process_variable_sites | ( | const VariantMatrix & | m | ) |
Create a vector of StateCounts with a reference state of -1 used for all sites
Definition at line 113 of file StateCounts.cc.
|
inline |
Write VariantMatrix in "ms" format.
m | A VariantMatrix |
o | A model of std::ostream |
See ms_to_VariantMatrix.cc for example.
Definition at line 62 of file msformat.hpp.