yat  0.14.5pre
Classes | Public Member Functions | Friends | List of all members
theplu::yat::omic::BamReadIterator Class Reference

class to iterate through a InBamFile More...

#include <yat/omic/BamReadIterator.h>

Inheritance diagram for theplu::yat::omic::BamReadIterator:

Public Member Functions

 BamReadIterator (void)
 Contructs end of file iterator.
 
 BamReadIterator (InBamFile &in)
 
 BamReadIterator (InBamFile &in, int32_t tid, int32_t start, int32_t end)
 

Friends

class boost::iterator_core_access
 

Detailed Description

class to iterate through a InBamFile

Iterator is a single pass Input Iterator which means iterator can only be used read bam file. If creating two iterators working on the same InBamFile, the iterators are not independent of each other. Incrementing one, the behaviour of the other is undefined.

Iterator can either be constructed to iterate over entire bam file or if a region is specified only over that region. When no more elements are available, iterator turns into a end-of-file iterator and is no longer dereferencable.

See Also
InBamFile
Since
New in yat 0.10

Constructor & Destructor Documentation

theplu::yat::omic::BamReadIterator::BamReadIterator ( InBamFile in)
explicit

Creates an iterator pointing to first BamRead in InBamFile.

Parameters
infile to iterate over
theplu::yat::omic::BamReadIterator::BamReadIterator ( InBamFile in,
int32_t  tid,
int32_t  start,
int32_t  end 
)

Iterator that walks over specified region. Iterator iterates over all BamReads in file in that overlap with specified region and then it turns into an end-of-region iterator.

This function requires an index file is available, see InBamFile::index().

All reads iterated over overlap with defined region, in other words, iter->tid == tid; iter->pos() < end and iter->end()

start

Parameters
infile to iterate over
tidsegment (chromosome) to iterate over
startleft most position of specified region
endright most position of specified region

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

Generated on Tue Sep 26 2017 02:33:30 for yat by  doxygen 1.8.5