Gamgee
You miserable little maggot. I'll stove your head in!
|
Utility class to read a SAM/BAM/CRAM file with an appropriate Sam iterator from a stream (e.g. file, stdin, ...) in a for-each loop. More...
#include <sam_reader.h>
Public Member Functions | |
SamReader (const std::string &filename) | |
reads through all records in a file ( or sam) parsing them into Sam objects More... | |
SamReader (SamReader &&other) | |
~SamReader () | |
closes the file stream if there is one (in case we are reading a sam file) More... | |
SamReader (const SamReader &)=delete | |
a SamReader cannot be copied safely, as it is iterating over a stream. More... | |
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 () |
Utility class to read a SAM/BAM/CRAM file with an appropriate Sam iterator from a stream (e.g. file, stdin, ...) in a for-each loop.
This class is designed to parse the file in for-each loops with the following signature:
You can also use it with the stdin or any other stream by using the default constructor or passing in an empty string for a filename, like so:
Most iterators have aliases definied by this module so you can use it like so:
|
inline |
reads through all records in a file ( or sam) parsing them into Sam objects
filename | the name of the sam file |
|
inline |
|
inline |
closes the file stream if there is one (in case we are reading a sam file)
|
delete |
a SamReader cannot be copied safely, as it is iterating over a stream.
|
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 |