bpp-seq-omics
2.4.1
|
Translate features coordinates from one species to another, based on the alignment. More...
#include <Bpp/Seq/Io/Maf/CoordinateTranslatorMafIterator.h>
Public Member Functions | |
CoordinateTranslatorMafIterator (MafIterator *iterator, const std::string &referenceSpecies, const std::string &targetSpecies, const SequenceFeatureSet &features, std::ostream &output, bool outputClosestCoordinate=true) | |
Build a new CoordinateTranslator iterator. More... | |
virtual | ~CoordinateTranslatorMafIterator () |
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::string | referenceSpecies_ |
std::string | targetSpecies_ |
std::map< std::string, SequenceFeatureSet * > | inputFeaturesPerChr_ |
std::ostream & | output_ |
bool | outputClosestCoordinate_ |
Translate features coordinates from one species to another, based on the alignment.
This filter is similar in principle to the UCSC "liftOver" utility and software alike. For now, only write a text file with all coordinates from reference and corresponding target sequence.
Definition at line 61 of file CoordinateTranslatorMafIterator.h.
|
inline |
Build a new CoordinateTranslator iterator.
iterator | The input iterator |
referenceSpecies | The reference species for feature coordinates |
targetSpecies | The target species for which features coordinates should be translated |
features | The set of features to lift over |
output | Output stream for translated coordinates |
outputClosestCoordinate | In case the target sequence has a gap at the corresponding position, tells if the previous non-gap position should be returned, or NA. |
Definition at line 83 of file CoordinateTranslatorMafIterator.h.
References bpp::SequenceFeatureSet::getSequences(), bpp::SequenceFeatureSet::getSubsetForSequence(), inputFeaturesPerChr_, and output_.
|
inlinevirtual |
Definition at line 109 of file CoordinateTranslatorMafIterator.h.
References inputFeaturesPerChr_.
|
inlinevirtualinherited |
Implements bpp::MafIterator.
Definition at line 99 of file MafIterator.h.
References bpp::AbstractMafIterator::iterationListeners_.
|
privatevirtual |
Implements bpp::AbstractMafIterator.
Definition at line 54 of file CoordinateTranslatorMafIterator.cpp.
References bpp::RangeSet< class >::addRange(), bpp::ApplicationTools::displayGauge(), bpp::ApplicationTools::displayTask(), bpp::ApplicationTools::displayTaskDone(), bpp::SequenceWalker::getAlignmentPosition(), bpp::SequenceWithAnnotation::getAlphabet(), bpp::MafSequence::getChromosome(), bpp::MafSequence::getRange(), bpp::SequenceWalker::getSequencePosition(), bpp::RangeSet< class >::getSet(), bpp::MafSequence::getSrcSize(), bpp::SeqRange::getStrand(), bpp::MafSequence::getStrand(), bpp::Alphabet::isGap(), bpp::ApplicationTools::message, bpp::MafSequence::start(), and bpp::TextTools::toString().
|
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_.
|
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_.
|
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 67 of file CoordinateTranslatorMafIterator.h.
Referenced by CoordinateTranslatorMafIterator(), and ~CoordinateTranslatorMafIterator().
|
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 68 of file CoordinateTranslatorMafIterator.h.
Referenced by CoordinateTranslatorMafIterator().
|
private |
Definition at line 69 of file CoordinateTranslatorMafIterator.h.
|
private |
Definition at line 65 of file CoordinateTranslatorMafIterator.h.
|
protectedinherited |
Definition at line 90 of file MafIterator.h.
Referenced by bpp::AbstractMafIterator::nextBlock().
|
private |
Definition at line 66 of file CoordinateTranslatorMafIterator.h.
|
protectedinherited |
Definition at line 91 of file MafIterator.h.
Referenced by bpp::AbstractMafIterator::isVerbose(), and bpp::AbstractMafIterator::setVerbose().