bpp-seq-omics
2.4.1
|
This iterator forward the iterator given as input after having printed its content to an alignment file. The syntax for ENSEMBL meta data is used. More...
#include <Bpp/Seq/Io/Maf/OutputAlignmentMafIterator.h>
Public Member Functions | |
OutputAlignmentMafIterator (MafIterator *iterator, std::ostream *out, OAlignment *writer, bool mask=true, bool outputCoordinates=true, bool addLDHatHeader=false, const std::string &reference="") | |
Creates a new OutputAlignmentMafIterator object. More... | |
OutputAlignmentMafIterator (MafIterator *iterator, const std::string &file, OAlignment *writer, bool mask=true, bool outputCoordinates=true, bool addLDHatHeader=false, const std::string &reference="") | |
Creates a new OutputAlignmentMafIterator object. More... | |
~OutputAlignmentMafIterator () | |
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 | |
OutputAlignmentMafIterator (const OutputAlignmentMafIterator &iterator) | |
OutputAlignmentMafIterator & | operator= (const OutputAlignmentMafIterator &iterator) |
MafBlock * | analyseCurrentBlock_ () |
void | writeBlock (std::ostream &out, const MafBlock &block) const |
Private Attributes | |
std::ostream * | output_ |
std::string | file_ |
bool | mask_ |
bool | outputCoordinates_ |
bool | addLDHatHeader_ |
std::unique_ptr< OAlignment > | writer_ |
unsigned int | currentBlockIndex_ |
std::string | refSpecies_ |
This iterator forward the iterator given as input after having printed its content to an alignment file. The syntax for ENSEMBL meta data is used.
Definition at line 59 of file OutputAlignmentMafIterator.h.
|
inline |
Creates a new OutputAlignmentMafIterator object.
All block will be printed as separate alignment, yet one after the other on the stream. Be aware that not all format will recognize the resulting file as a multiple alignment file (Mase and Clustal will for instance, not Fasta).
iterator | The input iterator |
out | A pointer toward the output stream. The stream will not be own by this instance, and will not be copied neither destroyed. |
writer | A pointer toward an alignment writer object which specifies the format to use when writing sequences. The underlying object will be own by this instance, and destroyed when this object is deleted. |
mask | Tell if sequences should be printed masked (if applicable). |
outputCoordinates | Tell if coordinates should be written in sequence headers, if any. |
addLDHatHeader | Tell if first line of file should contain number and lenght of sequences (for instance for use with LDhat/convert). |
reference | [optional] specify a reference species which can be used to configure file names (for instance using coordinates information). |
Definition at line 88 of file OutputAlignmentMafIterator.h.
|
inline |
Creates a new OutputAlignmentMafIterator object.
All block will be printed as separate alignment, yet one after the other on the stream. Be aware that not all format will recognize the resulting file as a multiple alignment file (Mase and Clustal will for instance, not Fasta).
iterator | The input iterator |
file | A string describing the path to the output files. Each block will be written to a distinct file. If "file" is a fixed string, it will only contain the last block. Using the i code in the file name allows to generate one file per block, i denoting the block index. |
writer | A pointer toward an alignment writer object which specifies the format to use when writing sequences. The underlying object will be own by this instance, and destroyed when this object is deleted. |
mask | Tell if sequences should be printed masked (if applicable). |
outputCoordinates | Tell if coordinates should be written in sequence headers, if any. |
addLDHatHeader | Tell if first line of file should contain number and lenght of sequences (for instance for use with LDhat/convert). |
reference | [optional] specify a reference species which can be used to configure file names (for instance using coordinates information). |
Definition at line 126 of file OutputAlignmentMafIterator.h.
|
inline |
Definition at line 148 of file OutputAlignmentMafIterator.h.
|
inlineprivate |
Definition at line 151 of file OutputAlignmentMafIterator.h.
|
inlinevirtualinherited |
Implements bpp::MafIterator.
Definition at line 99 of file MafIterator.h.
References bpp::AbstractMafIterator::iterationListeners_.
|
privatevirtual |
Implements bpp::AbstractMafIterator.
Definition at line 53 of file OutputAlignmentMafIterator.cpp.
References bpp::MafSequence::getChromosome(), bpp::MafBlock::getSequenceForSpecies(), bpp::MafBlock::hasSequenceForSpecies(), bpp::TextTools::replaceAll(), bpp::MafSequence::start(), bpp::MafSequence::stop(), 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_.
|
inlineprivate |
Definition at line 163 of file OutputAlignmentMafIterator.h.
References addLDHatHeader_, currentBlockIndex_, file_, mask_, output_, outputCoordinates_, refSpecies_, and writer_.
|
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 82 of file OutputAlignmentMafIterator.cpp.
References bpp::AlphabetTools::DNA_ALPHABET, bpp::MafBlock::getAlignment(), bpp::MafSequence::getChromosome(), bpp::AlignedSequenceContainer::getNumberOfSequences(), bpp::AlignedSequenceContainer::getNumberOfSites(), bpp::MafBlock::getSequence(), bpp::MafSequence::getSpecies(), bpp::MafSequence::getStrand(), bpp::MafSequence::hasCoordinates(), bpp::AlignedSequenceContainer::setSequencesNames(), bpp::MafSequence::start(), bpp::MafSequence::stop(), and bpp::TextTools::toString().
|
private |
Definition at line 67 of file OutputAlignmentMafIterator.h.
Referenced by operator=().
|
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 69 of file OutputAlignmentMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 64 of file OutputAlignmentMafIterator.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_(), 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 65 of file OutputAlignmentMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 63 of file OutputAlignmentMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 66 of file OutputAlignmentMafIterator.h.
Referenced by operator=().
|
private |
Definition at line 70 of file OutputAlignmentMafIterator.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().
|
private |
Definition at line 68 of file OutputAlignmentMafIterator.h.
Referenced by operator=().