16 #include <seqan3/alphabet/detail/convert.hpp> 27 template <
typename derived_type, auto size>
75 template <
typename other_qual_type>
81 explicit constexpr
quality_base(other_qual_type
const & other) noexcept
133 if (i < derived_type::offset_phred)
138 ret[
static_cast<rank_type>(i)] = i - derived_type::offset_phred;
153 if (i < derived_type::offset_char)
158 ret[
static_cast<rank_type>(i)] = i - derived_type::offset_char;
static std::array< rank_type, 256 > constexpr phred_to_rank
Phred to rank conversion table.
Definition: quality_base.hpp:126
detail::min_viable_uint_t< size - 1 > rank_type
The type of the alphabet when represented as a number (e.g. via to_rank()).
Definition: alphabet_base.hpp:63
constexpr char_type to_char() const noexcept
Return the letter as a character of char_type.
Definition: quality_base.hpp:91
A concept that indicates whether an alphabet represents quality scores.
constexpr derived_type & assign_phred(phred_type const p) noexcept
Assign from the numeric phred value.
Definition: quality_base.hpp:117
int8_t phred_type
The integer representation of a quality score assignable with =operator.
Definition: quality_base.hpp:35
The main SeqAn3 namespace.
static std::array< rank_type, 256 > constexpr char_to_rank
Char to rank conversion table.
Definition: quality_base.hpp:146
A CRTP-base that refines seqan3::alphabet_base and is used by the quality alphabets.
Definition: quality_base.hpp:28
constexpr phred_type to_phred() const noexcept
Return the alphabet's value in phred representation.
Definition: quality_base.hpp:97
constexpr derived_type & assign_rank(rank_type const c) noexcept
Assign from a numeric value.
Definition: alphabet_base.hpp:166
constexpr auto assign_phred_to
Assign a phred score to a quality alphabet object.
Definition: concept.hpp:201
constexpr quality_base(other_qual_type const &other) noexcept
Allow explicit construction from any other quality type by means of the phred representation.
Definition: quality_base.hpp:81
Provides seqan3::alphabet_base.
constexpr auto to_phred
The public getter function for the phred representation of a quality score.
Definition: concept.hpp:104
static detail::min_viable_uint_t< size > constexpr alphabet_size
The size of the alphabet, i.e. the number of different values it can take.
Definition: alphabet_base.hpp:175
constexpr rank_type to_rank() const noexcept
Return the letter's numeric value (rank in the alphabet).
Definition: alphabet_base.hpp:117
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:52
Quality alphabet concept.
The concept std::Same<T, U> is satisfied if and only if T and U denote the same type.
std::conditional_t< std::Same< char, void >, char, char > char_type
The char representation; conditional needed to make semi alphabet definitions legal.
Definition: alphabet_base.hpp:61