SeqAn3  3.0.0
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 detail::min_viable_uint_t< size > constexpr 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< 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
constexpr dssp9 operator""_dssp9 (char const ch) noexcept
 The seqan3::dssp9 char literal. More...
 
Requirements for std::StrictTotallyOrdered

You can expect these functions on all types that implement std::StrictTotallyOrdered.

bool operator< (type const &lhs, type const &rhs)
 Less-than, greater-than and -or-equal comparisons. More...
 
bool operator<= (type const &lhs, type const &rhs)
 Less-than, greater-than and -or-equal comparisons. More...
 
bool operator> (type const &lhs, type const &rhs)
 Less-than, greater-than and -or-equal comparisons. More...
 
bool operator>= (type const &lhs, type const &rhs)
 Less-than, greater-than and -or-equal comparisons. More...
 
Requirements for std::EqualityComparable

You can expect these functions on all types that implement std::Equality_comparable.

bool operator== (type const &lhs, type const &rhs)
 (In-)Equality comparison. More...
 
bool operator!= (type const &lhs, type const &rhs)
 (In-)Equality comparison. More...
 
Requirements for std::Swappable

You can expect these functions on all types that implement std::Swappable.

void swap (t &lhs, t &rhs)
 Swaps the contents of two objects. 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.

// create vector
std::vector<dssp9> vec{'E'_dssp9, 'H'_dssp9, 'H'_dssp9, 'H'_dssp9, 'T'_dssp9, 'G'_dssp9};
// modify and print
vec[1] = 'C'_dssp9;
for (dssp9 chr : vec)
debug_stream << to_char(chr); // ECHHTG
debug_stream << "\n";

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)
inlinenoexceptinherited

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.

◆ assign_rank()

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

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.

◆ to_char()

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

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.

◆ to_rank()

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

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.

Friends And Related Function Documentation

◆ operator""_dssp9()

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:

dssp9 my_letter{'I'_dssp9};
// does not work:
// dssp9 my_letter{'I'}; // <- char not implicitly convertible
my_letter.assign_char('G'); // <- assigns the char explicitly

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