bpp-seq-omics  2.4.1
bpp::FeatureExtractorMafIterator Class Reference

Extract alignments corresponding to sequence features given as a vector of SequenceFeature objects. More...

#include <Bpp/Seq/Io/Maf/FeatureExtractorMafIterator.h>

+ Inheritance diagram for bpp::FeatureExtractorMafIterator:
+ Collaboration diagram for bpp::FeatureExtractorMafIterator:

Public Member Functions

 FeatureExtractorMafIterator (MafIterator *iterator, const std::string &refSpecies, const SequenceFeatureSet &features, bool complete=false, bool ignoreStrand=false)
 Build a new FeatureExtractor iterator. More...
 
void setLogStream (std::shared_ptr< OutputStream > logstream)
 
void addIterationListener (IterationListener *listener)
 
MafBlocknextBlock ()
 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 &currentBlock)
 
virtual void fireIterationStopSignal_ ()
 

Protected Attributes

MafIteratoriterator_
 
MafBlockcurrentBlock_
 
std::shared_ptr< OutputStreamlogstream_
 
std::vector< IterationListener * > iterationListeners_
 
bool started_
 
bool verbose_
 

Private Member Functions

MafBlockanalyseCurrentBlock_ ()
 

Private Attributes

std::string refSpecies_
 
bool completeOnly_
 
bool ignoreStrand_
 
std::deque< MafBlock * > blockBuffer_
 
std::map< std::string, RangeSet< size_t > > ranges_
 

Detailed Description

Extract alignments corresponding to sequence features given as a vector of SequenceFeature objects.

The resulting blocks will contain the specified annotated regions. Note that this iterator is not the opposite of FeatureFilterMafIterator, as overlapping features will all be extracted. This iterator may therefore results in duplication of original data.

Definition at line 60 of file FeatureExtractorMafIterator.h.

Constructor & Destructor Documentation

◆ FeatureExtractorMafIterator()

bpp::FeatureExtractorMafIterator::FeatureExtractorMafIterator ( MafIterator iterator,
const std::string &  refSpecies,
const SequenceFeatureSet features,
bool  complete = false,
bool  ignoreStrand = false 
)
inline

Build a new FeatureExtractor iterator.

Parameters
iteratorThe input iterator
refSpeciesThe reference species for feature coordinates
completeTell if features should be extracted only if they can be extracted in full
featuresThe set of features to extract
ignoreStrandIf true, features will be extracted 'as is', without being reversed in case they are on the negative strand.

Definition at line 80 of file FeatureExtractorMafIterator.h.

References bpp::SequenceFeatureSet::fillRangeCollectionForSequence(), bpp::SequenceFeatureSet::getSequences(), and ranges_.

Member Function Documentation

◆ addIterationListener()

void bpp::AbstractMafIterator::addIterationListener ( IterationListener listener)
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 99 of file MafIterator.h.

References bpp::AbstractMafIterator::iterationListeners_.

◆ analyseCurrentBlock_()

◆ fireIterationMoveSignal_()

void AbstractMafIterator::fireIterationMoveSignal_ ( const MafBlock currentBlock)
protectedvirtualinherited

Definition at line 57 of file MafIterator.cpp.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ fireIterationStartSignal_()

void AbstractMafIterator::fireIterationStartSignal_ ( )
protectedvirtualinherited

Definition at line 51 of file MafIterator.cpp.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ fireIterationStopSignal_()

void AbstractMafIterator::fireIterationStopSignal_ ( )
protectedvirtualinherited

Definition at line 63 of file MafIterator.cpp.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ isVerbose()

bool bpp::AbstractMafIterator::isVerbose ( ) const
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 116 of file MafIterator.h.

References bpp::AbstractMafIterator::verbose_.

◆ nextBlock()

MafBlock* bpp::AbstractMafIterator::nextBlock ( )
inlinevirtualinherited

Get the next available alignment block.

Returns
A maf alignment block, or a null pointer if no more block is available.

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_.

◆ setLogStream()

void bpp::AbstractFilterMafIterator::setLogStream ( std::shared_ptr< OutputStream logstream)
inlineinherited

Definition at line 178 of file MafIterator.h.

References bpp::AbstractFilterMafIterator::logstream_.

◆ setVerbose()

void bpp::AbstractMafIterator::setVerbose ( bool  yn)
inlinevirtualinherited

Implements bpp::MafIterator.

Definition at line 117 of file MafIterator.h.

References bpp::AbstractMafIterator::verbose_.

Member Data Documentation

◆ blockBuffer_

std::deque<MafBlock*> bpp::FeatureExtractorMafIterator::blockBuffer_
private

Definition at line 67 of file FeatureExtractorMafIterator.h.

◆ completeOnly_

bool bpp::FeatureExtractorMafIterator::completeOnly_
private

Definition at line 65 of file FeatureExtractorMafIterator.h.

◆ currentBlock_

◆ ignoreStrand_

bool bpp::FeatureExtractorMafIterator::ignoreStrand_
private

Definition at line 66 of file FeatureExtractorMafIterator.h.

◆ iterationListeners_

std::vector<IterationListener*> bpp::AbstractMafIterator::iterationListeners_
protectedinherited

Definition at line 89 of file MafIterator.h.

Referenced by bpp::AbstractMafIterator::addIterationListener().

◆ iterator_

◆ logstream_

◆ ranges_

std::map<std::string, RangeSet<size_t> > bpp::FeatureExtractorMafIterator::ranges_
private

Definition at line 68 of file FeatureExtractorMafIterator.h.

Referenced by FeatureExtractorMafIterator().

◆ refSpecies_

std::string bpp::FeatureExtractorMafIterator::refSpecies_
private

Definition at line 64 of file FeatureExtractorMafIterator.h.

◆ started_

bool bpp::AbstractMafIterator::started_
protectedinherited

Definition at line 90 of file MafIterator.h.

Referenced by bpp::AbstractMafIterator::nextBlock().

◆ verbose_

bool bpp::AbstractMafIterator::verbose_
protectedinherited

The documentation for this class was generated from the following files: