1 #ifndef gamgee__sam_writer__guard
2 #define gamgee__sam_writer__guard
10 #include "../utils/hts_memory.h"
30 explicit SamWriter(
const std::string& output_fname =
"-",
const bool binary =
true);
39 explicit SamWriter(
const SamHeader& header,
const std::string& output_fname =
"-",
const bool binary =
true);
69 std::unique_ptr<htsFile, utils::HtsFileDeleter> m_out_file;
72 static htsFile* open_file(
const std::string& output_fname,
const std::string& binary);
73 void write_header()
const;
79 #endif // gamgee__sam_writer__guard
SamWriter(const std::string &output_fname="-", const bool binary=true)
Creates a new SamWriter using the specified output file name.
Definition: sam_writer.cpp:7
SamWriter & operator=(const SamWriter &other)=delete
void add_record(const Sam &body)
Adds a record to the file stream.
Definition: sam_writer.cpp:24
void add_header(const SamHeader &header)
Adds a header to the file stream.
Definition: sam_writer.cpp:19
utility class to write out a SAM/BAM/CRAM file to any stream
Definition: sam_writer.h:20
Definition: exceptions.h:9
Utility class to manipulate a Sam record.
Definition: sam.h:20