|
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_READER_H_
2 #define GENESIS_SEQUENCE_FORMATS_FASTQ_READER_H_
171 std::string
const& quality_string,
Sequence& sequence
228 SequenceSet read( std::shared_ptr< utils::BaseInputSource > source )
const;
240 void read( std::shared_ptr< utils::BaseInputSource > source,
SequenceSet& sequence_set )
const;
383 bool use_validation_ =
false;
390 std::string
const& quality_string,
Sequence& sequence
396 mutable std::string buffer_;
403 #endif // include guard
unsigned char quality_decode_to_phred_score(char quality_code, QualityEncoding encoding)
Decode a single quality score char (for example coming from a fastq file) to a phred score.
@ kToLower
Make all sites lower case.
void parse_label1_(utils::InputStream &input_stream, Sequence &sequence) const
Parse the first label line (starting with an @).
std::string valid_chars() const
Return the currently set chars used for validating Sequence sites.
@ kToUpper
Make all sites upper case.
SequenceSet read(std::shared_ptr< utils::BaseInputSource > source) const
Read all Sequences from an input source in Fastq format and return them as a SequenceSet.
Read Fastq sequence data.
void parse_label2_(utils::InputStream &input_stream, Sequence &sequence) const
Parse the second label line (starting with a +, and either empty or equal to the first).
@ kUnchanged
Do not change the case of the sites.
utils::CharLookup< bool > & valid_char_lookup()
Return the internal CharLookup that is used for validating the Sequence sites.
QualityEncoding
List of quality encodings for which we support decoding.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
void parse_sites_(utils::InputStream &input_stream, Sequence &sequence) const
Parse the sequence line(s).
Store a set of Sequences.
void parse_document(utils::InputStream &input_stream, SequenceSet &sequence_set) const
Parse a whole fastq document into a SequenceSet.
void parse_quality_(utils::InputStream &input_stream, Sequence &sequence) const
Parse the quality score line(s), which also runs the plugin, if available.
FastqReader()
Create a default FastqReader.
SiteCasing
Enumeration of casing methods to apply to each site of a Sequence.
SiteCasing site_casing() const
Return whether Sequence sites are automatically turned into upper or lower case.
FastqReader & quality_string_plugin(quality_string_function const &plugin)
Functional that can be set to process the quality string found in fastq files.
FastqReader & operator=(FastqReader const &)=default
bool parse_sequence_(utils::InputStream &input_stream, Sequence &sequence) const
Parse a fastq sequence into the given sequence object.
std::function< void(std::string const &quality_string, Sequence &sequence) > quality_string_function
Function type that allows to work with the quality line(s) in fastq files.
bool parse_sequence(utils::InputStream &input_stream, Sequence &sequence) const
Parse a Sequence in Fastq format.
QualityEncoding quality_encoding()
Return the currently set QualityEncoding that is used for decoding the quality score line of the Fast...