#include <genesis/sequence/formats/phylip_writer.hpp>
Definition at line 52 of file phylip_writer.hpp.
Public Member Functions | |
PhylipWriter ()=default | |
PhylipWriter (PhylipWriter &&)=default | |
PhylipWriter (PhylipWriter const &)=default | |
~PhylipWriter ()=default | |
size_t | label_length () const |
Return the currently set label length. More... | |
PhylipWriter & | label_length (size_t value) |
Set the length of the label in front of the sequences. More... | |
size_t | line_length () const |
Get the current line length. More... | |
PhylipWriter & | line_length (size_t value) |
Set the line length, which determines after how many chars (Sequence sites) lines breaks are inserted when writing the Phylip file. More... | |
PhylipWriter & | operator= (PhylipWriter &&)=default |
PhylipWriter & | operator= (PhylipWriter const &)=default |
void | write (SequenceSet const &sequence_set, std::shared_ptr< utils::BaseOutputTarget > target) const |
Write a SequenceSet to an output target, using the Phylip format. More... | |
|
default |
|
default |
|
default |
|
default |
size_t label_length | ( | ) | const |
Return the currently set label length.
See the setter label_length( size_t ) for details.
Definition at line 129 of file phylip_writer.cpp.
PhylipWriter & label_length | ( | size_t | value | ) |
Set the length of the label in front of the sequences.
Phylip has the weird property that labels are written in front of sequences and do not need to have a delimiter, but instead are simply the first n
characters of the string. This value determines after how many chars the label ends and the actual sequence begins.
If set to 0 (default), a relaxed version of Phylip is used, where the sequence begin is automatically detected. Labels can then be of arbitrary lengths, as long as they do not contain white spaces. After the label, a space is appended.
If set to a value greater than 0, the label will be cut off after that many chars. For shorter labels, the remaining number is filled with spaces. The functions returns the PhylipWriter object to allow fluent interfaces.
Definition at line 123 of file phylip_writer.cpp.
size_t line_length | ( | ) | const |
Get the current line length.
See the setter line_length( size_t ) for details.
Definition at line 140 of file phylip_writer.cpp.
PhylipWriter & line_length | ( | size_t | value | ) |
Set the line length, which determines after how many chars (Sequence sites) lines breaks are inserted when writing the Phylip file.
Default is 80
. If set to 0
, no breaks are inserted. The functions returns the PhylipWriter object to allow fluent interfaces.
Definition at line 134 of file phylip_writer.cpp.
|
default |
|
default |
void write | ( | SequenceSet const & | sequence_set, |
std::shared_ptr< utils::BaseOutputTarget > | target | ||
) | const |
Write a SequenceSet to an output target, using the Phylip format.
See the output target convenience functions utils::to_file(), utils::to_stream(), and utils::to_string() for examples of how to obtain a suitable output target.
Definition at line 61 of file phylip_writer.cpp.