92 constexpr
dna4(
dna4 const &) =
default;
94 constexpr
dna4 & operator=(
dna4 const &) =
default;
95 constexpr
dna4 & operator=(
dna4 &&) =
default;
101 template <std::Same<rna4> t>
102 constexpr
dna4(t
const & r) noexcept
121 static constexpr std::array<rank_type, 256> char_to_rank
125 std::array<rank_type, 256> ret{};
128 for (
size_t rnk = 0u; rnk <
value_size; ++rnk)
130 ret[ rank_to_char[rnk] ] = rnk;
131 ret[
to_lower(rank_to_char[rnk])] = rnk;
135 ret[
'U'] = ret[
'T']; ret[
'u'] = ret[
't'];
138 ret[
'R'] = ret[
'A']; ret[
'r'] = ret[
'A'];
139 ret[
'Y'] = ret[
'C']; ret[
'y'] = ret[
'C'];
140 ret[
'S'] = ret[
'C']; ret[
's'] = ret[
'C'];
141 ret[
'W'] = ret[
'A']; ret[
'w'] = ret[
'A'];
142 ret[
'K'] = ret[
'G']; ret[
'k'] = ret[
'G'];
143 ret[
'M'] = ret[
'A']; ret[
'm'] = ret[
'A'];
144 ret[
'B'] = ret[
'C']; ret[
'b'] = ret[
'C'];
145 ret[
'D'] = ret[
'A']; ret[
'd'] = ret[
'A'];
146 ret[
'H'] = ret[
'A']; ret[
'h'] = ret[
'A'];
147 ret[
'V'] = ret[
'A']; ret[
'v'] = ret[
'A'];
154 static const std::array<dna4, value_size> complement_table;
177 constexpr
dna4 operator""_dna4(
char const c) noexcept
196 for (
size_t i = 0; i < n; ++i)
207 constexpr std::array<dna4, dna4::value_size> dna4::complement_table
The four letter DNA alphabet of A,C,G,T.
Definition: dna4.hpp:73
std::vector< dna4 > dna4_vector
Alias for an std::vector of seqan3::dna4.
Definition: dna4.hpp:163
alphabet_concept && assign_char(alphabet_concept &&alph, char_type const chr)
Returns the alphabet letter's value in character representation.
constexpr dna4(t const &r) noexcept
Allow implicit construction from dna/rna of the same size.
Definition: dna4.hpp:102
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:58
constexpr dna4 & assign_rank(rank_type const c) noexcept
Assign from a numeric value.
Definition: alphabet_base.hpp:189
static detail::min_viable_uint_t< size > constexpr value_size
The size of the alphabet, i.e. the number of different values it can take.
Definition: alphabet_base.hpp:198
Provides seqan3::nucleotide_base.
Provides utilities for modifying characters.
char_t char_type
The type of the alphabet when converted to char (e.g. via to_char()).
Definition: alphabet_base.hpp:87
The four letter RNA alphabet of A,C,G,U.
Definition: rna4.hpp:71
A CRTP-base that refines seqan3::alphabet_base and is used by the nucleotides.
Definition: nucleotide_base.hpp:65
constexpr char_type to_lower(char_type const c) noexcept
Converts 'A'-'Z' to 'a'-'z' respectively; other characters are returned as is.
Definition: char_operations.hpp:107