The four letter DNA alphabet of A,C,G,T.
More...
#include <seqan3/alphabet/nucleotide/dna4.hpp>
The four letter DNA alphabet of A,C,G,T.
Note that you can assign 'U' as a character to dna4 and it will silently be converted to 'T'.
Like most alphabets, this alphabet cannot be initialised directly from its character representation. Instead initialise/assign from the character literal or use the function seqan3::dna4::assign_char().
int main()
{
using seqan3::operator""_dna4;
my_letter.assign_char('a');
}
constexpr derived_type & assign_char(char_type const c) noexcept
Assign from a character, implicitly converts invalid characters.
Definition: alphabet_base.hpp:159
The four letter DNA alphabet of A,C,G,T.
Definition: dna4.hpp:51
Provides seqan3::debug_stream and related types.
Provides seqan3::dna4, container aliases and string literals.
debug_stream_type debug_stream
A global instance of seqan3::debug_stream_type.
Definition: debug_stream.hpp:42
If the special char conversion of IUPAC characters is not your desired behavior, refer to our cookbook for an example of A custom dna4 alphabet that converts all unknown characters to A
to change the conversion behavior.
◆ operator""_dna4() [1/2]
The seqan3::dna4 string literal.
- Returns
- seqan3::dna4_vector
You can use this string literal to easily assign to dna4_vector:
int main()
{
using seqan3::operator""_dna4;
seqan3::dna4_vector foo{"ACGTTA"_dna4};
seqan3::dna4_vector bar = "ACGTTA"_dna4;
auto bax = "ACGTTA"_dna4;
}
◆ operator""_dna4() [2/2]
constexpr dna4 operator""_dna4 |
( |
char const |
c | ) |
|
|
related |
◆ char_to_rank
Initial value:{
[] () constexpr
{
{
}
ret['U'] = ret['T']; ret['u'] = ret['t'];
ret['R'] = ret['A']; ret['r'] = ret['A'];
ret['Y'] = ret['C']; ret['y'] = ret['C'];
ret['S'] = ret['C']; ret['s'] = ret['C'];
ret['W'] = ret['A']; ret['w'] = ret['A'];
ret['K'] = ret['G']; ret['k'] = ret['G'];
ret['M'] = ret['A']; ret['m'] = ret['A'];
ret['B'] = ret['C']; ret['b'] = ret['C'];
ret['D'] = ret['A']; ret['d'] = ret['A'];
ret['H'] = ret['A']; ret['h'] = ret['A'];
ret['V'] = ret['A']; ret['v'] = ret['A'];
return ret;
}()
}
static constexpr detail::min_viable_uint_t< size > alphabet_size
The size of the alphabet, i.e. the number of different values it can take.
Definition: alphabet_base.hpp:198
static constexpr char_type rank_to_char[alphabet_size]
Value to char conversion table.
Definition: dna4.hpp:90
constexpr char_type to_lower(char_type const c) noexcept
Converts 'A'-'Z' to 'a'-'z' respectively; other characters are returned as is.
Definition: transform.hpp:81
Char to value conversion table.
◆ complement_table
Initial value:{
'T'_dna4,
'G'_dna4,
'C'_dna4,
'A'_dna4
}
The complement table.
◆ rank_to_char
Initial value:
Value to char conversion table.
The documentation for this class was generated from the following file: