54 template <genetic_code gc = genetic_code::canonical, nucleot
ide_alphabet nucl_type>
57 if constexpr (std::same_as<nucl_type, dna4> || std::same_as<nucl_type, dna5> || std::same_as<nucl_type, dna15>)
60 return seqan3::detail::translation_table<nucl_type, gc>::value[
to_rank(n1)][
to_rank(n2)][
to_rank(n3)];
62 else if constexpr (std::same_as<nucl_type, rna4> || std::same_as<nucl_type, rna5> || std::same_as<nucl_type, rna15>)
69 return seqan3::detail::translation_table<rna2dna_t, gc>::value[
to_rank(n1)][
to_rank(n2)][
to_rank(n3)];
75 return seqan3::detail::translation_table<dna15, gc>::value[
to_rank(
static_cast<dna15>(n1))]
81 #ifdef SEQAN3_DEPRECATED_310
101 template <genetic_code gc = genetic_code::canonical,
typename tuple_type>
103 requires (std::tuple_size<tuple_type>::value == 3) &&
110 return translate_triplet(std::get<0>(input_tuple), std::get<1>(input_tuple), std::get<2>(input_tuple));
132 template <genetic_code gc = genetic_code::canonical, std::ranges::input_range range_type>
138 auto n1 = std::ranges::begin(input_range);
142 assert(n1 != std::ranges::end(input_range));
143 assert(n2 != std::ranges::end(input_range));
144 assert(n3 != std::ranges::end(input_range));
168 template <genetic_code gc = genetic_code::canonical, std::ranges::random_access_range rng_t>
174 assert(std::ranges::begin(input_range) != std::ranges::end(input_range));
175 assert(std::ranges::begin(input_range) + 1 != std::ranges::end(input_range));
176 assert(std::ranges::begin(input_range) + 2 != std::ranges::end(input_range));
Provides seqan3::aa27, container aliases and string literals.
The twenty-seven letter amino acid alphabet.
Definition: aa27.hpp:46
The 15 letter DNA alphabet, containing all IUPAC smybols minus the gap.
Definition: dna15.hpp:51
The four letter DNA alphabet of A,C,G,T.
Definition: dna4.hpp:53
The five letter DNA alphabet of A,C,G,T and the unknown character N.
Definition: dna5.hpp:51
Provides various transformation traits used by the range module.
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition: concept.hpp:155
constexpr aa27 translate_triplet(nucl_type const &n1, nucl_type const &n2, nucl_type const &n3) noexcept
Translate one nucleotide triplet into single amino acid (single nucleotide interface).
Definition: translation.hpp:55
A concept that indicates whether an alphabet represents nucleotides.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides translation details for nucleotide to aminoacid translation.
Genetic codes used for translating a triplet of nucleotides into an amino acid.