The cigar operation alphabet.. More...
#include <bio/alphabet/cigar/cigar_op.hpp>
Public Member Functions | |
Constructors, destructor and assignment | |
constexpr | cigar_op () noexcept=default |
Defaulted. | |
constexpr | cigar_op (cigar_op const &) noexcept=default |
Defaulted. | |
constexpr | cigar_op (cigar_op &&) noexcept=default |
Defaulted. | |
constexpr cigar_op & | operator= (cigar_op const &) noexcept=default |
Defaulted. | |
constexpr cigar_op & | operator= (cigar_op &&) noexcept=default |
Defaulted. | |
~cigar_op () noexcept=default | |
Read functions | |
constexpr char_type | to_char () const noexcept |
Return the letter as a character of char_type. | |
constexpr rank_type | to_rank () const noexcept |
Return the letter's numeric value (rank in the alphabet). | |
Write functions | |
constexpr cigar_op & | assign_char (char_type const c) noexcept |
Assign from a character, implicitly converts invalid characters. | |
constexpr cigar_op & | assign_rank (rank_type const c) noexcept |
Assign from a numeric value. | |
Static Public Attributes | |
static constexpr size_t | alphabet_size |
The size of the alphabet, i.e. the number of different values it can take. | |
Protected Types | |
Member types | |
using | char_type = std::conditional_t< std::same_as< char, void >, char, char > |
The char representation; conditional needed to make semi alphabet definitions legal. | |
using | rank_type = meta::detail::min_viable_uint_t< size - 1 > |
The type of the alphabet when represented as a number (e.g. via to_rank()). | |
Related Functions | |
(Note that these are not member functions.) | |
Literals | |
consteval cigar_op | operator""_cigar_op (char const c) |
The bio::alphabet::cigar_op char literal. | |
The cigar operation alphabet.
.
The main purpose of the bio::alphabet::cigar_op alphabet is to be used in the bio::alphabet::cigar composition, where a cigar operation is paired with a count value.
Op | Rank | Description | Consumes query | Consumes reference |
---|---|---|---|---|
M | 0 | alignment match (can be a sequence match or mismatch) | yes | yes |
I | 1 | insertion to the reference | yes | no |
D | 2 | deletion from the reference | no | yes |
N | 3 | skipped region from the reference | no | yes |
S | 4 | soft clipping (clipped sequences present in SEQ) | yes | no |
H | 5 | hard clipping (clipped sequences NOT present in SEQ) | no | no |
P | 6 | padding (silent deletion from padded reference) | no | no |
= | 7 | sequence match | yes | yes |
X | 8 | sequence mismatch | yes | yes |
B | 9 | ? | ? | ? |
This table is reproduced from the SAM standard. The B operation is used internally and not documented.
|
defaultnoexcept |
Defaulted.
|
inlineconstexprnoexceptinherited |
Assign from a character, implicitly converts invalid characters.
c | The character to be assigned. |
Provides an implementation for bio::alphabet::assign_char_to, required to model bio::alphabet::alphabet.
Constant.
Guaranteed not to throw.
|
inlineconstexprnoexceptinherited |
Assign from a numeric value.
c | The rank to be assigned. |
Provides an implementation for bio::alphabet::assign_rank_to, required to model bio::alphabet::semialphabet.
Constant.
Guaranteed not to throw.
|
inlineconstexprnoexceptinherited |
Return the letter as a character of char_type.
Provides an implementation for bio::alphabet::to_char, required to model bio::alphabet::alphabet.
Constant.
Guaranteed not to throw.
|
inlineconstexprnoexceptinherited |
Return the letter's numeric value (rank in the alphabet).
Provides an implementation for bio::alphabet::to_rank, required to model bio::alphabet::semialphabet.
Constant.
Guaranteed not to throw.
|
related |
The bio::alphabet::cigar_op char literal.