yat
0.14.5pre
|
class to iterate through a InBamFile More...
#include <yat/omic/BamReadIterator.h>
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 |
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.
|
explicit |
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
in | file to iterate over |
tid | segment (chromosome) to iterate over |
start | left most position of specified region |
end | right most position of specified region |