bpp-seq-omics
2.4.1
|
Merge blocks if some of their sequences are contiguous. More...
#include <Bpp/Seq/Io/Maf/BlockMergerMafIterator.h>
Public Member Functions | |
BlockMergerMafIterator (MafIterator *iterator, const std::vector< std::string > &species, unsigned int maxDist=0, bool renameChimericChromosomes=false) | |
void | ignoreChromosome (const std::string &chr) |
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 | |
BlockMergerMafIterator (const BlockMergerMafIterator &iterator) | |
BlockMergerMafIterator & | operator= (const BlockMergerMafIterator &iterator) |
MafBlock * | analyseCurrentBlock_ () |
Private Attributes | |
std::vector< std::string > | species_ |
MafBlock * | incomingBlock_ |
std::vector< std::string > | ignoreChrs_ |
unsigned int | maxDist_ |
bool | renameChimericChromosomes_ |
std::map< std::string, unsigned int > | chimericChromosomeCounts_ |
Merge blocks if some of their sequences are contiguous.
The user specifies the focus species. Sequences that are not in this set will be automatically merged and their coordinates removed. The scores, if any, will be averaged for the block, weighted by the corresponding block sizes. The pass value will be removed if it is different for the two blocks. It is possible to define a maximum distance for the merging. Setting a distance of zero implies that the blocks have to be exactly contiguous. Alternatively, the appropriate number of 'N' will be inserted in all species. All species however have to be distant of the exact same amount.
Definition at line 63 of file BlockMergerMafIterator.h.
|
inline |
Definition at line 75 of file BlockMergerMafIterator.h.
References incomingBlock_, and bpp::MafIterator::nextBlock().
|
inlineprivate |
Definition at line 88 of file BlockMergerMafIterator.h.
|
inlinevirtualinherited |
Implements bpp::MafIterator.
Definition at line 99 of file MafIterator.h.
References bpp::AbstractMafIterator::iterationListeners_.
|
privatevirtual |
Implements bpp::AbstractMafIterator.
Definition at line 50 of file BlockMergerMafIterator.cpp.
References bpp::MafBlock::addSequence(), bpp::VectorTools::contains(), bpp::AlphabetTools::DNA_ALPHABET, bpp::MafSequence::getChromosome(), bpp::MafSequence::getSrcSize(), bpp::MafSequence::getStrand(), bpp::MafSequence::hasCoordinates(), bpp::MafBlock::setPass(), bpp::MafBlock::setScore(), bpp::MafSequence::start(), bpp::MafSequence::stop(), bpp::TextTools::toString(), bpp::VectorTools::unique(), and bpp::VectorTools::vectorUnion().
|
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().
|
inline |
brief Add a chromosome that should be ignored to the list.
chr | The name of the chromosome to be ignored. |
Definition at line 114 of file BlockMergerMafIterator.h.
References ignoreChrs_.
|
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_.
|
inlineprivate |
Definition at line 98 of file BlockMergerMafIterator.h.
References chimericChromosomeCounts_, ignoreChrs_, incomingBlock_, maxDist_, renameChimericChromosomes_, and species_.
|
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 72 of file BlockMergerMafIterator.h.
Referenced by operator=().
|
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=().
|
private |
Definition at line 69 of file BlockMergerMafIterator.h.
Referenced by ignoreChromosome(), and operator=().
|
private |
Definition at line 68 of file BlockMergerMafIterator.h.
Referenced by BlockMergerMafIterator(), and 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=().
|
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 70 of file BlockMergerMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 71 of file BlockMergerMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 67 of file BlockMergerMafIterator.h.
Referenced by operator=().
|
protectedinherited |
Definition at line 90 of file MafIterator.h.
Referenced by bpp::AbstractMafIterator::nextBlock().
|
protectedinherited |
Definition at line 91 of file MafIterator.h.
Referenced by bpp::AbstractMafIterator::isVerbose(), and bpp::AbstractMafIterator::setVerbose().