Functions |
| 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) throw (Sequence::SeqException) |
| 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) throw (Sequence::SeqException) |
| template<> |
| std::vector< std::string > | TrimComplement (const std::vector< std::string > &data, const std::vector< int > &sites) throw (Sequence::SeqException) |
| 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, unsigned n, std::istream &input_stream) |
| template<typename T > |
| void | EmptyVector (std::vector< T * > &seqarray) |
| 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) throw (Sequence::SeqException) |
| template<typename T > |
| std::vector< T > | TrimComplement (const std::vector< T > &data, const std::vector< int > &sites) throw (Sequence::SeqException) |
Routines fundamental to aligned data.
template<typename T >
| std::istream & Sequence::Alignment::GetData |
( |
std::vector< T > & |
seqarray, |
|
|
std::istream & |
input_stream | |
|
) |
| | [inline] |
Read objects of type T and put them into the vector seqarray. Note that seqarray is not const, so that's where the data go. This function is similar to GetData(vector<T> &seqarray, const char *infilename), except that it is passed a reference to an open input stream, such as a file stream, cin, etc.
- Parameters:
-
| seqarray | an empty vector<T> that you want filled |
| input_stream | name of istream from which fo fill seqarray |
Definition at line 94 of file Alignment.tcc.
template<typename T >
| std::istream & Sequence::Alignment::ReadNObjects |
( |
std::vector< T > & |
seqarray, |
|
|
unsigned |
n, |
|
|
std::istream & |
input_stream | |
|
) |
| | [inline] |
Read a fixed number n of objects of type T and put them into the vector seqarray. Note that seqarray is not const, so that's where the data go. This function is similar to GetData(vector<T> &seqarray, const char *infilename), except that it is passed a reference to an open input stream, such as a file stream, cin, etc.
- Parameters:
-
| seqarray | an empty vector<T> that you want filled |
| n | number of objects of type T to read |
| input_stream | name of istream from which fo fill seqarray |
- Note:
- the stream is not closed after each read of n records!!
Definition at line 120 of file Alignment.tcc.
template<typename T >
| std::vector< T > Sequence::Alignment::Trim |
( |
const std::vector< T > & |
data, |
|
|
const std::vector< int > & |
sites | |
|
) |
| | throw (Sequence::SeqException) [inline] |
Returns a copy of the data vector, modified in the following way. The sites vector contains an even number of sites (whose values are sorted). If sites does not contain an even number of values Sequence::SeqException is thrown. If sites is empty, Sequence::SeqException is thrown. The values in sites represent a series of intervals that you wish to keep, and the return vector is consists only of those--i.e. all positions not present in the intervals defined in sites are lost. For example, if you pass a vector<int> containing the values 0,10,21, and 30, then the data vector is modified so that positions 0 through 10 and 21 through 30 are all that remains. One intended use of this function is to pull, for example, the coding region out of an aligned block.
- Parameters:
-
| data | the original data |
| sites | vector<int> containing an even number of integers specifying the intervals of data to keep |
- Exceptions:
-
Definition at line 404 of file Alignment.tcc.
template<typename T >
| std::vector< T > Sequence::Alignment::TrimComplement |
( |
const std::vector< T > & |
data, |
|
|
const std::vector< int > & |
sites | |
|
) |
| | throw (Sequence::SeqException) [inline] |
Returns a copy the data vector, modified in the following way. The sites vector contains an even number of sites (whose values are sorted). If sites does not contain an even number of values Sequence::SeqException is thrown. If sites is empty, Sequence::SeqException is thrown. The values in sites represent a series of intervals that you wish to keep, and the return vector consists only of sites not present in sites--i.e. all positions not present in the intervals defined in sites are kept. For example, if you pass a vector<int> containing the values 0,10,21, and 30, then the data vector is modified so that positions 11 through 20 and 31 through the end of the sequences are all that remains.
- Parameters:
-
| data | the original data |
| sites | vector<int> containing an even number of integers specifying the intervals of data to throw away |
- Exceptions:
-
Definition at line 458 of file Alignment.tcc.