libsequence  1.9.5
Sequence::Alignment Namespace Reference

Routines fundamental to aligned data. More...

Functions

template<typename T >
void GetData (std::vector< T > &seqarray, const char *infilename)
 
template<typename T >
std::istream & GetData (std::vector< T > &seqarray, std::istream &input_stream)
 
template<typename T >
std::istream & ReadNObjects (std::vector< T > &seqarray, const unsigned &n, std::istream &input_stream)
 
template<typename T >
bool Gapped (const std::vector< T > &data)
 
template<typename T >
bool IsAlignment (const std::vector< T > &data)
 
template<typename Iterator >
bool validForPolyAnalysis (Iterator beg, Iterator end)
 
template<typename T >
unsigned UnGappedLength (const std::vector< T > &data)
 
template<typename T >
void RemoveGaps (std::vector< T > &data)
 
template<typename T >
void RemoveTerminalGaps (std::vector< T > &data)
 
template<typename T >
void RemoveFixedOutgroupInsertions (std::vector< T > &data, unsigned site, const unsigned &ref)
 
template<typename T >
std::vector< T > Trim (const std::vector< T > &data, const std::vector< int > &sites)
 
template<typename T >
std::vector< T > TrimComplement (const std::vector< T > &data, const std::vector< int > &sites)
 
template<>
bool Gapped (const std::vector< std::string > &data)
 
template<>
bool IsAlignment (const std::vector< std::string > &data)
 
template<>
bool validForPolyAnalysis (std::vector< std::string >::const_iterator beg, std::vector< std::string >::const_iterator end)
 
template<>
bool validForPolyAnalysis (std::vector< std::string >::iterator beg, std::vector< std::string >::iterator end)
 
template<>
unsigned UnGappedLength (const std::vector< std::string > &data)
 
template<>
void RemoveGaps (std::vector< std::string > &data)
 
template<>
void RemoveTerminalGaps (std::vector< std::string > &data)
 
template<>
void RemoveFixedOutgroupInsertions (std::vector< std::string > &data, unsigned site, const unsigned &ref)
 
template<>
std::vector< std::string > Trim (const std::vector< std::string > &data, const std::vector< int > &sites)
 
template<>
std::vector< std::string > TrimComplement (const std::vector< std::string > &data, const std::vector< int > &sites)
 

Detailed Description

Routines fundamental to aligned data.

#include<Sequence/Alignment.hpp>
This namespace defines a series of template routines used for manipulating aligned sequence data. The routines may be used on their own, and are also the building blocks for alignment I/O as defined in Sequence::AlignStream.

Note
Valid types for instantiation of these templates are the following: std::pair<std::string,std::string>, or anything derived from there, which include Sequence::Seq, etc. This requirment is checked at compile time via compile-time assertions using the static_assert function. There are also specializations such that std::string is also a valid type.

Function Documentation

◆ Gapped()

template<>
bool Sequence::Alignment::Gapped ( const std::vector< std::string > &  data)

specialization for std::string

Definition at line 35 of file Specializations.cc.

◆ IsAlignment()

template<>
bool Sequence::Alignment::IsAlignment ( const std::vector< std::string > &  data)

specialization for std::string

Definition at line 50 of file Specializations.cc.

◆ RemoveGaps()

template<>
void Sequence::Alignment::RemoveGaps ( std::vector< std::string > &  data)

a specialization for std::string

Definition at line 128 of file Specializations.cc.

◆ RemoveTerminalGaps()

template<>
void Sequence::Alignment::RemoveTerminalGaps ( std::vector< std::string > &  data)

a specialization for std::string

Definition at line 159 of file Specializations.cc.

◆ Trim()

template<>
std::vector< std::string > Sequence::Alignment::Trim ( const std::vector< std::string > &  data,
const std::vector< int > &  sites 
)

a specialization for std::string

Definition at line 241 of file Specializations.cc.

◆ TrimComplement()

template<>
std::vector< std::string > Sequence::Alignment::TrimComplement ( const std::vector< std::string > &  data,
const std::vector< int > &  sites 
)

a specialization for std::string

Definition at line 276 of file Specializations.cc.

◆ UnGappedLength()

template<>
unsigned Sequence::Alignment::UnGappedLength ( const std::vector< std::string > &  data)

specialization for std::string

Definition at line 100 of file Specializations.cc.

◆ validForPolyAnalysis()

template<>
bool Sequence::Alignment::validForPolyAnalysis ( std::vector< std::string >::const_iterator  beg,
std::vector< std::string >::const_iterator  end 
)

specialization for std::string

Definition at line 63 of file Specializations.cc.