Filter maf blocks to remove ambiguously aligned or non-informative regions. More...
#include <Bpp/Seq/Io/MafIterator.h>


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) | |
| MafBlock * | nextBlock () throw (Exception) |
| Get the next available alignment block. | |
| MafBlock * | nextRemovedBlock () throw (Exception) |
| Get the next available removed alignment block. | |
| void | setLogStream (OutputStream *logstream) |
| bool | verbose () const |
| void | verbose (bool yn) |
Protected Attributes | |
| MafIterator * | iterator_ |
| OutputStream * | logstream_ |
| bool | verbose_ |
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_ |
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 at more than n positions containing each of them more than g=maxPos gaps will be discarded. In addition, consecutives patterns are only counted once.
Definition at line 668 of file MafIterator.h.
| 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 | |||
| ) | [inline] |
Definition at line 684 of file MafIterator.h.
Get the next available alignment block.
Implements bpp::MafIterator.
Definition at line 554 of file MafIterator.cpp.
References bpp::MafBlock::addSequence(), blockBuffer_, bpp::ApplicationTools::displayGauge(), bpp::ApplicationTools::displayTask(), bpp::ApplicationTools::displayTaskDone(), bpp::AlphabetTools::DNA_ALPHABET, bpp::OutputStream::endLine(), bpp::EdSymbolList::getContent(), bpp::MafBlock::getDescription(), bpp::AbstractAlphabet::getGapCharacterCode(), bpp::MafBlock::getNumberOfSequences(), bpp::MafBlock::getNumberOfSites(), bpp::MafBlock::getPass(), bpp::MafBlock::getScore(), bpp::MafBlock::getSequence(), bpp::MafBlock::getSequenceForSpecies(), bpp::NucleicAlphabet::getUnknownCharacterCode(), bpp::AbstractFilterMafIterator::iterator_, keepTrashedBlocks_, bpp::AbstractFilterMafIterator::logstream_, maxGap_, maxPos_, bpp::ApplicationTools::message, bpp::MafIterator::nextBlock(), bpp::MafBlock::setPass(), bpp::MafBlock::setScore(), species_, step_, bpp::MafSequence::subSequence(), trashBuffer_, bpp::AbstractFilterMafIterator::verbose_, window_, and windowSize_.
| MafBlock* bpp::AlignmentFilter2MafIterator::nextRemovedBlock | ( | ) | throw (Exception) [inline, virtual] |
Get the next available removed alignment block.
Implements bpp::MafTrashIterator.
Definition at line 700 of file MafIterator.h.
| void bpp::AbstractFilterMafIterator::setLogStream | ( | OutputStream * | logstream | ) | [inline, inherited] |
Definition at line 341 of file MafIterator.h.
| void bpp::AbstractFilterMafIterator::verbose | ( | bool | yn | ) | [inline, inherited] |
Definition at line 343 of file MafIterator.h.
| bool bpp::AbstractFilterMafIterator::verbose | ( | ) | const [inline, inherited] |
Definition at line 342 of file MafIterator.h.
std::deque<MafBlock*> bpp::AlignmentFilter2MafIterator::blockBuffer_ [private] |
Definition at line 678 of file MafIterator.h.
Referenced by nextBlock().
MafIterator* bpp::AbstractFilterMafIterator::iterator_ [protected, inherited] |
Definition at line 323 of file MafIterator.h.
Referenced by bpp::FeatureExtractor::nextBlock(), bpp::FeatureFilterMafIterator::nextBlock(), bpp::PairwiseSequenceStatisticsMafIterator::nextBlock(), bpp::SequenceStatisticsMafIterator::nextBlock(), bpp::QualityFilterMafIterator::nextBlock(), bpp::MaskFilterMafIterator::nextBlock(), nextBlock(), bpp::AlignmentFilterMafIterator::nextBlock(), bpp::FullGapFilterMafIterator::nextBlock(), bpp::BlockMergerMafIterator::nextBlock(), bpp::DuplicateFilterMafIterator::nextBlock(), bpp::ChromosomeMafIterator::nextBlock(), bpp::SequenceFilterMafIterator::nextBlock(), and bpp::AbstractFilterMafIterator::operator=().
bool bpp::AlignmentFilter2MafIterator::keepTrashedBlocks_ [private] |
Definition at line 681 of file MafIterator.h.
Referenced by nextBlock().
OutputStream* bpp::AbstractFilterMafIterator::logstream_ [protected, inherited] |
Definition at line 324 of file MafIterator.h.
Referenced by bpp::FeatureExtractor::nextBlock(), bpp::FeatureFilterMafIterator::nextBlock(), bpp::QualityFilterMafIterator::nextBlock(), bpp::MaskFilterMafIterator::nextBlock(), nextBlock(), bpp::AlignmentFilterMafIterator::nextBlock(), bpp::FullGapFilterMafIterator::nextBlock(), bpp::BlockMergerMafIterator::nextBlock(), bpp::DuplicateFilterMafIterator::nextBlock(), bpp::ChromosomeMafIterator::nextBlock(), bpp::SequenceFilterMafIterator::nextBlock(), and bpp::AbstractFilterMafIterator::operator=().
unsigned int bpp::AlignmentFilter2MafIterator::maxGap_ [private] |
Definition at line 676 of file MafIterator.h.
Referenced by nextBlock().
unsigned int bpp::AlignmentFilter2MafIterator::maxPos_ [private] |
Definition at line 677 of file MafIterator.h.
Referenced by nextBlock().
std::vector<std::string> bpp::AlignmentFilter2MafIterator::species_ [private] |
Definition at line 673 of file MafIterator.h.
Referenced by nextBlock().
unsigned int bpp::AlignmentFilter2MafIterator::step_ [private] |
Definition at line 675 of file MafIterator.h.
Referenced by nextBlock().
std::deque<MafBlock*> bpp::AlignmentFilter2MafIterator::trashBuffer_ [private] |
Definition at line 679 of file MafIterator.h.
Referenced by nextBlock().
bool bpp::AbstractFilterMafIterator::verbose_ [protected, inherited] |
Definition at line 325 of file MafIterator.h.
Referenced by bpp::FeatureExtractor::nextBlock(), bpp::FeatureFilterMafIterator::nextBlock(), bpp::QualityFilterMafIterator::nextBlock(), bpp::MaskFilterMafIterator::nextBlock(), nextBlock(), bpp::AlignmentFilterMafIterator::nextBlock(), bpp::FullGapFilterMafIterator::nextBlock(), and bpp::AbstractFilterMafIterator::operator=().
std::deque< std::vector<bool> > bpp::AlignmentFilter2MafIterator::window_ [private] |
Definition at line 680 of file MafIterator.h.
Referenced by nextBlock().
unsigned int bpp::AlignmentFilter2MafIterator::windowSize_ [private] |
Definition at line 674 of file MafIterator.h.
Referenced by nextBlock().
1.6.3