35 char constexpr sam_tag_type_char[11] = {
'A',
'i',
'f',
'Z',
'B',
'B',
'B',
'B',
'B',
'B',
'B'};
37 char constexpr sam_tag_type_char_extra[11] = {
'\0',
'\0',
'\0',
'\0',
'c',
'C',
's',
'S',
'i',
'I',
'f'};
63 #ifdef __cpp_nontype_template_parameter_class 64 template <small_
string<2> str>
65 constexpr uint16_t
operator""_tag()
67 #else // GCC/Clang extension 68 #pragma GCC diagnostic push 69 #pragma GCC diagnostic ignored "-Wpedantic" 70 template <
typename char_t, char_t ...s>
71 constexpr uint16_t
operator""_tag()
75 #pragma GCC diagnostic pop 78 static_assert(str.size() == 2,
"Illegal SAM tag: Exactly two characters must be given.");
80 char constexpr char0 = str[0];
81 char constexpr char1 = str[1];
84 "Illegal SAM tag: a SAM tag must match /[A-Za-z][A-Za-z0-9]/.");
86 return static_cast<uint16_t
>(char0) * 256 + static_cast<uint16_t>(char1);
165 template <u
int16_t tag_value>
174 template <u
int16_t tag_value>
178 template <>
struct sam_tag_type<"AM"_tag> {
using type = int32_t; };
179 template <>
struct sam_tag_type<"AS"_tag> {
using type = int32_t; };
186 template <>
struct sam_tag_type<"CM"_tag> {
using type = int32_t; };
188 template <>
struct sam_tag_type<"CP"_tag> {
using type = int32_t; };
195 template <>
struct sam_tag_type<"FI"_tag> {
using type = int32_t; };
203 template <>
struct sam_tag_type<"H0"_tag> {
using type = int32_t; };
204 template <>
struct sam_tag_type<"H1"_tag> {
using type = int32_t; };
205 template <>
struct sam_tag_type<"H2"_tag> {
using type = int32_t; };
206 template <>
struct sam_tag_type<"HI"_tag> {
using type = int32_t; };
207 template <>
struct sam_tag_type<"IH"_tag> {
using type = int32_t; };
215 template <>
struct sam_tag_type<"MQ"_tag> {
using type = int32_t; };
216 template <>
struct sam_tag_type<"NH"_tag> {
using type = int32_t; };
217 template <>
struct sam_tag_type<"NM"_tag> {
using type = int32_t; };
219 template <>
struct sam_tag_type<"OP"_tag> {
using type = int32_t; };
223 template <>
struct sam_tag_type<"PQ"_tag> {
using type = int32_t; };
237 template <>
struct sam_tag_type<"SM"_tag> {
using type = int32_t; };
241 template <>
struct sam_tag_type<"TC"_tag> {
using type = int32_t; };
243 template <>
struct sam_tag_type<"UQ"_tag> {
using type = int32_t; };
349 template <u
int16_t tag>
356 if ((*this).count(tag) == 0)
359 return std::get<sam_tag_type_t<tag>>((*this)[tag]);
363 template <u
int16_t tag>
369 if ((*this).count(tag) == 0)
372 return std::get<sam_tag_type_t<tag>>(
std::move((*
this)[tag]));
377 template <u
int16_t tag>
381 auto const &
get()
const &
383 return std::get<sam_tag_type_t<tag>>((*this).at(tag));
388 template <u
int16_t tag>
392 auto const &&
get()
const &&
394 return std::get<sam_tag_type_t<tag>>(
std::move((*this).at(tag)));
Provides concepts for core language types and relations that don't have concepts in C++20 (yet)...
typename sam_tag_type< tag_value >::type sam_tag_type_t
Short cut helper for seqan3::sam_tag_type::type.
Definition: sam_tag_dictionary.hpp:175
Provides seqan3::type_list and auxiliary type traits.
The main SeqAn3 namespace.
Implements a small string that can be used for compile time computations.
Definition: small_string.hpp:42
auto constexpr is_alpha
Checks whether c is a alphabetical character.
Definition: predicate.hpp:239
Definition: aligned_sequence_concept.hpp:36
Provides character predicates for tokenisation.
A constexpr string implementation to manipulate string literals at compile time.
auto const move
A view that turns lvalue-references into rvalue-references.
Definition: move.hpp:68
The generic base class.
Definition: sam_tag_dictionary.hpp:166
The concept std::same_as<T, U> is satisfied if and only if T and U denote the same type...
auto constexpr is_alnum
Checks whether c is a alphanumeric character.
Definition: predicate.hpp:220
The SAM tag dictionary class that stores all optional SAM fields.
Definition: sam_tag_dictionary.hpp:324