Merge blocks if some of their sequences are contiguous. More...
#include <Bpp/Seq/Io/MafIterator.h>


Public Member Functions | |
| BlockMergerMafIterator (MafIterator *iterator, const std::vector< std::string > &species, unsigned int maxDist=0) | |
| MafBlock * | nextBlock () throw (Exception) |
| Get the next available alignment block. | |
| void | ignoreChromosome (const std::string &chr) |
| void | setLogStream (OutputStream *logstream) |
| bool | verbose () const |
| void | verbose (bool yn) |
Protected Attributes | |
| MafIterator * | iterator_ |
| OutputStream * | logstream_ |
| bool | verbose_ |
Private Member Functions | |
| BlockMergerMafIterator (const BlockMergerMafIterator &iterator) | |
| BlockMergerMafIterator & | operator= (const BlockMergerMafIterator &iterator) |
Private Attributes | |
| std::vector< std::string > | species_ |
| MafBlock * | incomingBlock_ |
| MafBlock * | currentBlock_ |
| std::vector< std::string > | ignoreChrs_ |
| unsigned int | maxDist_ |
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 537 of file MafIterator.h.
| bpp::BlockMergerMafIterator::BlockMergerMafIterator | ( | MafIterator * | iterator, | |
| const std::vector< std::string > & | species, | |||
| unsigned int | maxDist = 0 | |||
| ) | [inline] |
Definition at line 548 of file MafIterator.h.
References bpp::MafIterator::nextBlock().
| bpp::BlockMergerMafIterator::BlockMergerMafIterator | ( | const BlockMergerMafIterator & | iterator | ) | [inline, private] |
Definition at line 560 of file MafIterator.h.
| void bpp::BlockMergerMafIterator::ignoreChromosome | ( | const std::string & | chr | ) | [inline] |
brief Add a chromosome that should be ignored to the list.
| chr | The name of the chromosome to be ignored. |
Definition at line 586 of file MafIterator.h.
Get the next available alignment block.
Implements bpp::MafIterator.
Definition at line 207 of file MafIterator.cpp.
References bpp::MafBlock::addSequence(), bpp::VectorTools::contains(), currentBlock_, bpp::AlphabetTools::DNA_ALPHABET, bpp::MafSequence::getChromosome(), bpp::MafBlock::getNumberOfSites(), bpp::MafBlock::getPass(), bpp::MafBlock::getScore(), bpp::MafBlock::getSequenceForSpecies(), bpp::MafBlock::getSpeciesList(), bpp::MafSequence::getStrand(), bpp::MafSequence::hasCoordinates(), ignoreChrs_, incomingBlock_, bpp::AbstractFilterMafIterator::iterator_, bpp::AbstractFilterMafIterator::logstream_, maxDist_, bpp::MafIterator::nextBlock(), bpp::MafBlock::setPass(), bpp::MafBlock::setScore(), species_, bpp::MafSequence::start(), bpp::MafSequence::stop(), bpp::VectorTools::unique(), and bpp::VectorTools::vectorUnion().
| BlockMergerMafIterator& bpp::BlockMergerMafIterator::operator= | ( | const BlockMergerMafIterator & | iterator | ) | [inline, private] |
Definition at line 569 of file MafIterator.h.
References currentBlock_, ignoreChrs_, incomingBlock_, maxDist_, and species_.
| 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.
Definition at line 543 of file MafIterator.h.
Referenced by nextBlock(), and operator=().
std::vector<std::string> bpp::BlockMergerMafIterator::ignoreChrs_ [private] |
Definition at line 544 of file MafIterator.h.
Referenced by nextBlock(), and operator=().
Definition at line 542 of file MafIterator.h.
Referenced by nextBlock(), and operator=().
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(), bpp::AlignmentFilter2MafIterator::nextBlock(), bpp::AlignmentFilterMafIterator::nextBlock(), bpp::FullGapFilterMafIterator::nextBlock(), nextBlock(), bpp::DuplicateFilterMafIterator::nextBlock(), bpp::ChromosomeMafIterator::nextBlock(), bpp::SequenceFilterMafIterator::nextBlock(), and bpp::AbstractFilterMafIterator::operator=().
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(), bpp::AlignmentFilter2MafIterator::nextBlock(), bpp::AlignmentFilterMafIterator::nextBlock(), bpp::FullGapFilterMafIterator::nextBlock(), nextBlock(), bpp::DuplicateFilterMafIterator::nextBlock(), bpp::ChromosomeMafIterator::nextBlock(), bpp::SequenceFilterMafIterator::nextBlock(), and bpp::AbstractFilterMafIterator::operator=().
unsigned int bpp::BlockMergerMafIterator::maxDist_ [private] |
Definition at line 545 of file MafIterator.h.
Referenced by nextBlock(), and operator=().
std::vector<std::string> bpp::BlockMergerMafIterator::species_ [private] |
Definition at line 541 of file MafIterator.h.
Referenced by nextBlock(), and operator=().
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(), bpp::AlignmentFilter2MafIterator::nextBlock(), bpp::AlignmentFilterMafIterator::nextBlock(), bpp::FullGapFilterMafIterator::nextBlock(), and bpp::AbstractFilterMafIterator::operator=().
1.6.3