bpp-seq-omics
2.4.1
|
This iterator outputs all SNPs in the format readable by MSMC. More...
#include <Bpp/Seq/Io/Maf/MsmcOutputMafIterator.h>
Public Member Functions | |
MsmcOutputMafIterator (MafIterator *iterator, std::ostream *out, const std::vector< std::string > &species, const std::string &reference) | |
Build a new MsmcOutputMafIterator object. More... | |
MafBlock * | analyseCurrentBlock_ () |
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 | |
MsmcOutputMafIterator (const MsmcOutputMafIterator &iterator) | |
MsmcOutputMafIterator & | operator= (const MsmcOutputMafIterator &iterator) |
void | writeBlock_ (std::ostream &out, const MafBlock &block) |
Private Attributes | |
std::ostream * | output_ |
std::vector< std::string > | species_ |
std::string | refSpecies_ |
std::string | currentChr_ |
size_t | lastPosition_ |
unsigned int | nbOfCalledSites_ |
This iterator outputs all SNPs in the format readable by MSMC.
See https://github.com/stschiff/msmc for a format description.
Definition at line 57 of file MsmcOutputMafIterator.h.
|
inline |
Build a new MsmcOutputMafIterator object.
iterator | The input iterator. |
out | The output stream where to write the MSMC file. |
species | A list of at least two species to compute SNPs. Only blocks containing at least these two species will be used. In case one species is duplicated in a block, the first sequence will be used. |
reference | The species to use as a reference for coordinates. It does not have to be one of the selected species on which SNPs are computed. |
Definition at line 80 of file MsmcOutputMafIterator.h.
|
inlineprivate |
Definition at line 90 of file MsmcOutputMafIterator.h.
|
inlinevirtualinherited |
Implements bpp::MafIterator.
Definition at line 99 of file MafIterator.h.
References bpp::AbstractMafIterator::iterationListeners_.
|
inlinevirtual |
Implements bpp::AbstractMafIterator.
Definition at line 113 of file MsmcOutputMafIterator.h.
References bpp::AbstractFilterMafIterator::currentBlock_, bpp::AbstractFilterMafIterator::iterator_, bpp::MafIterator::nextBlock(), output_, and writeBlock_().
|
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_.
|
inlineprivate |
Definition at line 100 of file MsmcOutputMafIterator.h.
References currentChr_, lastPosition_, nbOfCalledSites_, output_, refSpecies_, 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 58 of file MsmcOutputMafIterator.cpp.
References bpp::VectorSiteContainer::addSequence(), bpp::AlphabetTools::DNA_ALPHABET, bpp::SequenceWithAnnotation::getAlphabet(), bpp::MafSequence::getChromosome(), bpp::MafSequence::getDescription(), bpp::Alphabet::getGapCharacterCode(), bpp::VectorSiteContainer::getNumberOfSites(), bpp::MafBlock::getSequenceForSpecies(), bpp::SequenceWalker::getSequencePosition(), bpp::VectorSiteContainer::getSite(), bpp::MafBlock::hasSequenceForSpecies(), bpp::SiteTools::isComplete(), bpp::SiteTools::isConstant(), bpp::MafSequence::start(), bpp::MafSequence::stop(), bpp::Site::toString(), and bpp::TextTools::toString().
Referenced by analyseCurrentBlock_().
|
protectedinherited |
Definition at line 154 of file MafIterator.h.
Referenced by bpp::BlockLengthMafIterator::analyseCurrentBlock_(), bpp::BlockSizeMafIterator::analyseCurrentBlock_(), bpp::MafIteratorSynchronizer::analyseCurrentBlock_(), 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 64 of file MsmcOutputMafIterator.h.
Referenced by 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_(), 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 65 of file MsmcOutputMafIterator.h.
Referenced by 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 66 of file MsmcOutputMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 61 of file MsmcOutputMafIterator.h.
Referenced by analyseCurrentBlock_(), and operator=().
|
private |
Definition at line 63 of file MsmcOutputMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 62 of file MsmcOutputMafIterator.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().