|
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_FASTA_READER_H_
2 #define GENESIS_SEQUENCE_FORMATS_FASTA_READER_H_
185 SequenceSet read( std::shared_ptr< utils::BaseInputSource > source )
const;
197 void read( std::shared_ptr< utils::BaseInputSource > source,
SequenceSet& sequence_set )
const;
212 std::shared_ptr<utils::BaseInputSource> source,
213 bool also_look_up_first_word =
true
361 template<
class R,
typename... A>
367 result.add( std::move(seq), args... );
371 result.add( std::move(seq), args... );
388 bool guess_abundances_ =
false;
389 bool use_validation_ =
false;
390 utils::CharLookup<bool> lookup_;
393 mutable std::string buffer_;
399 #endif // include guard
@ kToLower
Make all sites lower case.
@ kPedantic
Pedantic method.
SiteCasing
Enumeration of casing methods to apply to each site of a Sequence.
Store dictionary/index data on sequence files, such as coming from .fai or .dict files.
ReferenceGenome read_reference_genome(std::shared_ptr< utils::BaseInputSource > source, bool also_look_up_first_word=true) const
Read all Sequences from an input source in fasta format into a ReferenceGenome.
Read Fasta sequence data.
SequenceDict read_dict(std::shared_ptr< utils::BaseInputSource > source) const
Read all Sequences from an input source in fasta format, but only return their names and lengths as a...
bool parse_sequence_pedantic(utils::InputStream &input_stream, Sequence &sequence) const
Parse a Sequence in Fasta format.
bool guess_abundances() const
Return whether the label is used to guess/extracat Sequence abundances.
@ kDefault
Fast method, used by default.
FastaReader()
Create a default FastaReader. Per default, chars are turned upper case, but not validated.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Store a set of Sequences.
SiteCasing site_casing() const
Return whether Sequence sites are automatically turned into upper or lower case.
std::string valid_chars() const
Return the currently set chars used for validating Sequence sites.
FastaReader & operator=(FastaReader const &)=default
utils::CharLookup< bool > & valid_char_lookup()
Return the internal CharLookup that is used for validating the Sequence sites.
SequenceSet read(std::shared_ptr< utils::BaseInputSource > source) const
Read all Sequences from an input source in Fasta format and return them as a SequenceSet.
ParsingMethod parsing_method() const
Return the currently set parsing method.
bool parse_sequence(utils::InputStream &input_stream, Sequence &sequence) const
Parse a Sequence in Fasta format.
Lookup of Sequences of a reference genome.
@ kToUpper
Make all sites upper case.
@ kUnchanged
Do not change the case of the sites.
ParsingMethod
Enumeration of the available methods for parsing Fasta sequences.
void parse_document(utils::InputStream &input_stream, SequenceSet &sequence_set) const
Parse a whole fasta document into a SequenceSet.