bpp-seq3  3.0.0
bpp::SequenceWalker Class Reference

A helper class to easily convert coordinates between sequence and alignments. More...

#include <Bpp/Seq/SequenceWalker.h>

+ Collaboration diagram for bpp::SequenceWalker:

Public Member Functions

 SequenceWalker (const SequenceInterface &seq)
 
 SequenceWalker (const SequenceWalker &walker)
 
SequenceWalkeroperator= (const SequenceWalker &walker)
 
virtual ~SequenceWalker ()
 
size_t getAlignmentPosition (size_t seqPos)
 
size_t getSequencePosition (size_t alnPos)
 

Private Attributes

const SequenceInterfaceseq_
 
size_t seqPos_
 
size_t alnPos_
 
int gap_
 

Detailed Description

A helper class to easily convert coordinates between sequence and alignments.

Coordinates are 0-based. The walker will be more efficient if coordinates are called in pre-ordered way.

Definition at line 19 of file SequenceWalker.h.

Constructor & Destructor Documentation

◆ SequenceWalker() [1/2]

bpp::SequenceWalker::SequenceWalker ( const SequenceInterface seq)
inline

Definition at line 27 of file SequenceWalker.h.

References alnPos_, gap_, seq_, and bpp::CruxSymbolListInterface::size().

◆ SequenceWalker() [2/2]

bpp::SequenceWalker::SequenceWalker ( const SequenceWalker walker)
inline

Definition at line 36 of file SequenceWalker.h.

◆ ~SequenceWalker()

virtual bpp::SequenceWalker::~SequenceWalker ( )
inlinevirtual

Definition at line 46 of file SequenceWalker.h.

Member Function Documentation

◆ getAlignmentPosition()

size_t SequenceWalker::getAlignmentPosition ( size_t  seqPos)

Definition at line 16 of file SequenceWalker.cpp.

◆ getSequencePosition()

size_t SequenceWalker::getSequencePosition ( size_t  alnPos)

Definition at line 56 of file SequenceWalker.cpp.

◆ operator=()

SequenceWalker& bpp::SequenceWalker::operator= ( const SequenceWalker walker)
inline

Definition at line 38 of file SequenceWalker.h.

References alnPos_, gap_, seq_, and seqPos_.

Member Data Documentation

◆ alnPos_

size_t bpp::SequenceWalker::alnPos_
private

Definition at line 23 of file SequenceWalker.h.

Referenced by operator=(), and SequenceWalker().

◆ gap_

int bpp::SequenceWalker::gap_
private

Definition at line 24 of file SequenceWalker.h.

Referenced by operator=(), and SequenceWalker().

◆ seq_

const SequenceInterface* bpp::SequenceWalker::seq_
private

Definition at line 22 of file SequenceWalker.h.

Referenced by operator=(), and SequenceWalker().

◆ seqPos_

size_t bpp::SequenceWalker::seqPos_
private

Definition at line 23 of file SequenceWalker.h.

Referenced by operator=().


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