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

Merge blocks if some of their sequences are contiguous. More...

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

+ Inheritance diagram for bpp::BlockMergerMafIterator:
+ Collaboration diagram for bpp::BlockMergerMafIterator:

Public Member Functions

 BlockMergerMafIterator (MafIterator *iterator, const std::vector< std::string > &species, unsigned int maxDist=0, bool renameChimericChromosomes=false)
 
void ignoreChromosome (const std::string &chr)
 
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

 BlockMergerMafIterator (const BlockMergerMafIterator &iterator)
 
BlockMergerMafIteratoroperator= (const BlockMergerMafIterator &iterator)
 
MafBlockanalyseCurrentBlock_ ()
 

Private Attributes

std::vector< std::string > species_
 
MafBlockincomingBlock_
 
std::vector< std::string > ignoreChrs_
 
unsigned int maxDist_
 
bool renameChimericChromosomes_
 
std::map< std::string, unsigned int > chimericChromosomeCounts_
 

Detailed Description

Merge blocks if some of their sequences are contiguous.

The user specifies the focus species. Sequences that are not in this set will be automatically merged and their coordinates removed. The scores, if any, will be averaged for the block, weighted by the corresponding block sizes. The pass value will be removed if it is different for the two blocks. It is possible to define a maximum distance for the merging. Setting a distance of zero implies that the blocks have to be exactly contiguous. Alternatively, the appropriate number of 'N' will be inserted in all species. All species however have to be distant of the exact same amount.

Definition at line 63 of file BlockMergerMafIterator.h.

Constructor & Destructor Documentation

◆ BlockMergerMafIterator() [1/2]

bpp::BlockMergerMafIterator::BlockMergerMafIterator ( MafIterator iterator,
const std::vector< std::string > &  species,
unsigned int  maxDist = 0,
bool  renameChimericChromosomes = false 
)
inline

Definition at line 75 of file BlockMergerMafIterator.h.

References incomingBlock_, and bpp::MafIterator::nextBlock().

◆ BlockMergerMafIterator() [2/2]

bpp::BlockMergerMafIterator::BlockMergerMafIterator ( const BlockMergerMafIterator iterator)
inlineprivate

Definition at line 88 of file BlockMergerMafIterator.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().

◆ ignoreChromosome()

void bpp::BlockMergerMafIterator::ignoreChromosome ( const std::string &  chr)
inline

brief Add a chromosome that should be ignored to the list.

Parameters
chrThe name of the chromosome to be ignored.

Definition at line 114 of file BlockMergerMafIterator.h.

References ignoreChrs_.

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

BlockMergerMafIterator& bpp::BlockMergerMafIterator::operator= ( const BlockMergerMafIterator 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_.

Member Data Documentation

◆ chimericChromosomeCounts_

std::map<std::string, unsigned int> bpp::BlockMergerMafIterator::chimericChromosomeCounts_
private

Definition at line 72 of file BlockMergerMafIterator.h.

Referenced by operator=().

◆ currentBlock_

◆ ignoreChrs_

std::vector<std::string> bpp::BlockMergerMafIterator::ignoreChrs_
private

Definition at line 69 of file BlockMergerMafIterator.h.

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

◆ incomingBlock_

MafBlock* bpp::BlockMergerMafIterator::incomingBlock_
private

Definition at line 68 of file BlockMergerMafIterator.h.

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

◆ iterationListeners_

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

Definition at line 89 of file MafIterator.h.

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

◆ iterator_

◆ logstream_

◆ maxDist_

unsigned int bpp::BlockMergerMafIterator::maxDist_
private

Definition at line 70 of file BlockMergerMafIterator.h.

Referenced by operator=().

◆ renameChimericChromosomes_

bool bpp::BlockMergerMafIterator::renameChimericChromosomes_
private

Definition at line 71 of file BlockMergerMafIterator.h.

Referenced by operator=().

◆ species_

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

Definition at line 67 of file BlockMergerMafIterator.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: