Quality¶
Contains aliases for quality_composition.
- Author
- Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>
-
namespace
seqan3¶ The main SeqAn3 namespace.
Helpers for seqan3::semi_alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.
Helpers for seqan3::alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.
Helpers for seqan3::nucleotide_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.
Alphabet aliases
Other names (typedefs) for seqan3::nucl16
Range concepts
Adapted from the Ranges TS.
Container concepts
Container concepts as defined by the standard library (or very close).
Container-of-container concepts
Shortcuts for multi-dimensional container concepts.
Typedefs
-
using
seqan3::dna4q = typedef quality_composition<dna4, illumina18> An alphabet that stores a seqan3::dna4 letter and an seqan3::illumina18 letter at each position.
-
using
seqan3::dna5q = typedef quality_composition<dna5, illumina18> An alphabet that stores a seqan3::dna5 letter and an seqan3::illumina18 letter at each position.
-
using
seqan3::rna4q = typedef quality_composition<rna4, illumina18> An alphabet that stores a seqan3::rna4 letter and an seqan3::illumina18 letter at each position.
-
using
seqan3::rna5q = typedef quality_composition<rna5, illumina18> An alphabet that stores a seqan3::rna5 letter and an seqan3::illumina18 letter at each position.
-
using
seqan3::nucl16q = typedef quality_composition<nucl16, illumina18> An alphabet that stores a seqan3::nucl16 letter and an seqan3::illumina18 letter at each position.
-
using
Meta-header that includes all headers from alphabet/quality/.
- Author
- Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>
-
namespace
seqan3¶ The main SeqAn3 namespace.
Helpers for seqan3::semi_alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.
Helpers for seqan3::alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.
Helpers for seqan3::nucleotide_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.
Alphabet aliases
Other names (typedefs) for seqan3::nucl16
Range concepts
Adapted from the Ranges TS.
Container concepts
Container concepts as defined by the standard library (or very close).
Container-of-container concepts
Shortcuts for multi-dimensional container concepts.
Typedefs
-
using
seqan3::underlying_phred_t = typedef typename underlying_phred<alphabet_type>::type internal phred type
Functions
- template <typename alphabet_type>
-
requires detail::internal_quality_concept<alphabet_type> constexpr alphabet_type seqan3::assign_phred(alphabet_type & c, char const in) public setter function receiving char encoding of phred score
- template <typename alphabet_type>
-
requires detail::internal_quality_concept<alphabet_type> constexpr underlying_phred_t<alphabet_type> seqan3::to_phred(alphabet_type const & c) public getter function for rank presentation of phred score
Variables
-
concept bool seqan3::quality_concept= requires(q quality) { requires alphabet_concept<q>; { assign_phred(quality, typename q::rank_type{}) } -> q; { to_phred(quality) } -> const typename q::phred_type; typename underlying_phred<q>::type; } concept of a quality alphabet
-
using
-
namespace
seqan3 The main SeqAn3 namespace.
Helpers for seqan3::semi_alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.
Helpers for seqan3::alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.
Helpers for seqan3::nucleotide_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.
Alphabet aliases
Other names (typedefs) for seqan3::nucl16
Range concepts
Adapted from the Ranges TS.
Container concepts
Container concepts as defined by the standard library (or very close).
Container-of-container concepts
Shortcuts for multi-dimensional container concepts.
-
struct
illumina18¶ - #include <alphabet/quality/illumina18.hpp>
Implementation of the Illumina 1.8 standard fulfilling the quality concept. The permitted phred score range is [0 .. 41], mapped to ascii-ordered range [‘!’ .. ‘J’]. For this standard internal and rank phred representation are both zero-based.
Public Types
-
using
phred_type= int8_t¶ the 3 representation types of a quality score
-
using
rank_type= uint8_t¶
-
using
char_type= char¶
Public Functions
-
constexpr illumina18 &
operator=(rank_type const c)¶ implicit compatibility to inner_type
-
constexpr bool
operator==(const illumina18 &rhs) const¶ comparison operators
-
constexpr bool
operator!=(const illumina18 &rhs) const¶
-
constexpr bool
operator<(const illumina18 &rhs) const¶
-
constexpr bool
operator>(const illumina18 &rhs) const¶
-
constexpr bool
operator<=(const illumina18 &rhs) const¶
-
constexpr bool
operator>=(const illumina18 &rhs) const¶
-
constexpr
operator char() const¶ explicit compatibility to char code of a quality score
-
constexpr illumina18 &
assign_char(char_type const c)¶ set internal value given 1-letter code
-
constexpr illumina18 &
assign_rank(rank_type const c)¶ set internal value given zero-based integer c
-
constexpr illumina18 &
assign_phred(phred_type const p)¶ set internal value given Illumina 1.8 integer code p
-
constexpr phred_type
to_phred() const¶ get Illumina 1.8 integer code
Public Static Attributes
-
constexpr phred_type
offset_phred= {0}¶
-
using
-
struct
Contains quality alphabet compositions.
- Author
- Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>
-
namespace
seqan3 The main SeqAn3 namespace.
Helpers for seqan3::semi_alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.
Helpers for seqan3::alphabet_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.
Helpers for seqan3::nucleotide_concept
These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.
Alphabet aliases
Other names (typedefs) for seqan3::nucl16
Range concepts
Adapted from the Ranges TS.
Container concepts
Container concepts as defined by the standard library (or very close).
Container-of-container concepts
Shortcuts for multi-dimensional container concepts.
- template <typename sequence_alphabet_t, typename quality_alphabet_t>
-
struct
quality_composition¶ - #include <alphabet/quality/quality_composition.hpp>
A seqan3::cartesian_composition that joins a nucleotide alphabet with a quality alphabet.
This composition pairs a nucleotide alphabet with a quality alphabet. The rank values correpsond to numeric values in the size of the composition, while the character values are taken from the sequence alphabet and the phred values are taken from the quality alphabet.
- Template Parameters
sequence_alphabet_t: Type of the first letter; must satisfy seqan3::nucleotide_concept.quality_alphabet_t: Types of further letters (up to 4); must satisfy seqan3::quality_concept.
As with all
seqan3::cartesian_compositions you may access the individual alphabet letters in regular c++ tuple notation, i.e.get<0>(t)and objects can be brace-initialized with the individual members.quality_composition<dna4, illumina18> l{dna4::A, 7}; std::cout << int(to_rank(l)) << ' ' << int(to_rank(get<0>(l))) << ' ' << int(to_rank(get<1>(l))) << '\n'; // 148 0 7 std::cout << to_char(l) << ' ' << to_char(get<0>(l)) << ' ' << to_char(get<1>(l)) << '\n'; // A A ( std::cout << int(to_phred(l)) << ' ' // << int(to_phred(get<0>(l))) << ' ' // dna4 doesn't have a phred << int(to_phred(get<1>(l))) << '\n'; // 7 7 // modify via structured bindings and references: auto & [ seq_l, qual_l ] = l; seq_l = dna4::G; std::cout << to_char(l) << '\n'; // G
This seqan3::cartesian_composition itself fulfills both seqan3::alphabet_concept and seqan3::quality_concept .
Write functions
-
constexpr quality_composition &
operator=(sequence_alphabet_type const l)¶ Directly assign the sequence letter.
-
constexpr quality_composition &
operator=(quality_alphabet_type const l)¶ Directly assign the quality letter.
-
constexpr quality_composition &
assign_char(char_type const c)¶ Assign from a character. This modifies the internal sequence letter.
-
constexpr quality_composition &
assign_phred(phred_type const c)¶ Assign from a phred value. This modifies the internal quality letter.
Read functions
-
constexpr phred_type
to_phred() const¶ Return the phred value. This reads the internal quality letter.
-
constexpr char_type
to_char() const¶ Return a character. This reads the internal sequence letter.
-
constexpr quality_composition
complement() const¶ Return a quality_composition where the quality is preserved, but the sequence letter is complemented.
- See
- seqan3::complement
- See
- seqan3::nucleotide_concept::complement
Comparison operators
Lexicographically compares the values in the tuple.
Public Types
-
template<>
usingsequence_alphabet_type= sequence_alphabet_t¶ First template parameter as member type.
-
template<>
usingquality_alphabet_type= quality_alphabet_t¶ Second template parameter as member type.
-
template<>
usingchar_type= underlying_char_t<sequence_alphabet_type>¶ Equals the char_type of sequence_alphabet_type.
-
template<>
usingphred_type= underlying_phred_t<quality_alphabet_type>¶ Equals the phred_type of the quality_alphabet_type.
Related
- template <typename sequence_alphabet_type, typename quality_alphabet_type>
-
quality_composition(sequence_alphabet_type&&, quality_alphabet_type&&)¶ Type deduction guide enables usage of quality_composition without specifying template args.