1 #ifndef gamgee__variant_writer__guard
2 #define gamgee__variant_writer__guard
11 #include "../utils/hts_memory.h"
32 explicit VariantWriter(
const std::string& output_fname =
"-",
const bool binary =
true,
const int compression_level = Z_DEFAULT_COMPRESSION);
42 explicit VariantWriter(
const VariantHeader& header,
const std::string& output_fname =
"-",
const bool binary =
true,
const int compression_level = Z_DEFAULT_COMPRESSION);
72 std::unique_ptr<htsFile, utils::HtsFileDeleter> m_out_file;
75 static htsFile* open_file(
const std::string& output_fname,
const std::string& binary);
76 void write_header()
const;
77 std::string write_mode(
const bool binary,
const int compression_level)
const;
82 #endif // gamgee__variant_writer__guard
VariantWriter & operator=(const VariantWriter &other)=delete
void add_header(const VariantHeader &header)
Adds a header to the file stream.
Definition: variant_writer.cpp:31
utility class to write out a VCF/BCF file to any stream
Definition: variant_writer.h:21
void add_record(const Variant &body)
Adds a record to the file stream.
Definition: variant_writer.cpp:36
Definition: exceptions.h:9
VariantWriter(const std::string &output_fname="-", const bool binary=true, const int compression_level=Z_DEFAULT_COMPRESSION)
Creates a new VariantWriter using the specified output file name.
Definition: variant_writer.cpp:9
Utility class to manipulate a Variant record.
Definition: variant.h:29