Gamgee
You miserable little maggot. I'll stove your head in!
|
Utility class to read a BAM/CRAM file with an appropriate Sam iterator from an indexed file in a for-each loop. Intervals are passed in using a vector of string coordinates compatible with Samtools. When iteration begins, the iterations (re-)starts at the beginning of the first interval. More...
#include <indexed_sam_reader.h>
Public Member Functions | |
IndexedSamReader (const std::string &filename, const std::vector< std::string > &interval_list) | |
reads through all records in a file parsing them into Sam objects More... | |
IndexedSamReader (IndexedSamReader &&other)=default | |
iterators and readers can be moved More... | |
IndexedSamReader & | operator= (IndexedSamReader &&other)=default |
IndexedSamReader (const IndexedSamReader &other)=delete | |
no copy construction/assignment allowed for input iterators and readers More... | |
IndexedSamReader & | operator= (IndexedSamReader &other)=delete |
ITERATOR | begin () |
creates a ITERATOR pointing at the start of the input stream (needed by for-each loop) More... | |
ITERATOR | end () |
creates a ITERATOR with a nullified input stream (needed by for-each loop) More... | |
SamHeader | header () |
returns the header More... | |
Utility class to read a BAM/CRAM file with an appropriate Sam iterator from an indexed file in a for-each loop. Intervals are passed in using a vector of string coordinates compatible with Samtools. When iteration begins, the iterations (re-)starts at the beginning of the first interval.
This class is designed to parse the file in for-each loops with the following signature:
Most iterators have aliases defined by this module so you can use it like so:
|
inline |
reads through all records in a file parsing them into Sam objects
filename | the name of the bam/cram file |
interval_list | Samtools style intervals to look for records |
|
default |
iterators and readers can be moved
|
delete |
no copy construction/assignment allowed for input iterators and readers
|
inline |
creates a ITERATOR pointing at the start of the input stream (needed by for-each loop)
|
inline |
creates a ITERATOR with a nullified input stream (needed by for-each loop)
|
inline |
returns the header
|
default |
|
delete |