|
bpp-seq-omics
2.4.1
|
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) | |
| Create a new AlignmentFilter2MafIterator with absolute thresholds. More... | |
| AlignmentFilter2MafIterator (MafIterator *iterator, const std::vector< std::string > &species, unsigned int windowSize, unsigned int step, double maxPropGap, unsigned int maxPos, bool keepTrashedBlocks, bool missingAsGap) | |
| Create a new AlignmentFilterMafIterator with relative thresholds. More... | |
| MafBlock * | nextRemovedBlock () |
| Get the next available removed alignment block. More... | |
| void | setLogStream (std::shared_ptr< OutputStream > logstream) |
| void | addIterationListener (IterationListener *listener) |
| MafBlock * | nextBlock () |
| 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 ¤tBlock) |
| virtual void | fireIterationStopSignal_ () |
Protected Attributes | |
| MafIterator * | iterator_ |
| MafBlock * | currentBlock_ |
| std::shared_ptr< OutputStream > | logstream_ |
| std::vector< IterationListener * > | iterationListeners_ |
| bool | started_ |
| bool | verbose_ |
Private Member Functions | |
| MafBlock * | analyseCurrentBlock_ () |
Private Attributes | |
| std::vector< std::string > | species_ |
| unsigned int | windowSize_ |
| unsigned int | step_ |
| unsigned int | maxGap_ |
| double | maxPropGap_ |
| unsigned int | maxPos_ |
| std::deque< MafBlock * > | blockBuffer_ |
| std::deque< MafBlock * > | trashBuffer_ |
| std::deque< std::vector< bool > > | window_ |
| bool | keepTrashedBlocks_ |
| bool | missingAsGap_ |
| bool | relative_ |
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 176 of file AlignmentFilterMafIterator.h.
|
inline |
Create a new AlignmentFilter2MafIterator with absolute thresholds.
| iterator | Input iterator |
| species | Selection of species on which filtering criteria are applied. Results of filtering will be applied to all species. |
| windowSize | Size of the sliding window (nt). |
| step | Step by which windows are moved (nt). |
| maxGap | Maximum number of gaps allowed in the window. |
| maxPos | Maximum number of gaps "events" allowed. |
| keepTrashedBlocks | Removed windows are kept as separate blocks. |
| missingAsGap | Add missing species as gap sequences where needed. |
Definition at line 208 of file AlignmentFilterMafIterator.h.
|
inline |
Create a new AlignmentFilterMafIterator with relative thresholds.
| iterator | Input iterator |
| species | Selection of species on which filtering criteria are applied. Results of filtering will be applied to all species. |
| windowSize | Size of the sliding window (nt). |
| step | Step by which windows are moved (nt). |
| maxPropGap | Maximum proportion of gaps allowed in the window. |
| maxPos | Maximum number of gaps "events" allowed. |
| keepTrashedBlocks | Removed windows are kept as separate blocks. |
| missingAsGap | Add missing species as gap sequences where needed. |
Definition at line 237 of file AlignmentFilterMafIterator.h.
|
inlinevirtualinherited |
Implements bpp::MafIterator.
Definition at line 99 of file MafIterator.h.
References bpp::AbstractMafIterator::iterationListeners_.
|
privatevirtual |
Implements bpp::AbstractMafIterator.
Definition at line 274 of file AlignmentFilterMafIterator.cpp.
References bpp::MafBlock::addSequence(), count(), bpp::ApplicationTools::displayGauge(), bpp::ApplicationTools::displayTask(), bpp::ApplicationTools::displayTaskDone(), bpp::AlphabetTools::DNA_ALPHABET, bpp::SequenceWithAnnotation::getContent(), bpp::MafBlock::getDescription(), bpp::DNA::getGapCharacterCode(), bpp::MafBlock::getNumberOfSequences(), bpp::MafBlock::getNumberOfSites(), bpp::MafBlock::getPass(), bpp::MafBlock::getScore(), bpp::MafBlock::getSequence(), bpp::MafBlock::getSequenceForSpecies(), bpp::MafBlock::getSpeciesList(), bpp::DNA::getUnknownCharacterCode(), bpp::MafBlock::hasSequenceForSpecies(), bpp::ApplicationTools::message, bpp::MafBlock::setPass(), bpp::MafBlock::setScore(), bpp::MafSequence::subSequence(), bpp::TextTools::toString(), and bpp::VectorTools::vectorIntersection().
|
protectedvirtualinherited |
Definition at line 57 of file MafIterator.cpp.
Referenced by bpp::AbstractMafIterator::nextBlock().
|
protectedvirtualinherited |
Definition at line 51 of file MafIterator.cpp.
Referenced by bpp::AbstractMafIterator::nextBlock().
|
protectedvirtualinherited |
Definition at line 63 of file MafIterator.cpp.
Referenced by bpp::AbstractMafIterator::nextBlock().
|
inlinevirtualinherited |
Implements bpp::MafIterator.
Definition at line 116 of file MafIterator.h.
References bpp::AbstractMafIterator::verbose_.
|
inlinevirtualinherited |
Get the next available alignment block.
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_.
|
inlinevirtual |
Get the next available removed alignment block.
Implements bpp::MafTrashIterator.
Definition at line 254 of file AlignmentFilterMafIterator.h.
References trashBuffer_.
|
inlineinherited |
Definition at line 178 of file MafIterator.h.
References bpp::AbstractFilterMafIterator::logstream_.
|
inlinevirtualinherited |
Implements bpp::MafIterator.
Definition at line 117 of file MafIterator.h.
References bpp::AbstractMafIterator::verbose_.
|
private |
Definition at line 187 of file AlignmentFilterMafIterator.h.
|
protectedinherited |
Definition at line 154 of file MafIterator.h.
Referenced by bpp::BlockLengthMafIterator::analyseCurrentBlock_(), bpp::BlockSizeMafIterator::analyseCurrentBlock_(), bpp::MafIteratorSynchronizer::analyseCurrentBlock_(), bpp::MsmcOutputMafIterator::analyseCurrentBlock_(), bpp::OrderFilterMafIterator::analyseCurrentBlock_(), bpp::OutputMafIterator::analyseCurrentBlock_(), bpp::PlinkOutputMafIterator::analyseCurrentBlock_(), bpp::SequenceStatisticsMafIterator::analyseCurrentBlock_(), bpp::TableOutputMafIterator::analyseCurrentBlock_(), bpp::VcfOutputMafIterator::analyseCurrentBlock_(), and bpp::AbstractFilterMafIterator::operator=().
|
protectedinherited |
Definition at line 89 of file MafIterator.h.
Referenced by bpp::AbstractMafIterator::addIterationListener().
|
protectedinherited |
Definition at line 153 of file MafIterator.h.
Referenced by bpp::BlockLengthMafIterator::analyseCurrentBlock_(), bpp::BlockSizeMafIterator::analyseCurrentBlock_(), bpp::MafIteratorSynchronizer::analyseCurrentBlock_(), bpp::MsmcOutputMafIterator::analyseCurrentBlock_(), bpp::OrderFilterMafIterator::analyseCurrentBlock_(), bpp::OutputMafIterator::analyseCurrentBlock_(), bpp::PlinkOutputMafIterator::analyseCurrentBlock_(), bpp::SequenceStatisticsMafIterator::analyseCurrentBlock_(), bpp::TableOutputMafIterator::analyseCurrentBlock_(), bpp::VcfOutputMafIterator::analyseCurrentBlock_(), and bpp::AbstractFilterMafIterator::operator=().
|
private |
Definition at line 190 of file AlignmentFilterMafIterator.h.
|
protectedinherited |
Definition at line 155 of file MafIterator.h.
Referenced by bpp::BlockLengthMafIterator::analyseCurrentBlock_(), bpp::BlockSizeMafIterator::analyseCurrentBlock_(), bpp::AbstractFilterMafIterator::operator=(), and bpp::AbstractFilterMafIterator::setLogStream().
|
private |
Definition at line 184 of file AlignmentFilterMafIterator.h.
|
private |
Definition at line 186 of file AlignmentFilterMafIterator.h.
|
private |
Definition at line 185 of file AlignmentFilterMafIterator.h.
|
private |
Definition at line 191 of file AlignmentFilterMafIterator.h.
|
private |
Definition at line 192 of file AlignmentFilterMafIterator.h.
|
private |
Definition at line 181 of file AlignmentFilterMafIterator.h.
|
protectedinherited |
Definition at line 90 of file MafIterator.h.
Referenced by bpp::AbstractMafIterator::nextBlock().
|
private |
Definition at line 183 of file AlignmentFilterMafIterator.h.
|
private |
Definition at line 188 of file AlignmentFilterMafIterator.h.
Referenced by nextRemovedBlock().
|
protectedinherited |
Definition at line 91 of file MafIterator.h.
Referenced by bpp::AbstractMafIterator::isVerbose(), and bpp::AbstractMafIterator::setVerbose().
|
private |
Definition at line 189 of file AlignmentFilterMafIterator.h.
|
private |
Definition at line 182 of file AlignmentFilterMafIterator.h.