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

Filter maf blocks to keep a the ones which display a specified combination of species. More...

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

+ Inheritance diagram for bpp::OrphanSequenceFilterMafIterator:
+ Collaboration diagram for bpp::OrphanSequenceFilterMafIterator:

Public Member Functions

 OrphanSequenceFilterMafIterator (MafIterator *iterator, const std::vector< std::string > &species, bool strict=false, bool keep=false, bool rmDuplicates=false)
 
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

 OrphanSequenceFilterMafIterator (const OrphanSequenceFilterMafIterator &iterator)
 
OrphanSequenceFilterMafIteratoroperator= (const OrphanSequenceFilterMafIterator &iterator)
 
MafBlockanalyseCurrentBlock_ ()
 

Private Attributes

std::vector< std::string > species_
 
bool strict_
 
bool rmDuplicates_
 

Detailed Description

Filter maf blocks to keep a the ones which display a specified combination of species.

This filter is typically used to retrieve "orphan" sequences, that is sequences only present in one (set of) species.

Definition at line 57 of file OrphanSequenceFilterMafIterator.h.

Constructor & Destructor Documentation

◆ OrphanSequenceFilterMafIterator() [1/2]

bpp::OrphanSequenceFilterMafIterator::OrphanSequenceFilterMafIterator ( MafIterator iterator,
const std::vector< std::string > &  species,
bool  strict = false,
bool  keep = false,
bool  rmDuplicates = false 
)
inline
Parameters
iteratorThe input iterator.
speciesThe list of species names to be retained.
strictIf true, then block that do not contain all of the specified species will be discarded.
keepIf true, then additional species sequences will be kept.
rmDuplicatesIf true, block that contain more than one instance for at least one species will be discarded.

Definition at line 73 of file OrphanSequenceFilterMafIterator.h.

◆ OrphanSequenceFilterMafIterator() [2/2]

bpp::OrphanSequenceFilterMafIterator::OrphanSequenceFilterMafIterator ( const OrphanSequenceFilterMafIterator iterator)
inlineprivate

Definition at line 85 of file OrphanSequenceFilterMafIterator.h.

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_()

MafBlock * OrphanSequenceFilterMafIterator::analyseCurrentBlock_ ( )
privatevirtual

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

◆ operator=()

OrphanSequenceFilterMafIterator& bpp::OrphanSequenceFilterMafIterator::operator= ( const OrphanSequenceFilterMafIterator iterator)
inlineprivate

Definition at line 92 of file OrphanSequenceFilterMafIterator.h.

References rmDuplicates_, species_, and strict_.

◆ 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

◆ currentBlock_

◆ iterationListeners_

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

Definition at line 89 of file MafIterator.h.

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

◆ iterator_

◆ logstream_

◆ rmDuplicates_

bool bpp::OrphanSequenceFilterMafIterator::rmDuplicates_
private

Definition at line 63 of file OrphanSequenceFilterMafIterator.h.

Referenced by operator=().

◆ species_

std::vector<std::string> bpp::OrphanSequenceFilterMafIterator::species_
private

Definition at line 61 of file OrphanSequenceFilterMafIterator.h.

Referenced by operator=().

◆ started_

bool bpp::AbstractMafIterator::started_
protectedinherited

Definition at line 90 of file MafIterator.h.

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

◆ strict_

bool bpp::OrphanSequenceFilterMafIterator::strict_
private

Definition at line 62 of file OrphanSequenceFilterMafIterator.h.

Referenced by operator=().

◆ verbose_

bool bpp::AbstractMafIterator::verbose_
protectedinherited

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