bpp-seq3
3.0.0
|
The Stockholm alignment file format. More...
#include <Bpp/Seq/Io/Stockholm.h>
Public Member Functions | |
Stockholm (bool checkSequenceNames=true) | |
Build a new Stockholm object. More... | |
virtual | ~Stockholm () |
bool | checkNames () const |
void | checkNames (bool yn) |
Tell whether the sequence names should be checked when reading from files. More... | |
const std::string | getDataType () const |
The OAlignment interface. | |
void | writeAlignment (std::ostream &output, const SiteContainerInterface &sc) const override |
Write a container to a stream. More... | |
void | writeAlignment (const std::string &path, const SiteContainerInterface &sc, bool overwrite=true) const override |
Write a container to a file. More... | |
The IOSequence interface. | |
const std::string | getFormatName () const override |
const std::string | getFormatDescription () const override |
Private Attributes | |
bool | checkNames_ |
The Stockholm alignment file format.
Write to Stockholm files. Only sequence data is read/written, annotation and secondary structures are ignored.
Definition at line 22 of file Stockholm.h.
|
inline |
Build a new Stockholm object.
checkSequenceNames | Tell if the names in the file should be checked for unicity (slower, in o(n*n) where n is the number of sequences). |
Definition at line 34 of file Stockholm.h.
|
inlinevirtual |
Definition at line 37 of file Stockholm.h.
|
inline |
Definition at line 68 of file Stockholm.h.
References checkNames_.
|
inline |
Tell whether the sequence names should be checked when reading from files.
yn | whether the sequence names should be checked when reading from files. |
Definition at line 76 of file Stockholm.h.
References checkNames_.
|
inlinevirtualinherited |
|
inlineoverridevirtual |
Implements bpp::IOFormat.
Definition at line 58 of file Stockholm.h.
|
inlineoverridevirtual |
Implements bpp::IOFormat.
Definition at line 57 of file Stockholm.h.
|
inlineoverridevirtual |
Write a container to a file.
path | The path to the file to write. |
sc | The container to write. |
overwrite | If true the sequences are written at the beginning of the file instead of being appended. Any previous content will be lost. |
Exception | If the file is not in the specified format. |
Reimplemented from bpp::AbstractOAlignment.
Definition at line 46 of file Stockholm.h.
References bpp::AbstractOAlignment::writeAlignment().
|
overridevirtual |
Write a container to a stream.
output | The output stream where to write. |
sc | The container to write. |
Exception | If the file is not in the specified format. |
Implements bpp::AbstractOAlignment.
Definition at line 17 of file Stockholm.cpp.
References bpp::Commentable::getComments(), bpp::TemplateSequenceDataInterface< HashType >::getNumberOfSequences(), bpp::TemplateSequenceDataInterface< HashType >::getSequenceNames(), bpp::TextTools::removeWhiteSpaces(), bpp::TextTools::resizeRight(), and bpp::TemplateSequenceContainerInterface< SequenceType, HashType >::sequence().
|
private |
Definition at line 26 of file Stockholm.h.
Referenced by checkNames().