5 #ifndef BPP_SEQ_IO_PASTA_H
6 #define BPP_SEQ_IO_PASTA_H
10 #include "../Container/VectorSiteContainer.h"
11 #include "../ProbabilisticSequence.h"
12 #include "../Container/AlignmentData.h"
65 const std::string
getFormatName()
const override {
return "PASTA file"; }
68 return "By rows: alphabet, then Sequence name (preceded by >) in one line, and rows of sequence content.";
115 throw IOException(
"Pasta::write: can't write to ostream output");
131 const std::string
getDataType()
const override {
return "(Probabilistic) sequence container"; }
Partial implementation of the OProbabilisticAlignment interface.
Partial implementation of the OAlignment interface.
void writeAlignment(std::ostream &output, const SiteContainerInterface &sc) const override
Write a container to a stream.
void writeSequences(std::ostream &output, const SequenceContainerInterface &sc) const override=0
Write a container to a stream.
The Pasta sequence file format.
Table< double > DataTable
const std::string getFormatName() const override
Get the format name.
void writeSequence(std::ostream &output, const ProbabilisticSequence &seq, bool header) const
void appendAlignmentFromStream(std::istream &input, ProbabilisticSequenceContainerInterface &psc) const override
Append sequences to a container from a stream.
Pasta(unsigned int charsByLine=100, bool extended=false, bool strictSequenceNames=false)
Build a new Pasta object.
void writeAlignment(std::ostream &output, const ProbabilisticSiteContainerInterface &psc) const override
Write a container to a stream.
void writeSequences(std::ostream &output, const SequenceContainerInterface &sc) const override
Write a container to a stream.
const std::string getDataType() const override
bool nextSequence(std::istream &input, ProbabilisticSequence &seq, bool hasLabels, const std::vector< size_t > &permutationMap) const
unsigned int charsByLine_
The maximum number of chars to be written on a line.
const std::string getFormatDescription() const override
A basic implementation of the ProbabilisticSequence interface.
A basic implementation of the Sequence interface.
The SequenceContainer interface.
virtual const SequenceType & sequence(const HashType &sequenceKey) const override=0
Retrieve a sequence object from the container.
virtual size_t getNumberOfSequences() const =0
Get the number of sequences in the container.
The SiteContainer interface.
This alphabet is used to deal NumericAlphabet.