bpp-seq-omics  2.2.0
bpp::AlignmentFilter2MafIterator Class Reference

Filter maf blocks to remove ambiguously aligned or non-informative regions. More...

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

+ Inheritance diagram for bpp::AlignmentFilter2MafIterator:
+ Collaboration diagram for bpp::AlignmentFilter2MafIterator:

Public Member Functions

 AlignmentFilter2MafIterator (MafIterator *iterator, const std::vector< std::string > &species, unsigned int windowSize, unsigned int step, unsigned int maxGap, unsigned int maxPos, bool keepTrashedBlocks, bool missingAsGap)
 
MafBlocknextRemovedBlock () throw (Exception)
 Get the next available removed alignment block. More...
 
void setLogStream (OutputStream *logstream)
 
void addIterationListener (IterationListener *listener)
 
MafBlocknextBlock () throw (Exception)
 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_
 
OutputStream * logstream_
 
std::vector< IterationListener * > iterationListeners_
 
bool started_
 
bool verbose_
 

Private Member Functions

MafBlockanalyseCurrentBlock_ () throw (Exception)
 

Private Attributes

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

Detailed Description

Filter maf blocks to remove ambiguously aligned or non-informative regions.

This iterators offers a different algorithm than AlignmentFilterMafIterator. It takes two parameters: g=maxGap and n=maxPos. Windows with more than n positions containing each of them more than g=maxPos gaps 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 121 of file AlignmentFilterMafIterator.h.

Constructor & Destructor Documentation

◆ AlignmentFilter2MafIterator()

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

Definition at line 138 of file AlignmentFilterMafIterator.h.

Member Function Documentation

◆ addIterationListener()

void bpp::AbstractMafIterator::addIterationListener ( IterationListener listener)
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 99 of file MafIterator.h.

◆ analyseCurrentBlock_()

◆ fireIterationMoveSignal_()

void AbstractMafIterator::fireIterationMoveSignal_ ( const MafBlock currentBlock)
protectedvirtualinherited

Definition at line 57 of file MafIterator.cpp.

◆ fireIterationStartSignal_()

void AbstractMafIterator::fireIterationStartSignal_ ( )
protectedvirtualinherited

Definition at line 51 of file MafIterator.cpp.

◆ fireIterationStopSignal_()

void AbstractMafIterator::fireIterationStopSignal_ ( )
protectedvirtualinherited

Definition at line 63 of file MafIterator.cpp.

◆ isVerbose()

bool bpp::AbstractMafIterator::isVerbose ( ) const
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 116 of file MafIterator.h.

◆ nextBlock()

MafBlock* bpp::AbstractMafIterator::nextBlock ( )
throw (Exception
)
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.

◆ nextRemovedBlock()

MafBlock* bpp::AlignmentFilter2MafIterator::nextRemovedBlock ( )
throw (Exception
)
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 153 of file AlignmentFilterMafIterator.h.

References bpp::AlignmentFilterMafIterator::trashBuffer_.

◆ setLogStream()

void bpp::AbstractFilterMafIterator::setLogStream ( OutputStream *  logstream)
inlineinherited

Definition at line 178 of file MafIterator.h.

◆ setVerbose()

void bpp::AbstractMafIterator::setVerbose ( bool  yn)
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 117 of file MafIterator.h.

Member Data Documentation

◆ blockBuffer_

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

Definition at line 131 of file AlignmentFilterMafIterator.h.

◆ currentBlock_

◆ iterationListeners_

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

Definition at line 89 of file MafIterator.h.

◆ iterator_

◆ keepTrashedBlocks_

bool bpp::AlignmentFilter2MafIterator::keepTrashedBlocks_
private

Definition at line 134 of file AlignmentFilterMafIterator.h.

◆ logstream_

OutputStream* bpp::AbstractFilterMafIterator::logstream_
protectedinherited

◆ maxGap_

unsigned int bpp::AlignmentFilter2MafIterator::maxGap_
private

Definition at line 129 of file AlignmentFilterMafIterator.h.

◆ maxPos_

unsigned int bpp::AlignmentFilter2MafIterator::maxPos_
private

Definition at line 130 of file AlignmentFilterMafIterator.h.

◆ missingAsGap_

bool bpp::AlignmentFilter2MafIterator::missingAsGap_
private

Definition at line 135 of file AlignmentFilterMafIterator.h.

◆ species_

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

Definition at line 126 of file AlignmentFilterMafIterator.h.

◆ started_

bool bpp::AbstractMafIterator::started_
protectedinherited

Definition at line 90 of file MafIterator.h.

◆ step_

unsigned int bpp::AlignmentFilter2MafIterator::step_
private

Definition at line 128 of file AlignmentFilterMafIterator.h.

◆ trashBuffer_

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

Definition at line 132 of file AlignmentFilterMafIterator.h.

◆ verbose_

bool bpp::AbstractMafIterator::verbose_
protectedinherited

Definition at line 91 of file MafIterator.h.

◆ window_

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

Definition at line 133 of file AlignmentFilterMafIterator.h.

◆ windowSize_

unsigned int bpp::AlignmentFilter2MafIterator::windowSize_
private

Definition at line 127 of file AlignmentFilterMafIterator.h.


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