seq_writer.hpp
#ifndef BTLLIB_SEQ_WRITER_HPP
#define BTLLIB_SEQ_WRITER_HPP
#include "btllib/data_stream.hpp"
#include "btllib/seq.hpp"
#include <cstdio>
#include <mutex>
#include <string>
namespace btllib {
class SeqWriter
{
public:
enum Format
{
FASTA,
FASTQ
};
SeqWriter(const std::string& sink_path,
Format format = FASTA,
bool append = false);
void close();
void write(const std::string& id,
const std::string& comment,
const std::string& seq,
const std::string& qual = "");
private:
const std::string sink_path;
DataSink sink;
bool closed;
Format format;
char headerchar;
std::mutex mutex;
};
} // namespace btllib
#endif
btllib::SeqWriter
Definition: seq_writer.hpp:23
btllib::SeqWriter::SeqWriter
SeqWriter(const std::string &sink_path, Format format=FASTA, bool append=false)
btllib::SeqWriter::write
void write(const std::string &id, const std::string &comment, const std::string &seq, const std::string &qual="")
btllib
Definition: bloom_filter.hpp:16