Loading...
Searching...
No Matches
seqan3::sam_tag_type< tag_value > Struct Template Reference
IO » SAM File

The generic base class. More...

`#include <seqan3/io/sam_file/sam_tag_dictionary.hpp>`

## Public Types

using | type = detail::sam_tag_variant
| The type for all unknown tags with no extra overload defaults to a std::variant.

## Related Symbols

(Note that these are not member symbols.)
template<uint16_t tag_value>
using | sam_tag_type_t = typename sam_tag_type<tag_value>::type
| Short cut helper for seqan3::sam_tag_type::type.

## Detailed Description

template<uint16_t tag_value>
struct seqan3::sam_tag_type< tag_value >

The generic base class.

Attention
  This is a pure base class that needs to be specialized in order to be used.

### How to specialize the type for your custom tag

All known tags of the SAM specifications already have a pre-defined type. If you want to specify the type of your custom tag (the SAM specifications recommend to use X?, Y? or Z?) you need to overload the seqan3::sam_tag_type struct in the following way: (take tag "XX" as an example)

#include <seqan3/io/sam_file/sam_tag_dictionary.hpp>
using namespace seqan3::literals;
template <> // no template parameter since the tag is known
struct seqan3::sam_tag_type<"XX"_tag> // here comes your tag
{
using type = int32_t; // specify the type of your tag
};

Everything else, like the get and set functions and correct SAM output (XX:i:? in this case) is handled by the seqan3::sam_tag_dictionary.

The seqan3::sam_tag_type is overloaded the following SAM tags:

Tag Name | SeqAn Type Implementation
--- | ---
"AM"_tag | int32_t
"AS"_tag | int32_t
"BC"_tag | std::string
"BQ"_tag | std::string
"BZ"_tag | std::string
"CB"_tag | std::string
"CC"_tag | std::string
"CG"_tag | std::vector<int32_t>
"CM"_tag | int32_t
"CO"_tag | std::string
"CP"_tag | int32_t
"CQ"_tag | std::string
"CR"_tag | std::string
"CS"_tag | std::string
"CT"_tag | std::string
"CY"_tag | std::string
"E2"_tag | std::string
"FI"_tag | int32_t
"FS"_tag | std::string
"FZ"_tag | std::vector<uint16_t>
"H0"_tag | int32_t
"H1"_tag | int32_t
"H2"_tag | int32_t
"HI"_tag | int32_t
"IH"_tag | int32_t
"LB"_tag | std::string
"MC"_tag | std::string
"MD"_tag | std::string
"MI"_tag | std::string
"MQ"_tag | int32_t
"NH"_tag | int32_t
"NM"_tag | int32_t
"OC"_tag | std::string
"OP"_tag | int32_t
"OQ"_tag | std::string
"OX"_tag | std::string
"PG"_tag | std::string
"PQ"_tag | int32_t
"PT"_tag | std::string
"PU"_tag | std::string
"Q2"_tag | std::string
"QT"_tag | std::string
"QX"_tag | std::string
"R2"_tag | std::string
"RG"_tag | std::string
"RT"_tag | std::string
"RX"_tag | std::string
"SA"_tag | std::string
"SM"_tag | int32_t
"TC"_tag | int32_t
"U2"_tag | std::string
"UQ"_tag | int32_t

Remarks
  For a complete overview, take a look at SAM File

The documentation for this struct was generated from the following file:

- sam_tag_dictionary.hpp

Hide me