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

Output each sequence coordinates for each block. More...

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

+ Inheritance diagram for bpp::CoordinatesOutputMafIterator:
+ Collaboration diagram for bpp::CoordinatesOutputMafIterator:

Public Member Functions

 CoordinatesOutputMafIterator (MafIterator *iterator, std::ostream *out, const std::vector< std::string > &species, bool includeSrcSize=false)
 Creates a new CoordinatesOutputMafIterator object. More...
 
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

 CoordinatesOutputMafIterator (const CoordinatesOutputMafIterator &iterator)
 
CoordinatesOutputMafIteratoroperator= (const CoordinatesOutputMafIterator &iterator)
 
void writeHeader_ (std::ostream &out) const
 
MafBlockanalyseCurrentBlock_ ()
 

Private Attributes

std::ostream * output_
 
std::vector< std::string > species_
 
bool includeSrcSize_
 

Detailed Description

Output each sequence coordinates for each block.

The set of species for which coordinates are output is provided as argument. The current implementation outputs results as a table to a file. Later implementation may involve a dedicated data structure for other application usage (file indexing and so one).

Definition at line 58 of file CoordinatesOutputMafIterator.h.

Constructor & Destructor Documentation

◆ CoordinatesOutputMafIterator() [1/2]

bpp::CoordinatesOutputMafIterator::CoordinatesOutputMafIterator ( MafIterator iterator,
std::ostream *  out,
const std::vector< std::string > &  species,
bool  includeSrcSize = false 
)
inline

Creates a new CoordinatesOutputMafIterator object.

Parameters
iteratorThe input iterator.
outA pointer toward the output stream. The stream will not be own by this instance, and will not be copied neither destroyed.
speciesA vector of species names for which coordinates should be output. In case of missing species for one block, NA will be produced.
includeSrcSizeTell if source size should also be written (useful to convert coordinates on the negative strand).

Definition at line 75 of file CoordinatesOutputMafIterator.h.

References output_, and writeHeader_().

◆ CoordinatesOutputMafIterator() [2/2]

bpp::CoordinatesOutputMafIterator::CoordinatesOutputMafIterator ( const CoordinatesOutputMafIterator iterator)
inlineprivate

Definition at line 83 of file CoordinatesOutputMafIterator.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 * CoordinatesOutputMafIterator::analyseCurrentBlock_ ( )
privatevirtual

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

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

Definition at line 90 of file CoordinatesOutputMafIterator.h.

References includeSrcSize_, output_, 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_.

◆ writeHeader_()

void CoordinatesOutputMafIterator::writeHeader_ ( std::ostream &  out) const
private

Definition at line 45 of file CoordinatesOutputMafIterator.cpp.

Referenced by CoordinatesOutputMafIterator().

Member Data Documentation

◆ currentBlock_

◆ includeSrcSize_

bool bpp::CoordinatesOutputMafIterator::includeSrcSize_
private

Definition at line 64 of file CoordinatesOutputMafIterator.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_

◆ output_

std::ostream* bpp::CoordinatesOutputMafIterator::output_
private

Definition at line 62 of file CoordinatesOutputMafIterator.h.

Referenced by CoordinatesOutputMafIterator(), and operator=().

◆ species_

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

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