#include <Sequence/Clustalw.hpp>
Public Types | |
| typedef std::vector< T >::size_type | size_type |
| typedef std::vector< T >::reference | reference |
|
typedef std::vector< T > ::const_reference | const_reference |
| typedef std::vector< T >::iterator | iterator |
| typedef std::vector< T > ::const_iterator | const_iterator |
Public Member Functions | |
| ClustalW (const AlignStream< T > &a) | |
| std::istream & | read (std::istream &s) |
| std::ostream & | print (std::ostream &s) const |
| ClustalW< T > & | operator= (const AlignStream< T > &rhs) |
| size_type | size (void) const |
| reference | operator[] (const size_type &i) |
| const_reference | operator[] (const size_type &i) const |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| bool | IsAlignment (void) |
| bool | Gapped (void) |
| unsigned | UnGappedLength (void) |
| void | RemoveGaps (void) |
| void | RemoveTerminalGaps (void) |
| std::vector< T > | Trim (std::vector< int >sites) throw (Sequence::SeqException) |
| std::vector< T > | TrimComplement (std::vector< int >sites) throw (Sequence::SeqException) |
| const std::vector< T > | Data (void) |
| void | assign (const_iterator beg, const_iterator end) throw (Sequence::SeqException) |
ClustalW streams.
This class defines an input routine for alignments in ClustalW format. This class template can be instantiated with the following types:
Sequence::ClustalW< Sequence::Fasta >; //or anything derived from Sequence::Seq Sequence::ClustalW< std::pair<std::string, std::string> >;
//example: a std::pair<std::string,std::string> #include<utility> #include <string> #include <iostream> #include <Sequence/Clustalw.hpp> //using namespace std; using namespace Sequence; int main() { //instantiate the template ClustalW< std::pair<string,string> > x; //read in an object from stdin cin >> x; for (int i = 0 ; i < x.size() ; ++i) { //output each element in Fasta format //but without using Sequence::Fasta cout << '>' << x[i].first << '\n' << x[i].second << '\n'; } }
Definition at line 77 of file Clustalw.hpp.
typedef std::vector<T>::const_iterator Sequence::AlignStream< T >::const_iterator [inherited] |
value type is std::vector<T>::const_iterator
Definition at line 111 of file AlignStream.hpp.
typedef std::vector<T>::iterator Sequence::AlignStream< T >::iterator [inherited] |
value type is std::vector<T>::iterator
Definition at line 107 of file AlignStream.hpp.
| void Sequence::AlignStream< T >::assign | ( | const_iterator | beg, | |
| const_iterator | end | |||
| ) | throw (Sequence::SeqException) [inline, inherited] |
Assign data to object. Since the value type for these iterators evaluates to std::vector<T>::const_iterator, any vector<T> can be the data source
| Sequence::SeqException | is thrown if all data elements in the range (beg,end] are not of the same length |
store the data
Definition at line 45 of file AlignStream.tcc.
| const std::vector< T > Sequence::AlignStream< T >::Data | ( | void | ) | [inline, inherited] |
Returns the std::vector < T* > data
Definition at line 154 of file AlignStream.tcc.
| bool Sequence::AlignStream< T >::Gapped | ( | void | ) | [inline, inherited] |
Implemented by a call to Alignment::Gapped
Definition at line 98 of file AlignStream.tcc.
| bool Sequence::AlignStream< T >::IsAlignment | ( | void | ) | [inline, inherited] |
Implemented by a call to Alignment::IsAlignment
Definition at line 89 of file AlignStream.tcc.
| const_reference Sequence::AlignStream< T >::operator[] | ( | const size_type & | i | ) | const [inline, inherited] |
Returns the i-th object of type T in the vector data
Definition at line 96 of file AlignStream.hpp.
| reference Sequence::AlignStream< T >::operator[] | ( | const size_type & | i | ) | [inline, inherited] |
Returns the i-th object of type T in the vector data
Definition at line 88 of file AlignStream.hpp.
| std::ostream & Sequence::ClustalW< T >::print | ( | std::ostream & | s | ) | const [inline, virtual] |
To define a non-abstract AlignStream, print must be defined
Implements Sequence::AlignStream< T >.
Definition at line 117 of file Clustalw.tcc.
| std::istream & Sequence::ClustalW< T >::read | ( | std::istream & | s | ) | [inline, virtual] |
Calls to Sequence::operator>> into objects of type ClustalW<T> results in a call to this function, which reads the alignment in from the stream.
Implements Sequence::AlignStream< T >.
Definition at line 37 of file Clustalw.tcc.
| void Sequence::AlignStream< T >::RemoveGaps | ( | void | ) | [inline, inherited] |
Implemented by a call to Alignment::RemoveGaps
Definition at line 116 of file AlignStream.tcc.
| void Sequence::AlignStream< T >::RemoveTerminalGaps | ( | void | ) | [inline, inherited] |
Implemented by a call to Alignment::RemoveTerminalGaps
Definition at line 125 of file AlignStream.tcc.
| size_type Sequence::AlignStream< T >::size | ( | void | ) | const [inline, inherited] |
Returns data.size()
Definition at line 81 of file AlignStream.hpp.
| std::vector< T > Sequence::AlignStream< T >::Trim | ( | std::vector< int > | sites | ) | throw (Sequence::SeqException) [inline, inherited] |
Implemented by a call to Alignment::Trim
Definition at line 134 of file AlignStream.tcc.
| std::vector< T > Sequence::AlignStream< T >::TrimComplement | ( | std::vector< int > | sites | ) | throw (Sequence::SeqException) [inline, inherited] |
Implemented by a call to Alignment::TrimComplement
Definition at line 145 of file AlignStream.tcc.
| unsigned Sequence::AlignStream< T >::UnGappedLength | ( | void | ) | [inline, inherited] |
Implemented by a call to Alignment::UnGappedLength
Definition at line 107 of file AlignStream.tcc.
1.6.3