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 | |
Read functions | |
constexpr char_type | to_char () const noexcept |
Return the letter as a character of char_type. More... | |
constexpr rank_type | to_rank () const noexcept |
Return the letter's numeric value (rank in the alphabet). More... | |
Write functions | |
constexpr dot_bracket3 & | assign_char (char_type const c) noexcept |
Assign from a character, implicitly converts invalid characters. More... | |
constexpr dot_bracket3 & | assign_rank (rank_type const c) noexcept |
Assign from a numeric value. More... | |
Static Public Attributes | |
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 | |
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 = 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 | |
std::vector< dot_bracket3 > | operator""_db3 (const char *str, std::size_t len) |
The seqan3::db3 string literal. More... | |
constexpr dot_bracket3 | operator""_db3 (char const ch) noexcept |
The seqan3::db3 char literal. More... | |
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. More... | |
constexpr bool | is_pair_open () const noexcept |
Check whether the character represents a rightward interaction in an RNA structure. More... | |
constexpr bool | is_pair_close () const noexcept |
Check whether the character represents a leftward interaction in an RNA structure. More... | |
constexpr bool | is_unpaired () const noexcept |
Check whether the character represents an unpaired position in an RNA structure. More... | |
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. More... | |
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.
The following code example creates a dot_bracket3 vector, modifies it, and prints the result to stderr.
|
defaultnoexcept |
Defaulted.
|
inlineconstexprnoexceptinherited |
Assign from a character, implicitly converts invalid characters.
c | The character to be assigned. |
Provides an implementation for seqan3::assign_char_to, required to model seqan3::alphabet.
Constant.
Guaranteed not to throw.
|
inlineconstexprnoexceptinherited |
Assign from a numeric value.
c | The rank to be assigned. |
Provides an implementation for seqan3::assign_rank_to, required to model seqan3::semialphabet.
Constant.
Guaranteed not to throw.
|
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.
|
inlineconstexprnoexceptinherited |
Return the letter as a character of char_type.
Provides an implementation for seqan3::to_char, required to model seqan3::alphabet.
Constant.
Guaranteed not to throw.
|
inlineconstexprnoexceptinherited |
Return the letter's numeric value (rank in the alphabet).
Provides an implementation for seqan3::to_rank, required to model seqan3::semialphabet.
Constant.
Guaranteed not to throw.
|
related |
The seqan3::db3 char literal.
[in] | ch | The character to represent as dot bracket. |
You can use this string literal to assign a seqan3::dot_bracket3 character:
|
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 a vector of seqan3::dot_bracket3 characters:
|
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.