SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
The three letter RNA structure alphabet of the characters ".()". More...
#include <seqan3/alphabet/structure/dot_bracket3.hpp>
Public Member Functions | |
Constructors, destructor and assignment | |
constexpr | dot_bracket3 () noexcept=default |
Defaulted. | |
constexpr | dot_bracket3 (dot_bracket3 const &) noexcept=default |
Defaulted. | |
constexpr | dot_bracket3 (dot_bracket3 &&) noexcept=default |
Defaulted. | |
constexpr dot_bracket3 & | operator= (dot_bracket3 const &) noexcept=default |
Defaulted. | |
constexpr dot_bracket3 & | operator= (dot_bracket3 &&) noexcept=default |
Defaulted. | |
~dot_bracket3 () noexcept=default | |
Defaulted. | |
Public Member Functions inherited from seqan3::alphabet_base< dot_bracket3, 3 > | |
constexpr | alphabet_base () noexcept=default |
Defaulted. | |
constexpr | alphabet_base (alphabet_base const &) noexcept=default |
Defaulted. | |
constexpr | alphabet_base (alphabet_base &&) noexcept=default |
Defaulted. | |
constexpr alphabet_base & | operator= (alphabet_base const &) noexcept=default |
Defaulted. | |
constexpr alphabet_base & | operator= (alphabet_base &&) noexcept=default |
Defaulted. | |
~alphabet_base () noexcept=default | |
Defaulted. | |
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). | |
constexpr dot_bracket3 & | assign_char (char_type const chr) noexcept |
Assign from a character, implicitly converts invalid characters. | |
constexpr dot_bracket3 & | assign_rank (rank_type const c) noexcept |
Assign from a numeric value. | |
Private Types | |
using | base_t = alphabet_base< dot_bracket3, 3 > |
The base class. | |
Static Private Member Functions | |
static constexpr rank_type | char_to_rank (char_type const chr) |
Returns the rank representation of character. | |
static constexpr char_type | rank_to_char (rank_type const rank) |
Returns the character representation of rank. | |
Private Attributes | |
friend | base_t |
Befriend seqan3::alphabet_base. | |
Static Private Attributes | |
static constexpr std::array< rank_type, 256 > | char_to_rank_table |
The lookup table used in char_to_rank. | |
static constexpr char_type | rank_to_char_table [alphabet_size] {'.', '(', ')'} |
The lookup table used in rank_to_char. | |
Related Symbols | |
(Note that these are not member symbols.) | |
Structure literals | |
constexpr dot_bracket3 | operator""_db3 (char const ch) noexcept |
The seqan3::db3 char literal. | |
constexpr std::vector< dot_bracket3 > | operator""_db3 (char const *str, std::size_t len) |
The seqan3::db3 string literal. | |
Related Symbols inherited from semialphabet | |
template<cereal_output_archive archive_t, semialphabet alphabet_t> | |
alphabet_rank_t< alphabet_t > | save_minimal (archive_t const &, alphabet_t const &l) |
Save an alphabet letter to stream. | |
template<cereal_input_archive archive_t, typename wrapped_alphabet_t > | |
void | load_minimal (archive_t const &, wrapped_alphabet_t &&l, alphabet_rank_t< detail::strip_cereal_wrapper_t< wrapped_alphabet_t > > const &r) |
Restore an alphabet letter from a saved rank. | |
RNA structure properties | |
static constexpr uint8_t | max_pseudoknot_depth {1u} |
The ability of this alphabet to represent pseudoknots, i.e. crossing interactions, up to a certain depth. | |
constexpr bool | is_pair_open () const noexcept |
Check whether the character represents a rightward interaction in an RNA structure. | |
constexpr bool | is_pair_close () const noexcept |
Check whether the character represents a leftward interaction in an RNA structure. | |
constexpr bool | is_unpaired () const noexcept |
Check whether the character represents an unpaired position in an RNA structure. | |
constexpr std::optional< uint8_t > | pseudoknot_id () const noexcept |
Get an identifier for a pseudoknotted interaction, where opening and closing brackets of the same type have the same id. | |
Additional Inherited Members | |
Static Public Attributes inherited from seqan3::alphabet_base< dot_bracket3, 3 > | |
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. | |
Protected Types inherited from seqan3::alphabet_base< dot_bracket3, 3 > | |
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 = detail::min_viable_uint_t< size - 1 > |
The type of the alphabet when represented as a number (e.g. via to_rank()). | |
The three letter RNA structure alphabet of the characters ".()".
The brackets denote RNA base pair interactions. Every left bracket must have a corresponding right bracket. Pseudoknots cannot be expressed in this format. A dot (.) represents a character that is not paired.
|
inlinestaticconstexprprivate |
Returns the rank representation of character.
This function is required by seqan3::alphabet_base.
|
inlineconstexprnoexcept |
Check whether the character represents a leftward interaction in an RNA structure.
|
inlineconstexprnoexcept |
Check whether the character represents a rightward interaction in an RNA structure.
|
inlineconstexprnoexcept |
Check whether the character represents an unpaired position in an RNA structure.
|
inlineconstexprnoexcept |
Get an identifier for a pseudoknotted interaction, where opening and closing brackets of the same type have the same id.
|
inlinestaticconstexprprivate |
Returns the character representation of rank.
This function is required by seqan3::alphabet_base.
|
related |
The seqan3::db3 string literal.
[in] | str | A pointer to the character string to assign. |
[in] | len | The size of the character string to assign. |
You can use this string literal to easily assign to std::vector<seqan3::dot_bracket3>:
|
related |
The seqan3::db3 char literal.
[in] | ch | The character to represent as dot bracket. |
You can use this char literal to assign a seqan3::dot_bracket3 character:
|
staticconstexprprivate |
The lookup table used in char_to_rank.
We would have defined these lookup tables directly within their respective constexpr functions, but at the time of writing this, gcc did not (clang >= 4 did!) auto-generate lookup tables.
|
staticconstexpr |
The ability of this alphabet to represent pseudoknots, i.e. crossing interactions, up to a certain depth.
It is the number of distinct pairs of interaction symbols the format supports. The value 1 denotes no pseudoknot support.
|
staticconstexprprivate |
The lookup table used in rank_to_char.
We would have defined these lookup tables directly within their respective constexpr functions, but at the time of writing this, gcc did not (clang >= 4 did!) auto-generate lookup tables.