utility class to write out a SAM/BAM/CRAM file to any stream
More...
#include <sam_writer.h>
utility class to write out a SAM/BAM/CRAM file to any stream
- Todo:
- add serialization option
gamgee::SamWriter::SamWriter |
( |
const std::string & |
output_fname = "-" , |
|
|
const bool |
binary = true |
|
) |
| |
|
explicit |
Creates a new SamWriter using the specified output file name.
- Parameters
-
output_fname | file to write to. The default is stdout (as defined by htslib) |
binary | whether the output should be in BAM (true) or SAM format (false) |
- Note
- the header is copied and managed internally
gamgee::SamWriter::SamWriter |
( |
const SamHeader & |
header, |
|
|
const std::string & |
output_fname = "-" , |
|
|
const bool |
binary = true |
|
) |
| |
|
explicit |
Creates a new SamWriter with the header extracted from a Sam record and using the specified output file name.
- Parameters
-
header | SamHeader object to make a copy from |
output_fname | file to write to. The default is stdout (as defined by htslib) |
binary | whether the output should be in BAM (true) or SAM format (false) |
- Note
- the header is copied and managed internally
gamgee::SamWriter::SamWriter |
( |
const SamWriter & |
other | ) |
|
|
delete |
a SamWriter cannot be copied safely, as it is iterating over a stream.
gamgee::SamWriter::SamWriter |
( |
SamWriter && |
other | ) |
|
|
default |
void gamgee::SamWriter::add_header |
( |
const SamHeader & |
header | ) |
|
Adds a header to the file stream.
- Parameters
-
- Note
- the header is a requirement to add records
void gamgee::SamWriter::add_record |
( |
const Sam & |
body | ) |
|
Adds a record to the file stream.
- Parameters
-
The documentation for this class was generated from the following files: