|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file.
57 auto& os = target->ostream();
58 for(
Sequence const& sequence : sequence_set ) {
67 switch( abundance_notation_ ) {
87 if (line_length_ > 0) {
88 for (
size_t i = 0; i < seq.
length(); i += line_length_) {
91 os << seq.
sites().substr(i, line_length_) <<
"\n";
94 os << seq.
sites() <<
"\n";
104 line_length_ = value;
115 abundance_notation_ = value;
121 return abundance_notation_;
void write_sequence(Sequence const &sequence, std::ostream &os) const
Write a single Sequence to an output stream in Fasta format.
AbundanceNotation
Enumeration of types for how to write Sequence abundances.
Provides functions for accessing the file system.
@ kUnderscore
Write abundances appaneded by an underscore: abc_123.
size_t line_length() const
Get the current line length.
AbundanceNotation abundance_notation() const
Get the current setting for how to write abundances.
size_t length() const
Return the length (number of sites) of this sequence.
void write(Sequence const &sequence, std::shared_ptr< utils::BaseOutputTarget > target) const
Write a single Sequence to an output target, using the Fasta format.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Store a set of Sequences.
@ kSize
Write abundances appended as a text of the form abc;size=123
@ kNone
Do not write abundances. This is the default.