SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
seqan3::dssp9 Class Reference

The protein structure alphabet of the characters "HGIEBTSCX". More...

#include <seqan3/alphabet/structure/dssp9.hpp>

+ Inheritance diagram for seqan3::dssp9:

Public Member Functions

Constructors, destructor and assignment
constexpr dssp9 () noexcept=default
 Defaulted.
 
constexpr dssp9 (dssp9 const &) noexcept=default
 Defaulted.
 
constexpr dssp9 (dssp9 &&) noexcept=default
 Defaulted.
 
constexpr dssp9operator= (dssp9 const &) noexcept=default
 Defaulted.
 
constexpr dssp9operator= (dssp9 &&) noexcept=default
 Defaulted.
 
 ~dssp9 () 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 dssp9assign_char (char_type const c) noexcept
 Assign from a character, implicitly converts invalid characters. More...
 
constexpr dssp9assign_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. More...
 

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. More...
 
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()). More...
 

Related Functions

(Note that these are not member functions.)

Literals
std::vector< dssp9operator""_dssp9 (const char *str, std::size_t len)
 The seqan3::dssp9 string literal. More...
 
constexpr dssp9 operator""_dssp9 (char const ch) noexcept
 The seqan3::dssp9 char literal. More...
 

Detailed Description

The protein structure alphabet of the characters "HGIEBTSCX".

The DSSP annotation links structure elements to protein sequences. Originally created with 7 letters as a file format for the DSSP program (http://www.cmbi.ru.nl/dssp.html), it is also used in the stockholm file format for structure alignments, extended by the characters C and X (https://en.wikipedia.org/wiki/Stockholm_format).

The letter abbreviations are as follows:

H = alpha helix B = beta bridge E = strand G = helix-3 I = helix-5 T = turn S = bend C = coil/loop X = unknown

Usage

The following code example creates a dssp9 vector, modifies it, and prints the result to stderr.

#include <vector>
int main()
{
using seqan3::operator""_dssp9;
// create vector
std::vector<seqan3::dssp9> vec{'E'_dssp9, 'H'_dssp9, 'H'_dssp9, 'H'_dssp9, 'T'_dssp9, 'G'_dssp9};
// modify and print
vec[1] = 'C'_dssp9;
for (seqan3::dssp9 chr : vec)
}
The protein structure alphabet of the characters "HGIEBTSCX".
Definition: dssp9.hpp:61
Provides seqan3::debug_stream and related types.
Provides the dssp format for protein structure.
constexpr auto to_char
Return the char representation of an alphabet object.
Definition: concept.hpp:328
debug_stream_type debug_stream
A global instance of seqan3::debug_stream_type.
Definition: debug_stream.hpp:42

Member Typedef Documentation

◆ char_type

using seqan3::alphabet_base< dssp9 , size, char >::char_type = std::conditional_t<std::same_as<char , void>, char, char >
protectedinherited

The char representation; conditional needed to make semi alphabet definitions legal.

We need a return type for seqan3::alphabet_base::to_char and seqan3::alphabet_base::assign_char other than void to make these in-class definitions valid when char_t is void.

This entity is stable. Since version 3.1.

◆ rank_type

using seqan3::alphabet_base< dssp9 , size, char >::rank_type = detail::min_viable_uint_t<size - 1>
protectedinherited

The type of the alphabet when represented as a number (e.g. via to_rank()).

This entity is stable. Since version 3.1.

Constructor & Destructor Documentation

◆ ~dssp9()

seqan3::dssp9::~dssp9 ( )
defaultnoexcept

Defaulted.

Member Function Documentation

◆ assign_char()

constexpr dssp9 & seqan3::alphabet_base< dssp9 , size, char >::assign_char ( char_type const  c)
inlineconstexprnoexceptinherited

Assign from a character, implicitly converts invalid characters.

Parameters
cThe character to be assigned.

Provides an implementation for seqan3::assign_char_to, required to model seqan3::alphabet.

Complexity

Constant.

Exceptions

Guaranteed not to throw.

This entity is stable. Since version 3.1.

◆ assign_rank()

constexpr dssp9 & seqan3::alphabet_base< dssp9 , size, char >::assign_rank ( rank_type const  c)
inlineconstexprnoexceptinherited

Assign from a numeric value.

Parameters
cThe rank to be assigned.

Provides an implementation for seqan3::assign_rank_to, required to model seqan3::semialphabet.

Complexity

Constant.

Exceptions

Guaranteed not to throw.

This entity is stable. Since version 3.1.

◆ to_char()

constexpr char_type seqan3::alphabet_base< dssp9 , size, char >::to_char ( ) const
inlineconstexprnoexceptinherited

Return the letter as a character of char_type.

Provides an implementation for seqan3::to_char, required to model seqan3::alphabet.

Complexity

Constant.

Exceptions

Guaranteed not to throw.

This entity is stable. Since version 3.1.

◆ to_rank()

constexpr rank_type seqan3::alphabet_base< dssp9 , size, char >::to_rank ( ) const
inlineconstexprnoexceptinherited

Return the letter's numeric value (rank in the alphabet).

Provides an implementation for seqan3::to_rank, required to model seqan3::semialphabet.

Complexity

Constant.

Exceptions

Guaranteed not to throw.

This entity is stable. Since version 3.1.

Friends And Related Function Documentation

◆ operator""_dssp9() [1/2]

constexpr dssp9 operator""_dssp9 ( char const  ch)
related

The seqan3::dssp9 char literal.

Parameters
[in]chThe character to represent as dssp.
Returns
seqan3::dssp9

You can use this string literal to assign a seqan3::dssp9 character:

int main()
{
using seqan3::operator""_dssp9;
// Using the char literal to assign a single DSSP annotation:
seqan3::dssp9 my_letter{'I'_dssp9};
my_letter.assign_char('G'); // <- assigns the char explicitly
}
constexpr derived_type & assign_char(char_type const c) noexcept
Assign from a character, implicitly converts invalid characters.
Definition: alphabet_base.hpp:158

◆ operator""_dssp9() [2/2]

std::vector< dssp9 > operator""_dssp9 ( const char *  str,
std::size_t  len 
)
related

The seqan3::dssp9 string literal.

Parameters
[in]strA pointer to the character string to assign.
[in]lenThe size of the character string to assign.
Returns
std::vector<seqan3::dssp9>

You can use this string literal to easily assign to a vector of seqan3::dssp9 characters:

#include <vector>
int main()
{
using seqan3::operator""_dssp9;
// Using the string literal to assign a vector of DSSP annotations:
std::vector<seqan3::dssp9> foo{"EHHHHT"_dssp9};
std::vector<seqan3::dssp9> bar = "EHHHHT"_dssp9;
auto bax = "EHHHHT"_dssp9;
}

Member Data Documentation

◆ alphabet_size

constexpr detail::min_viable_uint_t<size> seqan3::alphabet_base< dssp9 , size, char >::alphabet_size
staticconstexprinherited

The size of the alphabet, i.e. the number of different values it can take.

This entity is stable. Since version 3.1.


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