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

Filter maf blocks to remove regions with masked positions. More...

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

+ Inheritance diagram for bpp::MaskFilterMafIterator:
+ Collaboration diagram for bpp::MaskFilterMafIterator:

Public Member Functions

 MaskFilterMafIterator (MafIterator *iterator, const std::vector< std::string > &species, unsigned int windowSize, unsigned int step, unsigned int maxMasked, bool keepTrashedBlocks)
 
MafBlocknextRemovedBlock ()
 Get the next available removed alignment block. 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

MafBlockanalyseCurrentBlock_ ()
 

Private Attributes

std::vector< std::string > species_
 
unsigned int windowSize_
 
unsigned int step_
 
unsigned int maxMasked_
 
std::deque< MafBlock * > blockBuffer_
 
std::deque< MafBlock * > trashBuffer_
 
std::deque< std::vector< bool > > window_
 
bool keepTrashedBlocks_
 

Detailed Description

Filter maf blocks to remove regions with masked positions.

Regions with a too high proportion of masked position in a set of species will be removed, and blocks adjusted accordingly.

Definition at line 58 of file MaskFilterMafIterator.h.

Constructor & Destructor Documentation

◆ MaskFilterMafIterator()

bpp::MaskFilterMafIterator::MaskFilterMafIterator ( MafIterator iterator,
const std::vector< std::string > &  species,
unsigned int  windowSize,
unsigned int  step,
unsigned int  maxMasked,
bool  keepTrashedBlocks 
)
inline

Definition at line 73 of file MaskFilterMafIterator.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_.

◆ nextRemovedBlock()

MafBlock* bpp::MaskFilterMafIterator::nextRemovedBlock ( )
inlinevirtual

Get the next available removed alignment block.

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

Implements bpp::MafTrashIterator.

Definition at line 86 of file MaskFilterMafIterator.h.

References trashBuffer_.

◆ 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

◆ blockBuffer_

std::deque<MafBlock*> bpp::MaskFilterMafIterator::blockBuffer_
private

Definition at line 67 of file MaskFilterMafIterator.h.

◆ currentBlock_

◆ iterationListeners_

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

Definition at line 89 of file MafIterator.h.

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

◆ iterator_

◆ keepTrashedBlocks_

bool bpp::MaskFilterMafIterator::keepTrashedBlocks_
private

Definition at line 70 of file MaskFilterMafIterator.h.

◆ logstream_

◆ maxMasked_

unsigned int bpp::MaskFilterMafIterator::maxMasked_
private

Definition at line 66 of file MaskFilterMafIterator.h.

◆ species_

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

Definition at line 63 of file MaskFilterMafIterator.h.

◆ started_

bool bpp::AbstractMafIterator::started_
protectedinherited

Definition at line 90 of file MafIterator.h.

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

◆ step_

unsigned int bpp::MaskFilterMafIterator::step_
private

Definition at line 65 of file MaskFilterMafIterator.h.

◆ trashBuffer_

std::deque<MafBlock*> bpp::MaskFilterMafIterator::trashBuffer_
private

Definition at line 68 of file MaskFilterMafIterator.h.

Referenced by nextRemovedBlock().

◆ verbose_

bool bpp::AbstractMafIterator::verbose_
protectedinherited

◆ window_

std::deque< std::vector<bool> > bpp::MaskFilterMafIterator::window_
private

Definition at line 69 of file MaskFilterMafIterator.h.

◆ windowSize_

unsigned int bpp::MaskFilterMafIterator::windowSize_
private

Definition at line 64 of file MaskFilterMafIterator.h.


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