|
bpp-seq
2.1.0
|
Partial implementation of the IAlignment interface, dedicated to alignment readers. More...
#include <Bpp/Seq/Io/AbstractIAlignment.h>
Inheritance diagram for bpp::AbstractIAlignment:
Collaboration diagram for bpp::AbstractIAlignment:Public Member Functions | |
| AbstractIAlignment () | |
| virtual | ~AbstractIAlignment () |
| const std::string | getDataType () const |
| virtual const std::string | getFormatName () const =0 |
| virtual const std::string | getFormatDescription () const =0 |
IAlignment methods: | |
| virtual void | readAlignment (std::istream &input, SiteContainer &sc) const throw (Exception) |
| Add sequences to a container from a stream. | |
| virtual void | readAlignment (const std::string &path, SiteContainer &sc) const throw (Exception) |
| Add sequences to a container from a file. | |
| virtual AlignedSequenceContainer * | readAlignment (const std::string &path, const Alphabet *alpha) const throw (Exception) |
| Create a new container from a file. | |
| virtual AlignedSequenceContainer * | readAlignment (std::istream &input, const Alphabet *alpha) const throw (Exception) |
| Create a new container from a stream. | |
Protected Member Functions | |
| virtual void | appendAlignmentFromStream (std::istream &input, SiteContainer &sc) const =0 throw (Exception) |
| Append sequences to a container from a stream. | |
| virtual void | appendAlignmentFromFile (const std::string &path, SiteContainer &sc) const throw (Exception) |
| Append sequences to a container from a file. | |
| virtual AlignedSequenceContainer * | readAlignmentFromStream (std::istream &input, const Alphabet *alpha) const throw (Exception) |
| Read sequences from a stream. | |
| virtual AlignedSequenceContainer * | readAlignmentFromFile (const std::string &path, const Alphabet *alpha) const throw (Exception) |
| Read sequences from a file. | |
Partial implementation of the IAlignment interface, dedicated to alignment readers.
Definition at line 58 of file AbstractIAlignment.h.
| bpp::AbstractIAlignment::AbstractIAlignment | ( | ) | [inline] |
Definition at line 63 of file AbstractIAlignment.h.
| virtual bpp::AbstractIAlignment::~AbstractIAlignment | ( | ) | [inline, virtual] |
Definition at line 64 of file AbstractIAlignment.h.
| virtual void bpp::AbstractIAlignment::appendAlignmentFromFile | ( | const std::string & | path, |
| SiteContainer & | sc | ||
| ) | const throw (Exception) [inline, protected, virtual] |
Append sequences to a container from a file.
| path | The path to the file to read. |
| sc | The sequence container to update. |
| Exception | If the file is not in the specified format. |
Definition at line 143 of file AbstractIAlignment.h.
References appendAlignmentFromStream().
Referenced by readAlignment(), and readAlignmentFromFile().
| virtual void bpp::AbstractIAlignment::appendAlignmentFromStream | ( | std::istream & | input, |
| SiteContainer & | sc | ||
| ) | const throw (Exception) [protected, pure virtual] |
Append sequences to a container from a stream.
This is the unique method to implement!
| input | The input stream to read. |
| sc | The sequence container to update. |
| Exception | If the file is not in the specified format. |
Implemented in bpp::Mase, bpp::Phylip, bpp::Fasta, bpp::NexusIOSequence, bpp::Clustal, and bpp::DCSE.
Referenced by appendAlignmentFromFile(), readAlignment(), and readAlignmentFromStream().
| const std::string bpp::IOSequence::getDataType | ( | ) | const [inline, virtual, inherited] |
Implements bpp::IOFormat.
Definition at line 65 of file IoSequence.h.
| virtual void bpp::AbstractIAlignment::readAlignment | ( | std::istream & | input, |
| SiteContainer & | sc | ||
| ) | const throw (Exception) [inline, virtual] |
Add sequences to a container from a stream.
| input | The input stream to read. |
| sc | The sequence container to update. |
| Exception | If the file is not in the specified format. |
Definition at line 81 of file AbstractIAlignment.h.
References appendAlignmentFromStream().
Referenced by bpp::DCSE::readSequences(), bpp::Clustal::readSequences(), bpp::NexusIOSequence::readSequences(), and bpp::Phylip::readSequences().
| virtual void bpp::AbstractIAlignment::readAlignment | ( | const std::string & | path, |
| SiteContainer & | sc | ||
| ) | const throw (Exception) [inline, virtual] |
Add sequences to a container from a file.
| path | The path to the file to read. |
| sc | The sequence container to update. |
| Exception | If the file is not in the specified format. |
Definition at line 93 of file AbstractIAlignment.h.
References appendAlignmentFromFile().
| virtual AlignedSequenceContainer* bpp::AbstractIAlignment::readAlignment | ( | const std::string & | path, |
| const Alphabet * | alpha | ||
| ) | const throw (Exception) [inline, virtual] |
Create a new container from a file.
| path | The path to the file to read. |
| alpha | The alphabet to be associated to the container. |
| Exception | If the file is not in the specified format. |
Implements bpp::IAlignment.
Definition at line 104 of file AbstractIAlignment.h.
References readAlignmentFromFile().
| virtual AlignedSequenceContainer* bpp::AbstractIAlignment::readAlignment | ( | std::istream & | input, |
| const Alphabet * | alpha | ||
| ) | const throw (Exception) [inline, virtual] |
Create a new container from a stream.
| input | The input stream to read. |
| alpha | The alphabet to be associated to the container. |
| Exception | If the file is not in the specified format. |
Implements bpp::IAlignment.
Definition at line 115 of file AbstractIAlignment.h.
References readAlignmentFromStream().
| virtual AlignedSequenceContainer* bpp::AbstractIAlignment::readAlignmentFromFile | ( | const std::string & | path, |
| const Alphabet * | alpha | ||
| ) | const throw (Exception) [inline, protected, virtual] |
Read sequences from a file.
| path | The path to the file to read. |
| alpha | The alphabet to use. |
| Exception | If the file is not in the specified format. |
Definition at line 173 of file AbstractIAlignment.h.
References appendAlignmentFromFile().
Referenced by readAlignment().
| virtual AlignedSequenceContainer* bpp::AbstractIAlignment::readAlignmentFromStream | ( | std::istream & | input, |
| const Alphabet * | alpha | ||
| ) | const throw (Exception) [inline, protected, virtual] |
Read sequences from a stream.
| input | The input stream to read. |
| alpha | The alphabet to use. |
| Exception | If the file is not in the specified format. |
Definition at line 158 of file AbstractIAlignment.h.
References appendAlignmentFromStream().
Referenced by readAlignment().