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

Filter maf blocks highly divergent regions. More...

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

+ Inheritance diagram for bpp::EntropyFilterMafIterator:
+ Collaboration diagram for bpp::EntropyFilterMafIterator:

Public Member Functions

 EntropyFilterMafIterator (MafIterator *iterator, const std::vector< std::string > &species, unsigned int windowSize, unsigned int step, double maxEnt, unsigned int maxPos, bool keepTrashedBlocks, bool missingAsGap, bool ignoreGaps)
 
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_
 
double maxEnt_
 
unsigned int maxPos_
 
std::deque< MafBlock * > blockBuffer_
 
std::deque< MafBlock * > trashBuffer_
 
std::deque< unsigned int > window_
 
bool keepTrashedBlocks_
 
bool missingAsGap_
 
bool ignoreGaps_
 

Detailed Description

Filter maf blocks highly divergent regions.

This iterators takes two parameters: g=maxEnt and n=maxPos. Windows with more than n positions with a entropy higher than maxEnt will be discarded. In addition, consecutives patterns are only counted once. In case a sequence from the list is missing, it can be either ignored or counted as a full sequence of gaps.

Definition at line 59 of file EntropyFilterMafIterator.h.

Constructor & Destructor Documentation

◆ EntropyFilterMafIterator()

bpp::EntropyFilterMafIterator::EntropyFilterMafIterator ( MafIterator iterator,
const std::vector< std::string > &  species,
unsigned int  windowSize,
unsigned int  step,
double  maxEnt,
unsigned int  maxPos,
bool  keepTrashedBlocks,
bool  missingAsGap,
bool  ignoreGaps 
)
inline

Definition at line 77 of file EntropyFilterMafIterator.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::EntropyFilterMafIterator::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 93 of file EntropyFilterMafIterator.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::EntropyFilterMafIterator::blockBuffer_
private

Definition at line 69 of file EntropyFilterMafIterator.h.

◆ currentBlock_

◆ ignoreGaps_

bool bpp::EntropyFilterMafIterator::ignoreGaps_
private

Definition at line 74 of file EntropyFilterMafIterator.h.

◆ 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::EntropyFilterMafIterator::keepTrashedBlocks_
private

Definition at line 72 of file EntropyFilterMafIterator.h.

◆ logstream_

◆ maxEnt_

double bpp::EntropyFilterMafIterator::maxEnt_
private

Definition at line 67 of file EntropyFilterMafIterator.h.

◆ maxPos_

unsigned int bpp::EntropyFilterMafIterator::maxPos_
private

Definition at line 68 of file EntropyFilterMafIterator.h.

◆ missingAsGap_

bool bpp::EntropyFilterMafIterator::missingAsGap_
private

Definition at line 73 of file EntropyFilterMafIterator.h.

◆ species_

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

Definition at line 64 of file EntropyFilterMafIterator.h.

◆ started_

bool bpp::AbstractMafIterator::started_
protectedinherited

Definition at line 90 of file MafIterator.h.

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

◆ step_

unsigned int bpp::EntropyFilterMafIterator::step_
private

Definition at line 66 of file EntropyFilterMafIterator.h.

◆ trashBuffer_

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

Definition at line 70 of file EntropyFilterMafIterator.h.

Referenced by nextRemovedBlock().

◆ verbose_

bool bpp::AbstractMafIterator::verbose_
protectedinherited

◆ window_

std::deque<unsigned int> bpp::EntropyFilterMafIterator::window_
private

Definition at line 71 of file EntropyFilterMafIterator.h.

◆ windowSize_

unsigned int bpp::EntropyFilterMafIterator::windowSize_
private

Definition at line 65 of file EntropyFilterMafIterator.h.


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