5 #ifndef BPP_SEQ_IO_ABSTRACTISEQUENCE_H
6 #define BPP_SEQ_IO_ABSTRACTISEQUENCE_H
9 #include "../Alphabet/Alphabet.h"
10 #include "../Container/VectorSequenceContainer.h"
62 std::unique_ptr<SequenceContainerInterface>
readSequences(std::istream& input, std::shared_ptr<const Alphabet> alpha)
const override
67 std::unique_ptr<SequenceContainerInterface>
readSequences(
const std::string& path, std::shared_ptr<const Alphabet> alpha)
const override
94 std::ifstream input(path.c_str(), std::ios::in);
96 throw IOException(
"AbstractIAlignment::appendSequencesFromFile: can't read file " + path);
109 std::unique_ptr<SequenceContainerInterface>
readSequencesFromStream(std::istream& input, std::shared_ptr<const Alphabet>& alpha)
const
123 std::unique_ptr<SequenceContainerInterface>
readSequencesFromFile(
const std::string& path, std::shared_ptr<const Alphabet>& alpha)
const
174 std::unique_ptr<ProbabilisticSequenceContainerInterface>
readSequences(std::istream& input, std::shared_ptr<const Alphabet> alpha)
const override
179 std::unique_ptr<ProbabilisticSequenceContainerInterface>
readSequences(
const std::string& path, std::shared_ptr<const Alphabet> alpha)
const override
206 std::ifstream input(path.c_str(), std::ios::in);
208 throw IOException(
"AbstractIProbabilisticSequences::appendSequencesFromFile: can't read file " + path);
221 std::unique_ptr<ProbabilisticSequenceContainerInterface>
readSequencesFromStream(std::istream& input, std::shared_ptr<const Alphabet>& alpha)
const
235 std::unique_ptr<ProbabilisticSequenceContainerInterface>
readSequencesFromFile(
const std::string& path, std::shared_ptr<const Alphabet>& alpha)
const
Partial implementation of the IProbabilisticSequence interface.
std::unique_ptr< ProbabilisticSequenceContainerInterface > readSequencesFromStream(std::istream &input, std::shared_ptr< const Alphabet > &alpha) const
Read sequences from a stream.
std::unique_ptr< ProbabilisticSequenceContainerInterface > readSequencesFromFile(const std::string &path, std::shared_ptr< const Alphabet > &alpha) const
Append sequences to a container from a file.
void readSequences(const std::string &path, ProbabilisticSequenceContainerInterface &sc) const override
Add sequences to a container from a file.
AbstractIProbabilisticSequence()
virtual void appendSequencesFromStream(std::istream &input, ProbabilisticSequenceContainerInterface &sc) const =0
Append sequences to a container from a stream.
virtual ~AbstractIProbabilisticSequence()
void readSequences(std::istream &input, ProbabilisticSequenceContainerInterface &sc) const override
Add sequences to a container from a stream.
virtual void appendSequencesFromFile(const std::string &path, ProbabilisticSequenceContainerInterface &sc) const
Append sequences to a container from a file.
std::unique_ptr< ProbabilisticSequenceContainerInterface > readSequences(std::istream &input, std::shared_ptr< const Alphabet > alpha) const override
Create a new container from a stream.
std::unique_ptr< ProbabilisticSequenceContainerInterface > readSequences(const std::string &path, std::shared_ptr< const Alphabet > alpha) const override
Create a new container from a file.
Partial implementation of the ISequence interface.
std::unique_ptr< SequenceContainerInterface > readSequencesFromFile(const std::string &path, std::shared_ptr< const Alphabet > &alpha) const
Append sequences to a container from a file.
std::unique_ptr< SequenceContainerInterface > readSequences(std::istream &input, std::shared_ptr< const Alphabet > alpha) const override
Create a new container from a stream.
virtual void appendSequencesFromFile(const std::string &path, SequenceContainerInterface &sc) const
Append sequences to a container from a file.
std::unique_ptr< SequenceContainerInterface > readSequencesFromStream(std::istream &input, std::shared_ptr< const Alphabet > &alpha) const
Read sequences from a stream.
void readSequences(std::istream &input, SequenceContainerInterface &sc) const override
Add sequences to a container from a stream.
virtual ~AbstractISequence()
virtual void appendSequencesFromStream(std::istream &input, SequenceContainerInterface &sc) const =0
Append sequences to a container from a stream.
void readSequences(const std::string &path, SequenceContainerInterface &sc) const override
Add sequences to a container from a file.
std::unique_ptr< SequenceContainerInterface > readSequences(const std::string &path, std::shared_ptr< const Alphabet > alpha) const override
Create a new container from a file.
The IProbabilisticSequence interface.
The SequenceContainer interface.
This alphabet is used to deal NumericAlphabet.
TemplateVectorSequenceContainer< ProbabilisticSequence > ProbabilisticVectorSequenceContainer
TemplateVectorSequenceContainer< Sequence > VectorSequenceContainer