1 #ifndef __gamgee_sam_writer__
2 #define __gamgee_sam_writer__
8 #include "htslib/sam.h"
26 explicit SamWriter(
const std::string& output_fname =
"-",
const bool binary =
true);
35 explicit SamWriter(
const SamHeader& header,
const std::string& output_fname =
"-",
const bool binary =
true);
59 static htsFile* open_file(
const std::string& output_fname,
const std::string& binary);
60 void write_header()
const;
SamWriter(const std::string &output_fname="-", const bool binary=true)
Creates a new SamWriter using the specified output file name.
Definition: sam_writer.cpp:5
void add_record(const Sam &body)
Adds a record to the file stream.
Definition: sam_writer.cpp:26
void add_header(const SamHeader &header)
Adds a header to the file stream.
Definition: sam_writer.cpp:21
~SamWriter()
takes care of closing the file/stream
Definition: sam_writer.cpp:17
utility class to write out a SAM/BAM/CRAM file to any stream
Definition: sam_writer.h:16
Utility class to manipulate a Sam record.
Definition: sam.h:19