bpp-seq3  3.0.0
bpp::Stockholm Class Reference

The Stockholm alignment file format. More...

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

+ Inheritance diagram for bpp::Stockholm:
+ Collaboration diagram for bpp::Stockholm:

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_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Stockholm()

bpp::Stockholm::Stockholm ( bool  checkSequenceNames = true)
inline

Build a new Stockholm object.

Parameters
checkSequenceNamesTell 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.

◆ ~Stockholm()

virtual bpp::Stockholm::~Stockholm ( )
inlinevirtual

Definition at line 37 of file Stockholm.h.

Member Function Documentation

◆ checkNames() [1/2]

bool bpp::Stockholm::checkNames ( ) const
inline
Warning
This is not used for now, will be when reading is implemented.
Returns
true if the names are to be checked when reading sequences from files.

Definition at line 68 of file Stockholm.h.

References checkNames_.

◆ checkNames() [2/2]

void bpp::Stockholm::checkNames ( bool  yn)
inline

Tell whether the sequence names should be checked when reading from files.

Warning
This is not used for now, will be when reading is implemented.
Parameters
ynwhether the sequence names should be checked when reading from files.

Definition at line 76 of file Stockholm.h.

References checkNames_.

◆ getDataType()

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

Implements bpp::IOFormat.

Reimplemented in bpp::Pasta.

Definition at line 29 of file IoSequence.h.

◆ getFormatDescription()

const std::string bpp::Stockholm::getFormatDescription ( ) const
inlineoverridevirtual

Implements bpp::IOFormat.

Definition at line 58 of file Stockholm.h.

◆ getFormatName()

const std::string bpp::Stockholm::getFormatName ( ) const
inlineoverridevirtual

Implements bpp::IOFormat.

Definition at line 57 of file Stockholm.h.

◆ writeAlignment() [1/2]

void bpp::Stockholm::writeAlignment ( const std::string &  path,
const SiteContainerInterface 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.
Exceptions
ExceptionIf the file is not in the specified format.

Reimplemented from bpp::AbstractOAlignment.

Definition at line 46 of file Stockholm.h.

References bpp::AbstractOAlignment::writeAlignment().

◆ writeAlignment() [2/2]

void Stockholm::writeAlignment ( std::ostream &  output,
const SiteContainerInterface sc 
) const
overridevirtual

Member Data Documentation

◆ checkNames_

bool bpp::Stockholm::checkNames_
private

Definition at line 26 of file Stockholm.h.

Referenced by checkNames().


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