bpp-seq3  3.0.0
bpp::AbstractOProbabilisticSequence2 Class Referenceabstract

Partial implementation of the OProbabilisticAlignment interface. More...

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

+ Inheritance diagram for bpp::AbstractOProbabilisticSequence2:
+ Collaboration diagram for bpp::AbstractOProbabilisticSequence2:

Public Member Functions

 AbstractOProbabilisticSequence2 ()
 
virtual ~AbstractOProbabilisticSequence2 ()
 
const std::string getDataType () const
 
virtual const std::string getFormatName () const=0
 
virtual const std::string getFormatDescription () const=0
 
OProbabilisticAlignment methods:

As a ProbabilisticSiteContainer is a specialization of ProbabilisticSequenceContainer, it is assumed that a OProbabilisticSequence object can write aligned sequence just like a OProbabilisticAlignment object. Therefore it implements the OProbabilisticAlignment interface by down-casting the ProbabilisticSiteContainer to a ProbabilisticSequenceContainer.

void writeAlignment (std::ostream &output, const ProbabilisticSiteContainerInterface &sc) const override
 Write a container to a stream. More...
 
void writeAlignment (const std::string &path, const ProbabilisticSiteContainerInterface &sc, bool overwrite=true) const override
 Write a container to a file. More...
 
OProbabilisticSequence methods:
void writeSequences (std::ostream &output, const ProbabilisticSequenceContainerInterface &psc) const override=0
 Write a container to a stream. More...
 
void writeSequences (const std::string &path, const ProbabilisticSequenceContainerInterface &psc, bool overwrite=true) const override
 Write a container to a file. More...
 

Detailed Description

Partial implementation of the OProbabilisticAlignment interface.

This implementation is for formats that can store both aligned and non-aligned sequences. Alignment sequences are written as simple sequences with gaps.

Definition at line 120 of file AbstractOSequence.h.

Constructor & Destructor Documentation

◆ AbstractOProbabilisticSequence2()

bpp::AbstractOProbabilisticSequence2::AbstractOProbabilisticSequence2 ( )
inline

Definition at line 125 of file AbstractOSequence.h.

◆ ~AbstractOProbabilisticSequence2()

virtual bpp::AbstractOProbabilisticSequence2::~AbstractOProbabilisticSequence2 ( )
inlinevirtual

Definition at line 126 of file AbstractOSequence.h.

Member Function Documentation

◆ getDataType()

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

Implements bpp::IOFormat.

Reimplemented in bpp::Pasta.

Definition at line 44 of file IoSequence.h.

◆ writeAlignment() [1/2]

void bpp::AbstractOProbabilisticSequence2::writeAlignment ( const std::string &  path,
const ProbabilisticSiteContainerInterface sc,
bool  overwrite = true 
) const
inlineoverridevirtual

Write a container to a file.

Parameters
pathThe path to the file to write.
scThe container to write.
overwriteIf true the sequences are written at the beginning of the file instead of being appended. Any previous content will be lost.

Implements bpp::OProbabilisticAlignment.

Definition at line 147 of file AbstractOSequence.h.

References bpp::AbstractOProbabilisticSequence::writeSequences().

◆ writeAlignment() [2/2]

void bpp::AbstractOProbabilisticSequence2::writeAlignment ( std::ostream &  output,
const ProbabilisticSiteContainerInterface sc 
) const
inlineoverridevirtual

Write a container to a stream.

Parameters
outputThe output stream where to write.
scThe container to write.

Implements bpp::OProbabilisticAlignment.

Definition at line 142 of file AbstractOSequence.h.

References bpp::AbstractOProbabilisticSequence::writeSequences().

◆ writeSequences() [1/2]

void bpp::AbstractOProbabilisticSequence::writeSequences ( const std::string &  path,
const ProbabilisticSequenceContainerInterface sc,
bool  overwrite = true 
) const
inlineoverridevirtualinherited

Write a container to a file.

Parameters
pathThe path to the file to write.
scThe container to write.
overwriteIf true the sequences are written at the beginning of the file instead of being appended. Any previous content will be lost.

Implements bpp::OProbabilisticSequence.

Definition at line 103 of file AbstractOSequence.h.

References bpp::AbstractOProbabilisticSequence::writeSequences().

◆ writeSequences() [2/2]

void bpp::AbstractOProbabilisticSequence::writeSequences ( std::ostream &  output,
const ProbabilisticSequenceContainerInterface sc 
) const
overridepure virtualinherited

Write a container to a stream.

Parameters
outputThe output stream where to write.
scThe container to write.

Implements bpp::OProbabilisticSequence.

Referenced by writeAlignment(), and bpp::AbstractOProbabilisticSequence::writeSequences().


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