yat
0.11.3pre
|
#include <yat/omic/BamFile.h>
Public Member Functions | |
InBamFile (void) | |
Default constructor. | |
InBamFile (const std::string &fn) | |
virtual | ~InBamFile (void) |
destructor | |
const BamHeader & | header (void) const |
const bam_index_t * | index (void) const |
void | open (const std::string &fn) |
Open an input bam file. | |
bool | read (BamRead &read) |
read the next BamRead | |
bool | read (BamRead &read, bam_iter_t iter) |
read the next BamRead | |
void | close (void) |
close file | |
bool | is_open (void) const |
Protected Member Functions | |
void | open_base (const std::string &fn, const std::string &mode, const void *aux) |
const std::string & | filename (void) const |
filename of bam file | |
Protected Attributes | |
samfile_t * | sf_ |
This class supports reading from a bam file.
|
explicit |
|
inlineprotectedinherited |
filename of bam file
The filename is set in open_base().
const BamHeader& theplu::yat::omic::InBamFile::header | ( | void | ) | const |
const bam_index_t* theplu::yat::omic::InBamFile::index | ( | void | ) | const |
First time this function is called an index file is loaded from disk. If bam file is named 'foo.bam', the index file should be named 'foo.bam.bai'. If no such file exists or this bam file reads from stdin, this function throws.
|
inherited |
true
iff open void theplu::yat::omic::InBamFile::open | ( | const std::string & | fn | ) |
Open an input bam file.
Open a bam file named fn. If fn is "-", stdin
is used.
fn | string specifying the filename |
|
protectedinherited |
open a bam file named fn with mode mode
bool theplu::yat::omic::InBamFile::read | ( | BamRead & | read | ) |
read the next BamRead
bool theplu::yat::omic::InBamFile::read | ( | BamRead & | read, |
bam_iter_t | iter | ||
) |
read the next BamRead
|
protectedinherited |
bam file handler