AMOS::ContigIterator_t Class Reference

Used for iterating through a contig on a per-consensus position basis. More...

#include <ContigIterator_AMOS.hh>

Collaboration diagram for AMOS::ContigIterator_t:

[legend]
List of all members.

Public Member Functions

 ContigIterator_t (Contig_t &ctg, Bank_t *rdbank)
 Constructor for iterator. You must call seek() or advanceNext() before using.
bool seek (Pos_t gindex)
 Seek to random position in O(numreads) time. Returns if the current position is valid.
bool advanceNext ()
 Advance to next position (gindex+1) in O(maxdepth) time. Returns if the current position is valid.
Pos_t uindex () const
 Returns the current 1-based ungapped contig position.
Pos_t gindex () const
 Returns the current 0-based gapped contig position.
bool hasSNP () const
 Returns if there is a SNP at the current position.
char cons () const
 Returns the consenus at the current position.
int cqv () const
 Returns the consensus quality value at this current position.
Column_t getColumn ()
 Returns a Column_t of the current position.
const Contig_tgetContig () const
 Get a reference to the contig object.
const TiledReadList_tgetTilingReads () const
 Get list of reads tiling current position.

Classes

struct  ReadListItEndCmp
 Sort operator for maintain end position queue.

Detailed Description

Used for iterating through a contig on a per-consensus position basis.

Internally, the ContigIterator maintains a list of reads which tile the current contig position. This list can be accessed via the getTilingReads() method. In addition, you can also use the getColumn() method to create a Column_t object which sorts the reads by the base at the current consensus position rather than the position of the read in the layout. Use the hasSNP() method to determine if the tiling at the current position is uniform or if it has a SNP.

Note: You must call advanceNext() or seek() to initialize the object

Definition at line 231 of file ContigIterator_AMOS.hh.


Constructor & Destructor Documentation

ContigIterator_t::ContigIterator_t ( Contig_t ctg,
Bank_t rdbank 
)

Constructor for iterator. You must call seek() or advanceNext() before using.

Definition at line 55 of file ContigIterator_AMOS.cc.

References AMOS::Sequence_t::getQualString(), AMOS::Contig_t::getReadTiling(), and AMOS::Sequence_t::getSeqString().


Member Function Documentation

bool ContigIterator_t::advanceNext (  ) 

Advance to next position (gindex+1) in O(maxdepth) time. Returns if the current position is valid.

Definition at line 98 of file ContigIterator_AMOS.cc.

References AMOS::Contig_t::getReadTiling().

char AMOS::ContigIterator_t::cons (  )  const [inline]

Returns the consenus at the current position.

Definition at line 253 of file ContigIterator_AMOS.hh.

int AMOS::ContigIterator_t::cqv (  )  const [inline]

Returns the consensus quality value at this current position.

Definition at line 256 of file ContigIterator_AMOS.hh.

References AMOS::MIN_QUALITY.

Column_t ContigIterator_t::getColumn (  ) 

Returns a Column_t of the current position.

Definition at line 233 of file ContigIterator_AMOS.cc.

const Contig_t& AMOS::ContigIterator_t::getContig (  )  const [inline]

Get a reference to the contig object.

Definition at line 262 of file ContigIterator_AMOS.hh.

const TiledReadList_t& AMOS::ContigIterator_t::getTilingReads (  )  const [inline]

Get list of reads tiling current position.

Definition at line 266 of file ContigIterator_AMOS.hh.

Referenced by AMOS::Column_t::Column_t().

Pos_t AMOS::ContigIterator_t::gindex (  )  const [inline]

Returns the current 0-based gapped contig position.

Definition at line 247 of file ContigIterator_AMOS.hh.

bool ContigIterator_t::hasSNP (  )  const

Returns if there is a SNP at the current position.

Definition at line 169 of file ContigIterator_AMOS.cc.

bool ContigIterator_t::seek ( Pos_t  gindex  ) 

Seek to random position in O(numreads) time. Returns if the current position is valid.

Definition at line 124 of file ContigIterator_AMOS.cc.

References AMOS::Contig_t::gap2ungap(), and AMOS::Contig_t::getReadTiling().

Pos_t ContigIterator_t::uindex (  )  const

Returns the current 1-based ungapped contig position.

Definition at line 74 of file ContigIterator_AMOS.cc.


The documentation for this class was generated from the following files:
Generated on Mon Feb 22 17:36:35 2010 for libAMOS by  doxygen 1.4.7