SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
seqan3::is_aminoacid< type > Struct Template Reference

Identifies amino acid alphabets. More...

#include <seqan3/alphabet/aminoacid/concept.hpp>

+ Inheritance diagram for seqan3::is_aminoacid< type >:

Related Functions

(Note that these are not member functions.)

template<typename type >
constexpr bool is_aminoacid_v = is_aminoacid<type>::value
 Helper variable that delegates to seqan3::is_aminoacid<type>::value (UnaryTypeTrait shortcut).
 

Detailed Description

template<typename type>
struct seqan3::is_aminoacid< type >

Identifies amino acid alphabets.

Since an amino acid alphabet has no specific characteristics (like the complement function for nucleotide alphabets), we distinguish an amino acid alphabet by the seqan3::is_aminoacid unary type trait.

Customisation point

If you define your own alphabet and want it to be recognised as an amino acid alphabet by SeqAn, you need to specialise this type trait for your type and have it inherit std::true_type.

namespace your_namespace // optional
{
// your own aminoacid definition
struct your_aa
{
//...
};
} // namespace your_namespace end
// You can copy and paste this code and adjust `your_namespace::your_aa`
// if you want your amino acid to be recognized as such by seqan3.
namespace seqan3
{
template <>
struct is_aminoacid<your_namespace::your_aa> : std::true_type {};
} // namespace seqan3 end

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