SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
Structure

The structure module contains alphabets for RNA and protein structure. More...

+ Collaboration diagram for Structure:

Classes

class  seqan3::dot_bracket3
 The three letter RNA structure alphabet of the characters ".()". More...
 
class  seqan3::dssp9
 The protein structure alphabet of the characters "HGIEBTSCX". More...
 
interface  seqan3::RnaStructureAlphabet
 A concept that indicates whether an alphabet represents RNA structure. More...
 
class  seqan3::structured_aa< sequence_alphabet_t, structure_alphabet_t >
 A seqan3::alphabet_tuple_base that joins an aminoacid alphabet with a protein structure alphabet. More...
 
class  seqan3::structured_rna< sequence_alphabet_t, structure_alphabet_t >
 A seqan3::alphabet_tuple_base that joins a nucleotide alphabet with an RNA structure alphabet. More...
 
class  seqan3::wuss< SIZE >
 The WUSS structure alphabet of the characters .<>:,-_~;()[]{}AaBbCcDd... More...
 

Function objects (Structure)

constexpr auto seqan3::is_pair_open = detail::adl::only::is_pair_open_fn{}
 Check whether the given character represents a rightward interaction in an RNA structure. More...
 
constexpr auto seqan3::is_pair_close = detail::adl::only::is_pair_close_fn{}
 Check whether the given character represents a leftward interaction in an RNA structure. More...
 
constexpr auto seqan3::is_unpaired = detail::adl::only::is_unpaired_fn{}
 Check whether the given character represents an unpaired nucleotide in an RNA structure. More...
 
template<typename alph_t >
constexpr auto seqan3::max_pseudoknot_depth = detail::adl::only::max_pseudoknot_depth_obj<alph_t>()
 A type trait that holds the ability of the structure alphabet to represent pseudoknots, i.e. crossing interactions, up to a certain depth. More...
 
constexpr auto seqan3::pseudoknot_id = detail::adl::only::pseudoknot_id_fn{}
 Retrieve an id for the level of a pseudoknotted interaction (also known as 'page number'). More...
 

Detailed Description

The structure module contains alphabets for RNA and protein structure.

The following alphabets are currently supported in SeqAn. Please see the format's page for more details.

Name Characters Description
Dot Bracket (). Simple annotation that defines base pairs. No pseudoknots allowed.
WUSS .<>:,-_~;()[]{}AaBb... Annotation that provides further markups and pseudoknots.
DSSP HBEGITSCX Structure encoding for proteins.

Variable Documentation

◆ is_pair_close

constexpr auto seqan3::is_pair_close = detail::adl::only::is_pair_close_fn{}
inline

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

Template Parameters
your_typeType of the argument.
Parameters
chrThe RNA structure character whose property is checked.
Returns
True if the character represents a leftward interaction, False otherwise.

This is a function object. Invoke it with the parameter(s) specified above.

It acts as a wrapper and looks for three possible implementations (in this order):

  1. A free function is_pair_close(your_type const a) in the namespace of your type (or as friend). The function must be marked noexcept (constexpr is not required, but recommended) and the return type be bool.
  2. A free function is_pair_close(your_type const a) in namespace seqan3::custom. The same restrictions apply as above.
  3. A member function called is_pair_close(). It must be marked noexcept (constexpr is not required, but recommended) and the return type be bool.

Every RNA structure alphabet type must provide one of the above.

Example

bool is_closing_char = '}'_wuss51.is_pair_close(); // true
is_closing_char = seqan3::is_pair_close('.'_wuss51); // false

Customisation point

This is a customisation point (see Customisation). To specify the behaviour for your own alphabet type, simply provide one of the three functions specified above.

◆ is_pair_open

constexpr auto seqan3::is_pair_open = detail::adl::only::is_pair_open_fn{}
inline

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

Template Parameters
your_typeType of the argument.
Parameters
chrThe RNA structure character whose property is checked.
Returns
True if the character represents a rightward interaction, False otherwise.

This is a function object. Invoke it with the parameter(s) specified above.

It acts as a wrapper and looks for three possible implementations (in this order):

  1. A free function is_pair_open(your_type const a) in the namespace of your type (or as friend). The function must be marked noexcept (constexpr is not required, but recommended) and the return type be bool.
  2. A free function is_pair_open(your_type const a) in namespace seqan3::custom. The same restrictions apply as above.
  3. A member function called is_pair_open(). It must be marked noexcept (constexpr is not required, but recommended) and the return type be bool.

Every RNA structure alphabet type must provide one of the above.

Example

bool is_opening_char = '{'_wuss51.is_pair_open(); // true
is_opening_char = seqan3::is_pair_open('.'_wuss51); // false

Customisation point

This is a customisation point (see Customisation). To specify the behaviour for your own alphabet type, simply provide one of the three functions specified above.

◆ is_unpaired

constexpr auto seqan3::is_unpaired = detail::adl::only::is_unpaired_fn{}
inline

Check whether the given character represents an unpaired nucleotide in an RNA structure.

Template Parameters
your_typeType of the argument.
Parameters
chrThe RNA structure character whose property is checked.
Returns
True if the character represents an unpaired site, False otherwise.

This is a function object. Invoke it with the parameter(s) specified above.

It acts as a wrapper and looks for three possible implementations (in this order):

  1. A free function is_unpaired(your_type const a) in the namespace of your type (or as friend). The function must be marked noexcept (constexpr is not required, but recommended) and the return type be bool.
  2. A free function is_unpaired(your_type const a) in namespace seqan3::custom. The same restrictions apply as above.
  3. A member function called is_unpaired(). It must be marked noexcept (constexpr is not required, but recommended) and the return type be bool.

Every RNA structure alphabet type must provide one of the above.

Example

bool is_unpaired_char = '.'_wuss51.is_unpaired(); // true
is_unpaired_char = seqan3::is_unpaired('{'_wuss51); // false

Customisation point

This is a customisation point (see Customisation). To specify the behaviour for your own alphabet type, simply provide one of the three functions specified above.

◆ max_pseudoknot_depth

template<typename alph_t >
constexpr auto seqan3::max_pseudoknot_depth = detail::adl::only::max_pseudoknot_depth_obj<alph_t>()
inline

A type trait that holds the ability of the structure alphabet to represent pseudoknots, i.e. crossing interactions, up to a certain depth.

Template Parameters
your_typeType of the argument.
Parameters
chrThe RNA structure character whose property is checked.
Returns
The maximum supported nestedness, or 1 if the alphabet cannot support pseudoknots.

The value is the maximum allowed depth of pseudoknots. A value of 1 denotes no pseudoknots ((....)), while higher values denote the maximum allowed complexity of crossing interactions, e.g. depth 2 (({....))} or depth 3 ({[....)}].

This is a function object. Invoke it with the parameter(s) specified above.

It acts as a wrapper and looks for three possible implementations (in this order):

  1. A free function max_pseudoknot_depth(your_type const) in the namespace of your type (or as friend). The function must be marked constexpr and noexcept and the return type must be convertible to size_t. The value of the argument to the function shall be ignored, it is only used to select the function via argument-dependent lookup.
  2. A free function max_pseudoknot_depth(your_type const) in namespace seqan3::custom. The same restrictions apply as above.
  3. A static constexpr data member of a type implicitly convertible to size_t called max_pseudoknot_depth.

Every RNA structure alphabet type must provide one of the above.

Example

These are the expressions to retrieve the value:

uint8_t max_depth = wuss51::max_pseudoknot_depth; // 22
max_depth = seqan3::max_pseudoknot_depth<wuss51>; // 22

Customisation point

This is a customisation point (see Customisation). To specify the behaviour for your own alphabet type, simply provide one of the three functions specified above.

◆ pseudoknot_id

constexpr auto seqan3::pseudoknot_id = detail::adl::only::pseudoknot_id_fn{}
inline

Retrieve an id for the level of a pseudoknotted interaction (also known as 'page number').

Template Parameters
your_typeType of the argument.
Parameters
chrThe RNA structure character whose property is checked.
Returns
An std::optional containing the pseudoknot identifier if alph represents an interaction. The returned value is std::nullopt for unpaired sites. For non-nested interactions the identifier is always 0. It is guaranteed to be smaller than seqan3::max_pseudoknot_depth.

This is a function object. Invoke it with the parameter(s) specified above.

It acts as a wrapper and looks for three possible implementations (in this order):

  1. A free function pseudoknot_id(your_type const a) in the namespace of your type (or as friend). The function must be marked noexcept (constexpr is not required, but recommended) and the return type must be convertible to size_t.
  2. A free function pseudoknot_id(your_type const a) in namespace seqan3::custom. The same restrictions apply as above.
  3. A member function called pseudoknot_id(). It must be marked noexcept (constexpr is not required, but recommended) and the return type must be convertible to size_t.

Every RNA structure alphabet type must provide one of the above.

Example

auto pk_opt = '.'_wuss51.pseudoknot_id(); // std::optional -> false
pk_opt = seqan3::pseudoknot_id('{'_wuss51); // std::optional -> true: 3
if (pk_opt)
debug_stream << *pk_opt; // 3

Customisation point

This is a customisation point (see Customisation). To specify the behaviour for your own alphabet type, simply provide one of the three functions specified above.