#include <seq_writer.hpp>
|
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="") |
|
Write FASTA or FASTQ sequences to a file. Capable of writing gzip (.gz), bzip2 (.bz2), xz (.xz), zip (.zip), 7zip (.7z), and lrzip (.lrz) files. Add the appropriate extension to the output filename to automatically compress. Threadsafe.
- Examples:
- seq_writer.cpp.
btllib::SeqWriter::SeqWriter |
( |
const std::string & |
sink_path, |
|
|
Format |
format = FASTA , |
|
|
bool |
append = false |
|
) |
| |
Construct a SeqWriter to write sequences to a given path.
- Parameters
-
source_path | Filepath to write to. Pass "-" to write to stdout. |
format | Which format to write the output as. |
append | Whether to append to the target file or write anew. |
void btllib::SeqWriter::write |
( |
const std::string & |
id, |
|
|
const std::string & |
comment, |
|
|
const std::string & |
seq, |
|
|
const std::string & |
qual = "" |
|
) |
| |
Write a sequence.
- Parameters
-
id | Sequence ID or name. |
comment | Optional comment after the ID/name. |
seq | The sequence to write. |
qual | Optional quality scores, mandatory if format is FASTQ. |
- Examples:
- seq_writer.cpp.
The documentation for this class was generated from the following file: