bpp-seq3  3.0.0
bpp::AbstractIProbabilisticAlignment2 Class Referenceabstract

#include <Bpp/Seq/Io/AbstractIAlignment.h>

+ Inheritance diagram for bpp::AbstractIProbabilisticAlignment2:
+ Collaboration diagram for bpp::AbstractIProbabilisticAlignment2:

Public Member Functions

 AbstractIProbabilisticAlignment2 ()
 
virtual ~AbstractIProbabilisticAlignment2 ()
 
const std::string getDataType () const
 
virtual const std::string getFormatName () const=0
 
virtual const std::string getFormatDescription () const=0
 
The IProbabilisticSequence interface.

As a ProbabilisticSiteContainer is a subclass of ProbabilisticSequenceContainer, we hereby implement the IProbabilisticSequence interface by downcasting the interface.

void readSequences (std::istream &input, ProbabilisticSequenceContainerInterface &sc) const override
 Create a new container from a stream. More...
 
void readSequences (const std::string &path, ProbabilisticSequenceContainerInterface &sc) const override
 Create a new container from a file. More...
 
std::unique_ptr< ProbabilisticSequenceContainerInterfacereadSequences (std::istream &input, std::shared_ptr< const Alphabet > alpha) const override
 Create a new container from a stream. More...
 
std::unique_ptr< ProbabilisticSequenceContainerInterfacereadSequences (const std::string &path, std::shared_ptr< const Alphabet > alpha) const override
 Create a new container from a file. More...
 
IProbabilisticAlignment methods:
void readAlignment (std::istream &input, ProbabilisticSequenceContainerInterface &sc) const override
 Add sequences to a container from a stream. More...
 
void readAlignment (const std::string &path, ProbabilisticSequenceContainerInterface &sc) const override
 Add sequences to a container from a file. More...
 
std::unique_ptr< ProbabilisticSiteContainerInterfacereadAlignment (const std::string &path, std::shared_ptr< const Alphabet > alpha) const override
 Create a new container from a file. More...
 
std::unique_ptr< ProbabilisticSiteContainerInterfacereadAlignment (std::istream &input, std::shared_ptr< const Alphabet > alpha) const override
 Create a new container from a stream. More...
 

Protected Member Functions

virtual void appendAlignmentFromStream (std::istream &input, ProbabilisticSequenceContainerInterface &sc) const =0
 Append sequences to a container from a stream. More...
 
virtual void appendAlignmentFromFile (const std::string &path, ProbabilisticSequenceContainerInterface &sc) const
 Append sequences to a container from a file. More...
 
virtual std::unique_ptr< ProbabilisticSiteContainerInterfacereadAlignmentFromStream (std::istream &input, std::shared_ptr< const Alphabet > &alpha) const
 Read sequences from a stream. More...
 
virtual std::unique_ptr< ProbabilisticSiteContainerInterfacereadAlignmentFromFile (const std::string &path, std::shared_ptr< const Alphabet > &alpha) const
 Read sequences from a file. More...
 

Detailed Description

Definition at line 289 of file AbstractIAlignment.h.

Constructor & Destructor Documentation

◆ AbstractIProbabilisticAlignment2()

bpp::AbstractIProbabilisticAlignment2::AbstractIProbabilisticAlignment2 ( )
inline

Definition at line 295 of file AbstractIAlignment.h.

◆ ~AbstractIProbabilisticAlignment2()

virtual bpp::AbstractIProbabilisticAlignment2::~AbstractIProbabilisticAlignment2 ( )
inlinevirtual

Definition at line 296 of file AbstractIAlignment.h.

Member Function Documentation

◆ appendAlignmentFromFile()

virtual void bpp::AbstractIProbabilisticAlignment::appendAlignmentFromFile ( const std::string &  path,
ProbabilisticSequenceContainerInterface sc 
) const
inlineprotectedvirtualinherited

Append sequences to a container from a file.

Parameters
pathThe path to the file to read.
scThe sequence container to update.
Exceptions
ExceptionIf the file is not in the specified format.

Definition at line 250 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::appendAlignmentFromStream().

Referenced by bpp::AbstractIProbabilisticAlignment::readAlignment(), bpp::AbstractIProbabilisticAlignment::readAlignmentFromFile(), and readSequences().

◆ appendAlignmentFromStream()

virtual void bpp::AbstractIProbabilisticAlignment::appendAlignmentFromStream ( std::istream &  input,
ProbabilisticSequenceContainerInterface sc 
) const
protectedpure virtualinherited

Append sequences to a container from a stream.

This is the unique method to implement!

Parameters
inputThe input stream to read.
scThe sequence container to update.

Implemented in bpp::Pasta.

Referenced by bpp::AbstractIProbabilisticAlignment::appendAlignmentFromFile(), bpp::AbstractIProbabilisticAlignment::readAlignment(), bpp::AbstractIProbabilisticAlignment::readAlignmentFromStream(), and readSequences().

◆ getDataType()

const std::string bpp::IOProbabilisticSequence::getDataType ( ) const
inlinevirtualinherited

Implements bpp::IOFormat.

Reimplemented in bpp::Pasta.

Definition at line 44 of file IoSequence.h.

◆ readAlignment() [1/4]

void bpp::AbstractIProbabilisticAlignment::readAlignment ( const std::string &  path,
ProbabilisticSequenceContainerInterface sc 
) const
inlineoverridevirtualinherited

Add sequences to a container from a file.

Parameters
pathThe path to the file to read.
scThe sequence container to update.

Implements bpp::IProbabilisticAlignment.

Definition at line 215 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::appendAlignmentFromFile().

◆ readAlignment() [2/4]

std::unique_ptr<ProbabilisticSiteContainerInterface> bpp::AbstractIProbabilisticAlignment::readAlignment ( const std::string &  path,
std::shared_ptr< const Alphabet alpha 
) const
inlineoverridevirtualinherited

Create a new container from a file.

Parameters
pathThe path to the file to read.
alphaThe alphabet to be associated to the container.
Returns
A new ProbabilisticSiteContainer object.

Implements bpp::IProbabilisticAlignment.

Definition at line 220 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::readAlignmentFromFile().

◆ readAlignment() [3/4]

void bpp::AbstractIProbabilisticAlignment::readAlignment ( std::istream &  input,
ProbabilisticSequenceContainerInterface sc 
) const
inlineoverridevirtualinherited

Add sequences to a container from a stream.

Parameters
inputThe input stream to read.
scThe sequence container to update.

Implements bpp::IProbabilisticAlignment.

Definition at line 204 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::appendAlignmentFromStream().

Referenced by readSequences().

◆ readAlignment() [4/4]

std::unique_ptr<ProbabilisticSiteContainerInterface> bpp::AbstractIProbabilisticAlignment::readAlignment ( std::istream &  input,
std::shared_ptr< const Alphabet alpha 
) const
inlineoverridevirtualinherited

Create a new container from a stream.

Parameters
inputThe input stream to read.
alphaThe alphabet to be associated to the container.
Returns
A new ProbabilisticSiteContainer object.

Implements bpp::IProbabilisticAlignment.

Definition at line 225 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::readAlignmentFromStream().

◆ readAlignmentFromFile()

virtual std::unique_ptr<ProbabilisticSiteContainerInterface> bpp::AbstractIProbabilisticAlignment::readAlignmentFromFile ( const std::string &  path,
std::shared_ptr< const Alphabet > &  alpha 
) const
inlineprotectedvirtualinherited

Read sequences from a file.

Parameters
pathThe path to the file to read.
alphaThe alphabet to use.
Returns
A sequence container.

Definition at line 280 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::appendAlignmentFromFile().

Referenced by bpp::AbstractIProbabilisticAlignment::readAlignment().

◆ readAlignmentFromStream()

virtual std::unique_ptr<ProbabilisticSiteContainerInterface> bpp::AbstractIProbabilisticAlignment::readAlignmentFromStream ( std::istream &  input,
std::shared_ptr< const Alphabet > &  alpha 
) const
inlineprotectedvirtualinherited

Read sequences from a stream.

Parameters
inputThe input stream to read.
alphaThe alphabet to use.
Returns
A sequence container.

Definition at line 266 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::appendAlignmentFromStream().

Referenced by bpp::AbstractIProbabilisticAlignment::readAlignment().

◆ readSequences() [1/4]

void bpp::AbstractIProbabilisticAlignment2::readSequences ( const std::string &  path,
ProbabilisticSequenceContainerInterface container 
) const
inlineoverridevirtual

Create a new container from a file.

Parameters
pathThe path to the file to read.
containerThe container where to add data.
Exceptions
ExceptionIf the file is not in the specified format.

Implements bpp::IProbabilisticSequence.

Definition at line 312 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::appendAlignmentFromFile().

◆ readSequences() [2/4]

std::unique_ptr<ProbabilisticSequenceContainerInterface> bpp::AbstractIProbabilisticAlignment2::readSequences ( const std::string &  path,
std::shared_ptr< const Alphabet alpha 
) const
inlineoverridevirtual

Create a new container from a file.

Parameters
pathThe path to the file to read.
alphaThe alphabet to be associated to the container.
Returns
A new ProbabilisticSequenceContainer object.

Implements bpp::IProbabilisticSequence.

Definition at line 324 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::readAlignment().

◆ readSequences() [3/4]

void bpp::AbstractIProbabilisticAlignment2::readSequences ( std::istream &  input,
ProbabilisticSequenceContainerInterface container 
) const
inlineoverridevirtual

Create a new container from a stream.

Parameters
inputThe input stream to read.
containerThe container where to add data.
Exceptions
ExceptionIf the file is not in the specified format.

Implements bpp::IProbabilisticSequence.

Definition at line 307 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::appendAlignmentFromStream().

◆ readSequences() [4/4]

std::unique_ptr<ProbabilisticSequenceContainerInterface> bpp::AbstractIProbabilisticAlignment2::readSequences ( std::istream &  input,
std::shared_ptr< const Alphabet alpha 
) const
inlineoverridevirtual

Create a new container from a stream.

Parameters
inputThe input stream to read.
alphaThe alphabet to be associated to the container.
Returns
A new ProbabilisticSequenceContainer object.

Implements bpp::IProbabilisticSequence.

Definition at line 317 of file AbstractIAlignment.h.

References bpp::AbstractIProbabilisticAlignment::readAlignment().


The documentation for this class was generated from the following file: