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

This iterator forward the iterator given as input after having printed its content to an alignment file. More...

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

+ Inheritance diagram for bpp::SequenceLDhotOutputMafIterator:
+ Collaboration diagram for bpp::SequenceLDhotOutputMafIterator:

Public Member Functions

 SequenceLDhotOutputMafIterator (MafIterator *iterator, const std::string &file, bool completeOnly=true, const std::string &reference="")
 Creates a SequenceLDhotOutputMafIterator. More...
 
 ~SequenceLDhotOutputMafIterator ()
 
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

 SequenceLDhotOutputMafIterator (const SequenceLDhotOutputMafIterator &iterator)
 
SequenceLDhotOutputMafIteratoroperator= (const SequenceLDhotOutputMafIterator &iterator)
 
MafBlockanalyseCurrentBlock_ ()
 
void writeBlock (std::ostream &out, const MafBlock &block) const
 

Private Attributes

std::string file_
 
std::string refSpecies_
 
unsigned int currentBlockIndex_
 
bool completeOnly_
 

Detailed Description

This iterator forward the iterator given as input after having printed its content to an alignment file.

Definition at line 58 of file SequenceLDhotOutputMafIterator.h.

Constructor & Destructor Documentation

◆ SequenceLDhotOutputMafIterator() [1/2]

bpp::SequenceLDhotOutputMafIterator::SequenceLDhotOutputMafIterator ( MafIterator iterator,
const std::string &  file,
bool  completeOnly = true,
const std::string &  reference = "" 
)
inline

Creates a SequenceLDhotOutputMafIterator.

Parameters
iteratorThe input iterator
fileA string describing the path to the output files. Each block will be written to a distinct file.
completeOnlyOnly export complete sites (no gap, no unresolved character) If "file" is a fixed string, it will only contain the last block. Using the i code in the file name allows to generate one file per block, i denoting the block index.
reference[optional] specify a reference species which can be used to configure file names (for instance using coordinates information).

Definition at line 79 of file SequenceLDhotOutputMafIterator.h.

◆ ~SequenceLDhotOutputMafIterator()

bpp::SequenceLDhotOutputMafIterator::~SequenceLDhotOutputMafIterator ( )
inline

Definition at line 92 of file SequenceLDhotOutputMafIterator.h.

◆ SequenceLDhotOutputMafIterator() [2/2]

bpp::SequenceLDhotOutputMafIterator::SequenceLDhotOutputMafIterator ( const SequenceLDhotOutputMafIterator iterator)
inlineprivate

Definition at line 95 of file SequenceLDhotOutputMafIterator.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_()

◆ 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=()

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

◆ 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

◆ completeOnly_

bool bpp::SequenceLDhotOutputMafIterator::completeOnly_
private

Definition at line 65 of file SequenceLDhotOutputMafIterator.h.

Referenced by operator=().

◆ currentBlock_

◆ currentBlockIndex_

unsigned int bpp::SequenceLDhotOutputMafIterator::currentBlockIndex_
private

Definition at line 64 of file SequenceLDhotOutputMafIterator.h.

Referenced by operator=().

◆ file_

std::string bpp::SequenceLDhotOutputMafIterator::file_
private

Definition at line 62 of file SequenceLDhotOutputMafIterator.h.

Referenced by operator=().

◆ iterationListeners_

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

Definition at line 89 of file MafIterator.h.

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

◆ iterator_

◆ logstream_

◆ refSpecies_

std::string bpp::SequenceLDhotOutputMafIterator::refSpecies_
private

Definition at line 63 of file SequenceLDhotOutputMafIterator.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: