bpp-seq-omics  2.4.1
bpp::TableOutputMafIterator Class Reference

This iterator outputs sequence states for selected species and positions. More...

#include <Bpp/Seq/Io/Maf/TableOutputMafIterator.h>

+ Inheritance diagram for bpp::TableOutputMafIterator:
+ Collaboration diagram for bpp::TableOutputMafIterator:

Public Member Functions

 TableOutputMafIterator (MafIterator *iterator, std::ostream *out, const std::vector< std::string > &species, const std::string &reference)
 Build a new TableOutputMafIterator object. More...
 
MafBlockanalyseCurrentBlock_ ()
 
void setLogStream (std::shared_ptr< OutputStream > logstream)
 
void addIterationListener (IterationListener *listener)
 
MafBlocknextBlock ()
 Get the next available alignment block. More...
 
bool isVerbose () const
 
void setVerbose (bool yn)
 

Protected Member Functions

virtual void fireIterationStartSignal_ ()
 
virtual void fireIterationMoveSignal_ (const MafBlock &currentBlock)
 
virtual void fireIterationStopSignal_ ()
 

Protected Attributes

MafIteratoriterator_
 
MafBlockcurrentBlock_
 
std::shared_ptr< OutputStreamlogstream_
 
std::vector< IterationListener * > iterationListeners_
 
bool started_
 
bool verbose_
 

Private Member Functions

 TableOutputMafIterator (const TableOutputMafIterator &iterator)
 
TableOutputMafIteratoroperator= (const TableOutputMafIterator &iterator)
 
void writeBlock_ (std::ostream &out, const MafBlock &block)
 

Private Attributes

std::ostream * output_
 
std::vector< std::string > species_
 
std::string refSpecies_
 

Detailed Description

This iterator outputs sequence states for selected species and positions.

Definition at line 55 of file TableOutputMafIterator.h.

Constructor & Destructor Documentation

◆ TableOutputMafIterator() [1/2]

bpp::TableOutputMafIterator::TableOutputMafIterator ( MafIterator iterator,
std::ostream *  out,
const std::vector< std::string > &  species,
const std::string &  reference 
)
inline

Build a new TableOutputMafIterator object.

Parameters
iteratorThe input iterator.
outThe output stream where to write the table file.
speciesA list of species for which sequence content should be output (one column per selected species). In case one species is duplicated in a block, the first sequence will be used.
referenceThe species to use as a reference for coordinates. It does not have to be one of the selected species for output.

Definition at line 74 of file TableOutputMafIterator.h.

References output_.

◆ TableOutputMafIterator() [2/2]

bpp::TableOutputMafIterator::TableOutputMafIterator ( const TableOutputMafIterator iterator)
inlineprivate

Definition at line 90 of file TableOutputMafIterator.h.

Member Function Documentation

◆ addIterationListener()

void bpp::AbstractMafIterator::addIterationListener ( IterationListener listener)
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 99 of file MafIterator.h.

References bpp::AbstractMafIterator::iterationListeners_.

◆ analyseCurrentBlock_()

MafBlock* bpp::TableOutputMafIterator::analyseCurrentBlock_ ( )
inlinevirtual

◆ fireIterationMoveSignal_()

void AbstractMafIterator::fireIterationMoveSignal_ ( const MafBlock currentBlock)
protectedvirtualinherited

Definition at line 57 of file MafIterator.cpp.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ fireIterationStartSignal_()

void AbstractMafIterator::fireIterationStartSignal_ ( )
protectedvirtualinherited

Definition at line 51 of file MafIterator.cpp.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ fireIterationStopSignal_()

void AbstractMafIterator::fireIterationStopSignal_ ( )
protectedvirtualinherited

Definition at line 63 of file MafIterator.cpp.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ isVerbose()

bool bpp::AbstractMafIterator::isVerbose ( ) const
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 116 of file MafIterator.h.

References bpp::AbstractMafIterator::verbose_.

◆ nextBlock()

MafBlock* bpp::AbstractMafIterator::nextBlock ( )
inlinevirtualinherited

Get the next available alignment block.

Returns
A maf alignment block, or a null pointer if no more block is available.

Implements bpp::MafIterator.

Definition at line 103 of file MafIterator.h.

References bpp::AbstractMafIterator::analyseCurrentBlock_(), bpp::AbstractMafIterator::fireIterationMoveSignal_(), bpp::AbstractMafIterator::fireIterationStartSignal_(), bpp::AbstractMafIterator::fireIterationStopSignal_(), and bpp::AbstractMafIterator::started_.

◆ operator=()

TableOutputMafIterator& bpp::TableOutputMafIterator::operator= ( const TableOutputMafIterator iterator)
inlineprivate

Definition at line 97 of file TableOutputMafIterator.h.

References output_, refSpecies_, and species_.

◆ setLogStream()

void bpp::AbstractFilterMafIterator::setLogStream ( std::shared_ptr< OutputStream logstream)
inlineinherited

Definition at line 178 of file MafIterator.h.

References bpp::AbstractFilterMafIterator::logstream_.

◆ setVerbose()

void bpp::AbstractMafIterator::setVerbose ( bool  yn)
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 117 of file MafIterator.h.

References bpp::AbstractMafIterator::verbose_.

◆ writeBlock_()

Member Data Documentation

◆ currentBlock_

◆ iterationListeners_

std::vector<IterationListener*> bpp::AbstractMafIterator::iterationListeners_
protectedinherited

Definition at line 89 of file MafIterator.h.

Referenced by bpp::AbstractMafIterator::addIterationListener().

◆ iterator_

◆ logstream_

◆ output_

std::ostream* bpp::TableOutputMafIterator::output_
private

◆ refSpecies_

std::string bpp::TableOutputMafIterator::refSpecies_
private

Definition at line 61 of file TableOutputMafIterator.h.

Referenced by operator=().

◆ species_

std::vector<std::string> bpp::TableOutputMafIterator::species_
private

Definition at line 60 of file TableOutputMafIterator.h.

Referenced by operator=().

◆ started_

bool bpp::AbstractMafIterator::started_
protectedinherited

Definition at line 90 of file MafIterator.h.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ verbose_

bool bpp::AbstractMafIterator::verbose_
protectedinherited

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