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
127 if (i < derived_type::offset_phred)
132 ret[
static_cast<rank_type>(i)] = i - derived_type::offset_phred;
147 if (i < derived_type::offset_char)
152 ret[
static_cast<rank_type>(i)] = i - derived_type::offset_char;
167 ret[i] = i + derived_type::offset_phred;
181 ret[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:120
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:62
constexpr derived_type & assign_phred(phred_type const p) noexcept
Assign from the numeric phred value.
Definition: quality_base.hpp:111
static std::array< phred_type, alphabet_size > constexpr rank_to_phred
Rank to phred conversion table.
Definition: quality_base.hpp:161
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:140
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:91
constexpr derived_type & assign_rank(rank_type const c) noexcept
Assign from a numeric value.
Definition: alphabet_base.hpp:165
static std::array< char_type, alphabet_size > constexpr rank_to_char
Rank to char conversion table.
Definition: quality_base.hpp:175
constexpr auto assign_phred_to
Assign a phred score to a quality alphabet object.
Definition: concept.hpp:189
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.
A concept that indicates whether an alphabet represents quality scores.
constexpr auto to_phred
The public getter function for the phred representation of a quality score.
Definition: concept.hpp:89
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:174
std::conditional_t< std::same_as< char, void >, char, char > char_type
The char representation; conditional needed to make semi alphabet definitions legal.
Definition: alphabet_base.hpp:60
constexpr rank_type to_rank() const noexcept
Return the letter's numeric value (rank in the alphabet).
Definition: alphabet_base.hpp:116
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:51
Quality alphabet concept.
The concept std::same_as<T, U> is satisfied if and only if T and U denote the same type...