|
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_PHYLIP_READER_H_
2 #define GENESIS_SEQUENCE_FORMATS_PHYLIP_READER_H_
192 SequenceSet read( std::shared_ptr<utils::BaseInputSource> source )
const;
205 void read( std::shared_ptr<utils::BaseInputSource> source,
SequenceSet& target )
const;
398 size_t label_length_ = 0;
401 bool remove_digits_ =
false;
402 bool use_validation_ =
false;
410 #endif // include guard
@ kToLower
Make all sites lower case.
@ kToUpper
Make all sites upper case.
void parse_phylip_interleaved(utils::InputStream &it, SequenceSet &sset) const
Parse a whole Phylip file using the interleaved variant (Mode::kInterleaved).
SiteCasing
Enumeration of casing methods to apply to each site of a Sequence.
utils::CharLookup< bool > & valid_char_lookup()
Return the internal CharLookup that is used for validating the Sequence sites.
PhylipReader & operator=(PhylipReader const &)=default
std::string parse_phylip_label(utils::InputStream &it) const
Parse and return a Phylip label.
SiteCasing site_casing() const
Return whether Sequence sites are automatically turned into upper or lower case.
SequenceSet read(std::shared_ptr< utils::BaseInputSource > source) const
Read all Sequences from an input source in Phylip format and return them as a SequenceSet.
Header parse_phylip_header(utils::InputStream &it) const
Parse a Phylip header and return the contained sequence count and length.
Read Phylip sequence data.
Mode
Enum to distinguish between the different file variants of Phylip. See mode( Mode value ) for more de...
@ kUnchanged
Do not change the case of the sites.
std::string parse_phylip_sequence_line(utils::InputStream &it) const
Parse one sequence line.
void parse_phylip_sequential(utils::InputStream &it, SequenceSet &sset) const
Parse a whole Phylip file using the sequential variant (Mode::kSequential).
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
@ kInterleaved
Read the data in Phylip interleaved mode.
Store a set of Sequences.
size_t label_length() const
Return the currently set label length.
PhylipReader()
Create a default PhylipReader. Per default, chars are turned upper case, but not validated.
bool remove_digits() const
Return whether digits are removed from the Sequence.
std::string valid_chars() const
Return the currently set chars used for validating Sequence sites.
@ kSequential
Read the data in Phylip sequential mode.