Loading...
Searching...
No Matches
seqan3::dot_bracket3 Class Reference
Alphabet » Structure

The three letter RNA structure alphabet of the characters ".()". More...

`#include <seqan3/alphabet/structure/dot_bracket3.hpp>`

Inheritance diagram for seqan3::dot_bracket3:
[legend]

## 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.

## 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.

## 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
| The char representation; conditional needed to make semi alphabet definitions legal.
using | rank_type
| The type of the alphabet when represented as a number (e.g. via to_rank()).

## Detailed Description

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.

GCGGAUUUAGCUCAGUUGGGAGAGCGCCAGACUGAAGAUUUGGAGGUCCUGUGUUCGAUCCACAGAAUUCGCA
(((((((..((((........)))).((((.........)))).....(((((.......)))))))))))).

### Example

// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: CC0-1.0
#include <seqan3/alphabet/structure/dot_bracket3.hpp>
#include <seqan3/core/debug_stream.hpp>
int main()
{
using namespace seqan3::literals;
seqan3::dot_bracket3 letter{'.'_db3};
letter.assign_char('(');
seqan3::debug_stream << letter << '\n'; // prints "("
letter.assign_char('F'); // Unknown characters are implicitly converted to '.'.
seqan3::debug_stream << letter << '\n'; // prints "."
}
seqan3::alphabet_base::assign_char
constexpr derived_type & assign_char(char_type const chr) noexcept
Assign from a character, implicitly converts invalid characters.
Definition alphabet_base.hpp:160
seqan3::dot_bracket3
The three letter RNA structure alphabet of the characters ".()".
Definition dot_bracket3.hpp:51
debug_stream.hpp
Provides seqan3::debug_stream and related types.
dot_bracket3.hpp
Provides the dot bracket format for RNA structure.
seqan3::debug_stream
debug_stream_type debug_stream
A global instance of seqan3::debug_stream_type.
Definition debug_stream.hpp:38
seqan3::literals
The SeqAn namespace for literals.

This entity is experimental and subject to change in the future. Experimental since version 3.1.

## Member Function Documentation

## is_pair_close()

bool seqan3::dot_bracket3::is_pair_close | ( |  | ) | const

inline constexpr noexcept

Check whether the character represents a leftward interaction in an RNA structure.

Returns
  True if the letter represents a leftward interaction, False otherwise.

This entity is experimental and subject to change in the future. Experimental since version 3.1.

## is_pair_open()

bool seqan3::dot_bracket3::is_pair_open | ( |  | ) | const

inline constexpr noexcept

Check whether the character represents a rightward interaction in an RNA structure.

Returns
  True if the letter represents a rightward interaction, False otherwise.

This entity is experimental and subject to change in the future. Experimental since version 3.1.

## is_unpaired()

bool seqan3::dot_bracket3::is_unpaired | ( |  | ) | const

inline constexpr noexcept

Check whether the character represents an unpaired position in an RNA structure.

Returns
  True if the letter represents an unpaired site, False otherwise.

This entity is experimental and subject to change in the future. Experimental since version 3.1.

## pseudoknot_id()

std::optional< uint8_t > seqan3::dot_bracket3::pseudoknot_id | ( |  | ) | const

inline constexpr noexcept

Get an identifier for a pseudoknotted interaction, where opening and closing brackets of the same type have the same id.

Returns
  The pseudoknot id (always 0) if alph denotes an interaction, and no value otherwise.

This entity is experimental and subject to change in the future. Experimental since version 3.1.

## Friends And Related Symbol Documentation

## operator""_db3() [1/2]

std::vector< dot_bracket3 > operator""_db3 | ( | char const * | str,
|  | std::size_t | len )

related

The seqan3::db3 string literal.

Parameters

  [in] | str | A pointer to the character string to assign.
  [in] | len | The size of the character string to assign.

Returns
  std::vector<seqan3::dot_bracket3>

You can use this string literal to easily assign to std::vector<seqan3::dot_bracket3>:

// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: CC0-1.0
#include <seqan3/alphabet/structure/dot_bracket3.hpp>
int main()
{
using namespace seqan3::literals;
std::vector<seqan3::dot_bracket3> sequence1{".(..)."_db3};
std::vector<seqan3::dot_bracket3> sequence2 = ".(..)."_db3;
auto sequence3 = ".(..)."_db3;
}
std::vector

This entity is experimental and subject to change in the future. Experimental since version 3.1.

## operator""_db3() [2/2]

dot_bracket3 operator""_db3 | ( | char const | ch | ) |

related

The seqan3::db3 char literal.

Parameters

  [in] | ch | The character to represent as dot bracket.

Returns
  seqan3::dot_bracket3

You can use this char literal to assign a seqan3::dot_bracket3 character:

// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: CC0-1.0
#include <seqan3/alphabet/structure/dot_bracket3.hpp>
int main()
{
using namespace seqan3::literals;
seqan3::dot_bracket3 letter1{'('_db3};
auto letter2 = '('_db3;
}

This entity is experimental and subject to change in the future. Experimental since version 3.1.

## Member Data Documentation

## max_pseudoknot_depth

uint8_t seqan3::dot_bracket3::max_pseudoknot_depth {1u}

static constexpr

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.

This entity is experimental and subject to change in the future. Experimental since version 3.1.

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

- dot_bracket3.hpp

Hide me