SeqAn3 3.4.0-rc.4
The Modern C++ library for sequence analysis.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
structured_aa.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
16
17namespace seqan3
18{
19
46template <writable_alphabet sequence_alphabet_t = aa27, writable_alphabet structure_alphabet_t = dssp9>
47 requires (!std::is_reference_v<sequence_alphabet_t>) && (!std::is_reference_v<structure_alphabet_t>)
49 public alphabet_tuple_base<structured_aa<sequence_alphabet_t, structure_alphabet_t>,
50 sequence_alphabet_t,
51 structure_alphabet_t>
52{
53private:
58
59public:
70
76
86
87 using base_type::base_type; // Inherit non-default constructors
88
89#if SEQAN3_DOXYGEN_ONLY(1) 0
96 template <typename component_type>
98 {}
99
106 template <typename indirect_component_type>
109
116 template <typename component_type>
118 {}
119
126 template <typename indirect_component_type>
129#endif
130
135 using base_type::operator=;
137
145 constexpr structured_aa & assign_char(char_type const c) noexcept
146 {
148 return *this;
149 }
151
160 {
161 return seqan3::to_char(get<0>(*this));
162 }
164
169 static constexpr bool char_is_valid(char_type const c) noexcept
170 {
172 }
173};
174
177template <typename sequence_alphabet_type, typename structure_alphabet_type>
180
181} // namespace seqan3
Provides seqan3::aa27, container aliases and string literals.
Core alphabet concept and free function/type trait wrappers.
Provides seqan3::alphabet_tuple_base.
The CRTP base for a combined alphabet that contains multiple values of different alphabets at the sam...
Definition alphabet_tuple_base.hpp:113
A "pretty printer" for most SeqAn data structures and related types.
Definition debug_stream_type.hpp:79
A seqan3::alphabet_tuple_base that joins an aminoacid alphabet with a protein structure alphabet.
Definition structured_aa.hpp:52
constexpr structured_aa(component_type const alph)
Construction via a value of one of the components.
Definition structured_aa.hpp:97
constexpr char_type to_char() const noexcept
Return a character. This reads the internal sequence letter.
Definition structured_aa.hpp:159
constexpr structured_aa & operator=(component_type const alph)
Assignment via a value of one of the components.
Definition structured_aa.hpp:117
static constexpr bool char_is_valid(char_type const c) noexcept
Validate whether a character is valid in the sequence alphabet.
Definition structured_aa.hpp:169
constexpr structured_aa() noexcept=default
Defaulted.
alphabet_char_t< sequence_alphabet_type > char_type
Equals the char_type of sequence_alphabet_type.
Definition structured_aa.hpp:75
constexpr structured_aa & operator=(indirect_component_type const alph)
Assignment via a value of a subtype that is assignable to one of the components.
Definition structured_aa.hpp:127
constexpr structured_aa(indirect_component_type const alph)
Construction via a value of a subtype that is assignable to one of the components.
Definition structured_aa.hpp:107
constexpr structured_aa & assign_char(char_type const c) noexcept
Assign from a nucleotide character. This modifies the internal sequence letter.
Definition structured_aa.hpp:145
structured_aa(sequence_alphabet_type &&, structure_alphabet_type &&) -> structured_aa< std::decay_t< sequence_alphabet_type >, std::decay_t< structure_alphabet_type > >
Type deduction guide enables usage of structured_aa without specifying template args.
Provides the dssp format for protein structure.
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition alphabet/concept.hpp:517
constexpr auto to_char
Return the char representation of an alphabet object.
Definition alphabet/concept.hpp:381
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Hide me