 |
SeqAn3
3.0.1
The Modern C++ library for sequence analysis.
|
|
Go to the documentation of this file.
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)
128 ret[static_cast<rank_type>(i)] = 0;
132 ret[static_cast<rank_type>(i)] = i - derived_type::offset_phred;
147 if (i < derived_type::offset_char)
148 ret[static_cast<rank_type>(i)] = 0;
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;
constexpr derived_type & assign_phred(phred_type const p) noexcept
Assign from the numeric phred value.
Definition: quality_base.hpp:111
Provides seqan3::alphabet_base.
static constexpr std::array< phred_type, alphabet_size > rank_to_phred
Rank to phred conversion table.
Definition: quality_base.hpp:161
static constexpr std::array< char_type, alphabet_size > rank_to_char
Rank to char conversion table.
Definition: quality_base.hpp:175
static constexpr detail::min_viable_uint_t< size > alphabet_size
The size of the alphabet, i.e. the number of different values it can take.
Definition: alphabet_base.hpp:174
static constexpr std::array< rank_type, 256 > phred_to_rank
Phred to rank conversion table.
Definition: quality_base.hpp:120
A concept that indicates whether an alphabet represents quality scores.
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:51
int8_t phred_type
The integer representation of a quality score assignable with =operator.
Definition: quality_base.hpp:35
The concept std::same_as<T, U> is satisfied if and only if T and U denote the same type.
Quality alphabet concept.
constexpr phred_type to_phred() const noexcept
Return the alphabet's value in phred representation.
Definition: quality_base.hpp:91
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
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
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:36
static constexpr std::array< rank_type, 256 > char_to_rank
Char to rank conversion table.
Definition: quality_base.hpp:140
constexpr auto to_phred
The public getter function for the phred representation of a quality score.
Definition: concept.hpp:89
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 auto assign_phred_to
Assign a phred score to a quality alphabet object.
Definition: concept.hpp:189
A CRTP-base that refines seqan3::alphabet_base and is used by the quality alphabets.
Definition: quality_base.hpp:28
constexpr derived_type & assign_rank(rank_type const c) noexcept
Assign from a numeric value.
Definition: alphabet_base.hpp:165
constexpr rank_type to_rank() const noexcept
Return the letter's numeric value (rank in the alphabet).
Definition: alphabet_base.hpp:116