5 #ifndef BPP_SEQ_IO_CLUSTAL_H
6 #define BPP_SEQ_IO_CLUSTAL_H
9 #include "../Container/SiteContainer.h"
40 Clustal(
bool checkSequenceNames =
true,
unsigned int nbExtraSpacesBeforeSeq = 5,
unsigned int charsByLine = 100) :
65 std::unique_ptr<SequenceContainerInterface>
readSequences(std::istream& input, std::shared_ptr<const Alphabet> alpha)
const override
70 std::unique_ptr<SequenceContainerInterface>
readSequences(
const std::string& path, std::shared_ptr<const Alphabet> alpha)
const override
96 const std::string
getFormatDescription()
const override {
return "The Clustal alignment tool output format."; }
Partial implementation of the IAlignment and ISequence interface, dedicated to alignment readers.
virtual void readAlignment(std::istream &input, SequenceContainerInterface &sc) const override
Add sequences to a container from a stream.
Partial implementation of the OAlignment interface.
void writeAlignment(std::ostream &output, const SiteContainerInterface &sc) const override=0
Write a container to a stream.
The clustal sequence file format.
void writeAlignment(std::ostream &output, const SiteContainerInterface &sc) const override
Write a container to a stream.
unsigned int nbSpacesBeforeSeq_
void checkNames(bool yn)
Tell whether the sequence names should be checked when reading from files.
unsigned int charsByLine_
std::unique_ptr< SequenceContainerInterface > readSequences(const std::string &path, std::shared_ptr< const Alphabet > alpha) const override
Create a new container from a file.
void writeAlignment(const std::string &path, const SiteContainerInterface &sc, bool overwrite=true) const override
Write a container to a file.
const std::string getFormatDescription() const override
std::unique_ptr< SequenceContainerInterface > readSequences(std::istream &input, std::shared_ptr< const Alphabet > alpha) const override
Create a new container from a stream.
void appendAlignmentFromStream(std::istream &input, SequenceContainerInterface &sc) const override
Append sequences to a container from a stream.
const std::string getFormatName() const override
Clustal(bool checkSequenceNames=true, unsigned int nbExtraSpacesBeforeSeq=5, unsigned int charsByLine=100)
Build a new Clustal object.
The SequenceContainer interface.
This alphabet is used to deal NumericAlphabet.