utility class to write out a VCF/BCF file to any stream
More...
#include <variant_writer.h>
utility class to write out a VCF/BCF file to any stream
- Todo:
- add serialization option
gamgee::VariantWriter::VariantWriter |
( |
const std::string & |
output_fname = "-" , |
|
|
const bool |
binary = true , |
|
|
const int |
compression_level = Z_DEFAULT_COMPRESSION |
|
) |
| |
|
explicit |
Creates a new VariantWriter 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 BCF (true) or VCF format (false) |
compression_level | optional zlib compression level. 0 for none, 1 for best speed, 9 for best compression |
- Note
- the header is copied and managed internally
gamgee::VariantWriter::VariantWriter |
( |
const VariantHeader & |
header, |
|
|
const std::string & |
output_fname = "-" , |
|
|
const bool |
binary = true , |
|
|
const int |
compression_level = Z_DEFAULT_COMPRESSION |
|
) |
| |
|
explicit |
Creates a new VariantWriter with the header extracted from a Variant record and using the specified output file name.
- Parameters
-
header | a VariantHeader 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 BCF (true) or VCF format (false) |
compression_level | optional zlib compression level. 0 for none, 1 for best speed, 9 for best compression |
- Note
- the header is copied and managed internally
gamgee::VariantWriter::VariantWriter |
( |
const VariantWriter & |
other | ) |
|
|
delete |
a VariantWriter cannot be copied safely, as it is iterating over a stream.
void gamgee::VariantWriter::add_header |
( |
const VariantHeader & |
header | ) |
|
Adds a header to the file stream.
- Parameters
-
- Note
- the header is a requirement to add records
void gamgee::VariantWriter::add_record |
( |
const Variant & |
body | ) |
|
Adds a record to the file stream.
- Parameters
-
The documentation for this class was generated from the following files: