bpp-seq-omics
2.4.1
|
This iterator performs a simple SNP call from the MAF blocks, and outputs the results in the Variant Call Format (VCF). More...
#include <Bpp/Seq/Io/Maf/VcfOutputMafIterator.h>
Public Member Functions | |
VcfOutputMafIterator (MafIterator *iterator, std::ostream *out, const std::string &reference, const std::vector< std::string > &genotypes, bool outputAll=false, bool generateDiploids=false) | |
Build a new VcfOutputMafIterator object. More... | |
VcfOutputMafIterator (MafIterator *iterator, std::ostream *out, const std::string &reference, const std::vector< std::vector< std::string > > &genotypes, bool outputAll=false) | |
Build a new VcfOutputMafIterator 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 | |
VcfOutputMafIterator (const VcfOutputMafIterator &iterator) | |
VcfOutputMafIterator & | operator= (const VcfOutputMafIterator &iterator) |
void | writeHeader_ (std::ostream &out) const |
void | writeBlock_ (std::ostream &out, const MafBlock &block) const |
Private Attributes | |
std::ostream * | output_ |
std::string | refSpecies_ |
std::vector< std::vector< std::string > > | genotypes_ |
bool | outputAll_ |
bool | generateDiploids_ |
This iterator performs a simple SNP call from the MAF blocks, and outputs the results in the Variant Call Format (VCF).
Only substitutions are supported for now.
Definition at line 57 of file VcfOutputMafIterator.h.
|
inline |
Build a new VcfOutputMafIterator object.
iterator | The input iterator. |
out | The output stream where to write the VCF file. |
reference | The species to use as a reference. |
genotypes | A list of species for which genotype information should be written in the VCF file. There will be one extra column per genotype, +1 format column. |
outputAll | If true, also output non-variable positions. |
generateDiploids | If true, output artificial "homozygous" diploids. |
Definition at line 78 of file VcfOutputMafIterator.h.
References genotypes_, output_, and writeHeader_().
|
inline |
Build a new VcfOutputMafIterator object.
iterator | The input iterator. |
out | The output stream where to write the VCF file. |
reference | The species to use as a reference. |
genotypes | A list of species combinations for which genotype information should be written in the VCF file. There will be one extra column per genotype, +1 format column. When more than one sequence is specified in a combination, a (phased) polyploid genotype will be created. |
outputAll | If true, also output non-variable positions. |
Definition at line 99 of file VcfOutputMafIterator.h.
References output_, and writeHeader_().
|
inlineprivate |
Definition at line 107 of file VcfOutputMafIterator.h.
|
inlinevirtualinherited |
Implements bpp::MafIterator.
Definition at line 99 of file MafIterator.h.
References bpp::AbstractMafIterator::iterationListeners_.
|
inlinevirtual |
Implements bpp::AbstractMafIterator.
Definition at line 128 of file VcfOutputMafIterator.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 116 of file VcfOutputMafIterator.h.
References generateDiploids_, genotypes_, output_, outputAll_, and refSpecies_.
|
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 90 of file VcfOutputMafIterator.cpp.
References bpp::AlphabetTools::DNA_ALPHABET, bpp::MafBlock::getAlignment(), bpp::SequenceWithAnnotation::getAlphabet(), bpp::MafSequence::getChromosome(), bpp::SiteTools::getCounts(), bpp::Alphabet::getGapCharacterCode(), bpp::VectorSiteContainer::getNumberOfSites(), bpp::MafBlock::getSequenceForSpecies(), bpp::SequenceWalker::getSequencePosition(), bpp::MafBlock::getSequencesForSpecies(), bpp::VectorSiteContainer::getSite(), bpp::SiteTools::hasGap(), bpp::DNA::isUnresolved(), bpp::MafSequence::start(), and bpp::TextTools::toString().
Referenced by analyseCurrentBlock_().
|
private |
Definition at line 58 of file VcfOutputMafIterator.cpp.
Referenced by VcfOutputMafIterator().
|
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_(), analyseCurrentBlock_(), and bpp::AbstractFilterMafIterator::operator=().
|
private |
Definition at line 65 of file VcfOutputMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 63 of file VcfOutputMafIterator.h.
Referenced by operator=(), and VcfOutputMafIterator().
|
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_(), 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 61 of file VcfOutputMafIterator.h.
Referenced by analyseCurrentBlock_(), operator=(), and VcfOutputMafIterator().
|
private |
Definition at line 64 of file VcfOutputMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 62 of file VcfOutputMafIterator.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().