|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_SEQUENCE_FORMATS_FASTQ_WRITER_H_
2 #define GENESIS_SEQUENCE_FORMATS_FASTQ_WRITER_H_
39 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
41 #include <string_view>
108 std::shared_ptr<utils::BaseOutputTarget> target
124 std::string
const& quality,
125 std::shared_ptr<utils::BaseOutputTarget> target
136 std::shared_ptr<utils::BaseOutputTarget> target
139 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
149 std::string_view
const& label,
150 std::string_view
const& sites,
151 std::string_view
const& quality,
152 std::shared_ptr<utils::BaseOutputTarget> target
175 line_length_ = value;
205 fill_missing_quality_ = value;
214 return fill_missing_quality_;
228 repeat_label_ = value;
238 return repeat_label_;
247 std::string make_filled_quality_string_(
251 void write_sequence_(
252 std::string
const& label,
253 std::string
const& sites,
254 std::string
const& quality,
264 size_t line_length_ = 0;
265 unsigned char fill_missing_quality_ = 255;
266 bool repeat_label_ =
false;
273 #endif // include guard
size_t line_length() const
Get the current line length.
FastqWriter & operator=(FastqWriter const &)=default
FastqWriter & repeat_label(bool value)
Set whether to repeat the sequence identifier (label) on the third line of each sequence.
FastqWriter & fill_missing_quality(unsigned char value)
Set the value to fill the quality scores of sequences that do not have a phread score assigned to the...
double length(Tree const &tree)
Get the length of the tree, i.e., the sum of all branch lengths.
void write(Sequence const &sequence, std::shared_ptr< utils::BaseOutputTarget > target) const
Write a single Sequence to an output target, using the Fastq format.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Store a set of Sequences.
FastqWriter & line_length(size_t value)
Set the line length, which determines after how many chars (Sequence sites) lines breaks are inserted...
bool repeat_label() const
Get whether the setting to repeat the sequence identifier (label) on the third line is set.
unsigned char fill_missing_quality() const
Get the current value to fill missing phred quality scores.