SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
aminoacid_scoring_scheme.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
11#pragma once
12
13#include <algorithm>
14
17
18namespace seqan3
19{
20
33{
34 //ATTENTION: when you change this, also update set_similarity_matrix() below
55};
56
70template <arithmetic score_type = int8_t>
71class aminoacid_scoring_scheme : public scoring_scheme_base<aminoacid_scoring_scheme<score_type>, aa27, score_type>
72{
73private:
76
78 using base_t::matrix;
79
81 friend base_t;
82
83public:
86 using typename base_t::matrix_type;
88
93 constexpr aminoacid_scoring_scheme() noexcept = default;
95 template <arithmetic score_arg_t>
96 constexpr aminoacid_scoring_scheme(match_score<score_arg_t> const ms, mismatch_score<score_arg_t> const mms) :
97 base_t{ms, mms}
98 {}
100 constexpr aminoacid_scoring_scheme(matrix_type const & matrix) noexcept : base_t{matrix}
101 {}
102
106 {
107 set_similarity_matrix(matrix_id);
108 }
110
119 {
120 switch (matrix_id)
121 {
123 std::ranges::copy(blosum30, begin(matrix));
124 break;
126 std::ranges::copy(blosum45, begin(matrix));
127 break;
129 std::ranges::copy(blosum62, begin(matrix));
130 break;
132 std::ranges::copy(blosum80, begin(matrix));
133 break;
134 default:
135 throw std::invalid_argument{"ERROR in set_similarity_matrix(), matrix_id has no matrix."};
136 }
137 }
139
140private:
142 static constexpr matrix_type blosum30{{
144 //A B C D E F G H I J K L M N O P Q R S T U V W X, Y Z *
145 {4, 0, -3, 0, 0, -2, 0, -2, 0, -1, 0, -1, 1, 0, 0, -1, 1, -1, 1, 1, 0, 1, -5, 0, -4, 0, -7}, //A
146 {0, 5, -2, 5, 0, -3, 0, -2, -2, -2, 0, -1, -2, 4, -1, -2, -1, -2, 0, 0, -1, -2, -5, -1, -3, 0, -7}, //B
147 {-3, -2, 17, -3, 1, -3, -4, -5, -2, -1, -3, 0, -2, -1, -2, -3, -2, -2, -2, -2, -2, -2, -2, -2, -6, 0, -7}, //C
148 {0, 5, -3, 9, 1, -5, -1, -2, -4, -3, 0, -1, -3, 1, -1, -1, -1, -1, 0, -1, -1, -2, -4, -1, -1, 0, -7}, //D
149 {0, 0, 1, 1, 6, -4, -2, 0, -3, -2, 2, -1, -1, -1, -1, 1, 2, -1, 0, -2, -1, -3, -1, -1, -2, 5, -7}, //E
150 {-2, -3, -3, -5, -4, 10, -3, -3, 0, 1, -1, 2, -2, -1, -1, -4, -3, -1, -1, -2, -1, 1, 1, -1, 3, -4, -7}, //F
151 {0, 0, -4, -1, -2, -3, 8, -3, -1, -2, -1, -2, -2, 0, -1, -1, -2, -2, 0, -2, -1, -3, 1, -1, -3, -2, -7}, //G
152 {-2, -2, -5, -2, 0, -3, -3, 14, -2, -2, -2, -1, 2, -1, -1, 1, 0, -1, -1, -2, -1, -3, -5, -1, 0, 0, -7}, //H
153 {0, -2, -2, -4, -3, 0, -1, -2, 6, 4, -2, 2, 1, 0, 0, -3, -2, -3, -1, 0, 0, 4, -3, 0, -1, -3, -7}, //I
154 {-1, -2, -1, -3, -2, 1, -2, -2, 4, 4, -2, 3, 2, -1, 0, -3, -2, -3, -2, 0, 0, 3, -3, 0, 1, -2, -7}, //J
155 {0, 0, -3, 0, 2, -1, -1, -2, -2, -2, 4, -2, 2, 0, 0, 1, 0, 1, 0, -1, 0, -2, -2, 0, -1, 1, -7}, //K
156 {-1, -1, 0, -1, -1, 2, -2, -1, 2, 3, -2, 4, 2, -2, 0, -3, -2, -2, -2, 0, 0, 1, -2, 0, 3, -1, -7}, //L
157 {1, -2, -2, -3, -1, -2, -2, 2, 1, 2, 2, 2, 6, 0, 0, -4, -1, 0, -2, 0, 0, 0, -3, 0, -1, -1, -7}, //M
158 {0, 4, -1, 1, -1, -1, 0, -1, 0, -1, 0, -2, 0, 8, 0, -3, -1, -2, 0, 1, 0, -2, -7, 0, -4, -1, -7}, //N
159 {0, -1, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, 0, -2, -1, -1, 0, -7}, //O
160 {-1, -2, -3, -1, 1, -4, -1, 1, -3, -3, 1, -3, -4, -3, -1, 11, 0, -1, -1, 0, -1, -4, -3, -1, -2, 0, -7}, //P
161 {1, -1, -2, -1, 2, -3, -2, 0, -2, -2, 0, -2, -1, -1, 0, 0, 8, 3, -1, 0, 0, -3, -1, 0, -1, 4, -7}, //Q
162 {-1, -2, -2, -1, -1, -1, -2, -1, -3, -3, 1, -2, 0, -2, -1, -1, 3, 8, -1, -3, -1, -1, 0, -1, 0, 0, -7}, //R
163 {1, 0, -2, 0, 0, -1, 0, -1, -1, -2, 0, -2, -2, 0, 0, -1, -1, -1, 4, 2, 0, -1, -3, 0, -2, -1, -7}, //S
164 {1, 0, -2, -1, -2, -2, -2, -2, 0, 0, -1, 0, 0, 1, 0, 0, 0, -3, 2, 5, 0, 1, -5, 0, -1, -1, -7}, //T
165 {0, -1, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, 0, -2, -1, -1, 0, -7}, //U
166 {1, -2, -2, -2, -3, 1, -3, -3, 4, 3, -2, 1, 0, -2, 0, -4, -3, -1, -1, 1, 0, 5, -3, 0, 1, -3, -7}, //V
167 {-5, -5, -2, -4, -1, 1, 1, -5, -3, -3, -2, -2, -3, -7, -2, -3, -1, 0, -3, -5, -2, -3, 20, -2, 5, -1, -7}, //W
168 {0, -1, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, -1, -1, 0, -1, 0, 0, -1, 0, -2, -1, -1, 0, -7}, //X
169 {-4, -3, -6, -1, -2, 3, -3, 0, -1, 1, -1, 3, -1, -4, -1, -2, -1, 0, -2, -1, -1, 1, 5, -1, 9, -2, -7}, //Y
170 {0, 0, 0, 0, 5, -4, -2, 0, -3, -2, 1, -1, -1, -1, 0, 0, 4, 0, -1, -1, 0, -3, -1, 0, -2, 4, -7}, //Z
171 {-7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, 1} //*
173 }};
174
176 static constexpr matrix_type blosum45{{
178 //A B C D E F G H I J K L M N O P Q R S T U V W X, Y Z *
179 {5, -1, -1, -2, -1, -2, 0, -2, -1, -1, -1, -1, -1, -1, 0, -1, -1, -2, 1, 0, 0, 0, -2, 0, -2, -1, -5}, //A
180 {-1, 4, -2, 5, 1, -3, -1, 0, -3, -3, 0, -3, -2, 4, -1, -2, 0, -1, 0, 0, -1, -3, -4, -1, -2, 2, -5}, //B
181 {-1, -2, 12, -3, -3, -2, -3, -3, -3, -3, -3, -2, -2, -2,
182 -2, -4, -3, -3, -1, -1, -2, -1, -5, -2, -3, -3, -5}, //C
183 {-2, 5, -3, 7, 2, -4, -1, 0, -4, -4, 0, -3, -3, 2, -1, -1, 0, -1, 0, -1, -1, -3, -4, -1, -2, 1, -5}, //D
184 {-1, 1, -3, 2, 6, -3, -2, 0, -3, -3, 1, -2, -2, 0, -1, 0, 2, 0, 0, -1, -1, -3, -3, -1, -2, 4, -5}, //E
185 {-2, -3, -2, -4, -3, 8, -3, -2, 0, 1, -3, 1, 0, -2, -1, -3, -4, -2, -2, -1, -1, 0, 1, -1, 3, -3, -5}, //F
186 {0, -1, -3, -1, -2, -3, 7, -2, -4, -4, -2, -3, -2, 0, -1, -2, -2, -2, 0, -2, -1, -3, -2, -1, -3, -2, -5}, //G
187 {-2, 0, -3, 0, 0, -2, -2, 10, -3, -3, -1, -2, 0, 1, -1, -2, 1, 0, -1, -2, -1, -3, -3, -1, 2, 0, -5}, //H
188 {-1, -3, -3, -4, -3, 0, -4, -3, 5, 4, -3, 2, 2, -2, -1, -2, -2, -3, -2, -1, -1, 3, -2, -1, 0, -3, -5}, //I
189 {-1, -3, -3, -4, -3, 1, -4, -3, 4, 4, -3, 4, 2, -3, -1, -3, -2, -3, -3, -1, -1, 2, -2, -1, 0, -3, -5}, //J
190 {-1, 0, -3, 0, 1, -3, -2, -1, -3, -3, 5, -3, -1, 0, -1, -1, 1, 3, -1, -1, -1, -2, -2, -1, -1, 1, -5}, //K
191 {-1, -3, -2, -3, -2, 1, -3, -2, 2, 4, -3, 5, 2, -3, -1, -3, -2, -2, -3, -1, -1, 1, -2, -1, 0, -2, -5}, //L
192 {-1, -2, -2, -3, -2, 0, -2, 0, 2, 2, -1, 2, 6, -2, -1, -2, 0, -1, -2, -1, -1, 1, -2, -1, 0, -1, -5}, //M
193 {-1, 4, -2, 2, 0, -2, 0, 1, -2, -3, 0, -3, -2, 6, -1, -2, 0, 0, 1, 0, -1, -3, -4, -1, -2, 0, -5}, //N
194 {0, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -2, -1, -1, -1, -5}, //O
195 {-1, -2, -4, -1, 0, -3, -2, -2, -2, -3, -1, -3, -2, -2, -1, 9, -1, -2, -1, -1, -1, -3, -3, -1, -3, -1, -5}, //P
196 {-1, 0, -3, 0, 2, -4, -2, 1, -2, -2, 1, -2, 0, 0, -1, -1, 6, 1, 0, -1, -1, -3, -2, -1, -1, 4, -5}, //Q
197 {-2, -1, -3, -1, 0, -2, -2, 0, -3, -3, 3, -2, -1, 0, -1, -2, 1, 7, -1, -1, -1, -2, -2, -1, -1, 0, -5}, //R
198 {1, 0, -1, 0, 0, -2, 0, -1, -2, -3, -1, -3, -2, 1, 0, -1, 0, -1, 4, 2, 0, -1, -4, 0, -2, 0, -5}, //S
199 {0, 0, -1, -1, -1, -1, -2, -2, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, 2, 5, 0, 0, -3, 0, -1, -1, -5}, //T
200 {0, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -2, -1, -1, -1, -5}, //U
201 {0, -3, -1, -3, -3, 0, -3, -3, 3, 2, -2, 1, 1, -3, -1, -3, -3, -2, -1, 0, -1, 5, -3, -1, -1, -3, -5}, //V
202 {-2, -4, -5, -4, -3, 1, -2, -3, -2, -2, -2, -2, -2, -4, -2, -3, -2, -2, -4, -3, -2, -3, 15, -2, 3, -2, -5}, //W
203 {0, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -2, -1, -1, -1, -5}, //X
204 {-2, -2, -3, -2, -2, 3, -3, 2, 0, 0, -1, 0, 0, -2, -1, -3, -1, -1, -2, -1, -1, -1, 3, -1, 8, -2, -5}, //Y
205 {-1, 2, -3, 1, 4, -3, -2, 0, -3, -3, 1, -2, -1, 0, -1, -1, 4, 0, 0, -1, -1, -3, -2, -1, -2, 4, -5}, //Z
206 {-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, 1} //*
208 }};
209
211 static constexpr matrix_type blosum62{{
213 //A B C D E F G H I J K L M N O P Q R S T U V W X Y Z *
214 {4, -2, 0, -2, -1, -2, 0, -2, -1, -1, -1, -1, -1, -2, 0, -1, -1, -1, 1, 0, 0, 0, -3, 0, -2, -1, -4}, //A
215 {-2, 4, -3, 4, 1, -3, -1, 0, -3, -4, 0, -4, -3, 3, -1, -2, 0, -1, 0, -1, -1, -3, -4, -1, -3, 1, -4}, //B
216 {0, -3, 9, -3, -4, -2, -3, -3, -1, -1, -3, -1, -1, -3, -2, -3, -3, -3, -1, -1, -2, -1, -2, -2, -2, -3, -4}, //C
217 {-2, 4, -3, 6, 2, -3, -1, -1, -3, -4, -1, -4, -3, 1, -1, -1, 0, -2, 0, -1, -1, -3, -4, -1, -3, 1, -4}, //D
218 {-1, 1, -4, 2, 5, -3, -2, 0, -3, -3, 1, -3, -2, 0, -1, -1, 2, 0, 0, -1, -1, -2, -3, -1, -2, 4, -4}, //E
219 {-2, -3, -2, -3, -3, 6, -3, -1, 0, 0, -3, 0, 0, -3, -1, -4, -3, -3, -2, -2, -1, -1, 1, -1, 3, -3, -4}, //F
220 {0, -1, -3, -1, -2, -3, 6, -2, -4, -4, -2, -4, -3, 0, -1, -2, -2, -2, 0, -2, -1, -3, -2, -1, -3, -2, -4}, //G
221 {-2, 0, -3, -1, 0, -1, -2, 8, -3, -3, -1, -3, -2, 1, -1, -2, 0, 0, -1, -2, -1, -3, -2, -1, 2, 0, -4}, //H
222 {-1, -3, -1, -3, -3, 0, -4, -3, 4, 3, -3, 2, 1, -3, -1, -3, -3, -3, -2, -1, -1, 3, -3, -1, -1, -3, -4}, //I
223 {-1, -4, -1, -4, -3, 0, -4, -3, 3, 3, -3, 3, 2, -3, -1, -3, -3, -3, -2, -1, -1, 2, -3, -1, -1, -3, -4}, //J
224 {-1, 0, -3, -1, 1, -3, -2, -1, -3, -3, 5, -2, -1, 0, -1, -1, 1, 2, 0, -1, -1, -2, -3, -1, -2, 1, -4}, //K
225 {-1, -4, -1, -4, -3, 0, -4, -3, 2, 3, -2, 4, 2, -3, -1, -3, -2, -2, -2, -1, -1, 1, -2, -1, -1, -3, -4}, //L
226 {-1, -3, -1, -3, -2, 0, -3, -2, 1, 2, -1, 2, 5, -2, -1, -2, 0, -1, -1, -1, -1, 1, -1, -1, -1, -1, -4}, //M
227 {-2, 3, -3, 1, 0, -3, 0, 1, -3, -3, 0, -3, -2, 6, -1, -2, 0, 0, 1, 0, -1, -3, -4, -1, -2, 0, -4}, //N
228 {0, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, 0, 0, -1, -1, -2, -1, -1, -1, -4}, //O
229 {-1, -2, -3, -1, -1, -4, -2, -2, -3, -3, -1, -3, -2, -2, -2, 7, -1, -2, -1, -1, -2, -2, -4, -2, -3, -1, -4}, //P
230 {-1, 0, -3, 0, 2, -3, -2, 0, -3, -3, 1, -2, 0, 0, -1, -1, 5, 1, 0, -1, -1, -2, -2, -1, -1, 3, -4}, //Q
231 {-1, -1, -3, -2, 0, -3, -2, 0, -3, -3, 2, -2, -1, 0, -1, -2, 1, 5, -1, -1, -1, -3, -3, -1, -2, 0, -4}, //R
232 {1, 0, -1, 0, 0, -2, 0, -1, -2, -2, 0, -2, -1, 1, 0, -1, 0, -1, 4, 1, 0, -2, -3, 0, -2, 0, -4}, //S
233 {0, -1, -1, -1, -1, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, 1, 5, 0, 0, -2, 0, -2, -1, -4}, //T
234 {0, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, 0, 0, -1, -1, -2, -1, -1, -1, -4}, //U
235 {0, -3, -1, -3, -2, -1, -3, -3, 3, 2, -2, 1, 1, -3, -1, -2, -2, -3, -2, 0, -1, 4, -3, -1, -1, -2, -4}, //V
236 {-3, -4, -2, -4, -3, 1, -2, -2, -3, -3, -3, -2, -1, -4, -2, -4, -2, -3, -3, -2, -2, -3, 11, -2, 2, -3, -4}, //W
237 {0, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, 0, 0, -1, -1, -2, -1, -1, -1, -4}, //X
238 {-2, -3, -2, -3, -2, 3, -3, 2, -1, -1, -2, -1, -1, -2, -1, -3, -1, -2, -2, -2, -1, -1, 2, -1, 7, -2, -4}, //Y
239 {-1, 1, -3, 1, 4, -3, -2, 0, -3, -3, 1, -3, -1, 0, -1, -1, 3, 0, 0, -1, -1, -2, -3, -1, -2, 4, -4}, //Z
240 {-4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 1} //*
242 }};
243
245 static constexpr matrix_type blosum80{{
247 //A B C D E F G H I J K L M N O P Q R S T U V W X, Y Z *
248 {7, -3, -1, -3, -2, -4, 0, -3, -3, -3, -1, -3, -2, -3, -1, -1, -2, -3, 2, 0, -1, -1, -5, -1, -4, -2, -8}, //A
249 {-3, 6, -6, 6, 1, -6, -2, -1, -6, -7, -1, -7, -5, 5, -3, -4, -1, -2, 0, -1, -3, -6, -8, -3, -5, 0, -8}, //B
250 {-1, -6, 13, -7, -7, -4, -6, -7, -2, -3, -6, -3, -3, -5,
251 -4, -6, -5, -6, -2, -2, -4, -2, -5, -4, -5, -7, -8}, //C
252 {-3, 6, -7, 10, 2, -6, -3, -2, -7, -7, -2, -7, -6, 2, -3, -3, -1, -3, -1, -2, -3, -6, -8, -3, -6, 1, -8}, //D
253 {-2, 1, -7, 2, 8, -6, -4, 0, -6, -6, 1, -6, -4, -1, -2, -2, 3, -1, -1, -2, -2, -4, -6, -2, -5, 6, -8}, //E
254 {-4, -6, -4, -6, -6, 10, -6, -2, -1, -1, -5, 0, 0, -6, -3, -6, -5, -5, -4, -4, -3, -2, 0, -3, 4, -6, -8}, //F
255 {0, -2, -6, -3, -4, -6, 9, -4, -7, -7, -3, -7, -5, -1, -3, -5, -4, -4, -1, -3, -3, -6, -6, -3, -6, -4, -8}, //G
256 {-3, -1, -7, -2, 0, -2, -4, 12, -6, -6, -1, -5, -4, 1, -2, -4, 1, 0, -2, -3, -2, -5, -4, -2, 3, 0, -8}, //H
257 {-3, -6, -2, -7, -6, -1, -7, -6, 7, 5, -5, 2, 2, -6, -2, -5, -5, -5, -4, -2, -2, 4, -5, -2, -3, -6, -8}, //I
258 {-3, -7, -3, -7, -6, -1, -7, -6, 5, 5, -5, 4, 3, -6, -2, -5, -5, -5, -4, -3, -2, 3, -5, -2, -3, -6, -8}, //J
259 {-1, -1, -6, -2, 1, -5, -3, -1, -5, -5, 8, -4, -3, 0, -2, -2, 2, 3, -1, -1, -2, -4, -6, -2, -4, 1, -8}, //K
260 {-3, -7, -3, -7, -6, 0, -7, -5, 2, 4, -4, 6, 3, -6, -2, -5, -4, -4, -4, -3, -2, 1, -4, -2, -2, -5, -8}, //L
261 {-2, -5, -3, -6, -4, 0, -5, -4, 2, 3, -3, 3, 9, -4, -2, -4, -1, -3, -3, -1, -2, 1, -3, -2, -3, -3, -8}, //M
262 {-3, 5, -5, 2, -1, -6, -1, 1, -6, -6, 0, -6, -4, 9, -2, -4, 0, -1, 1, 0, -2, -5, -7, -2, -4, -1, -8}, //N
263 {-1, -3, -4, -3, -2, -3, -3, -2, -2, -2, -2, -2, -2, -2,
264 -2, -3, -2, -2, -1, -1, -2, -2, -5, -2, -3, -1, -8}, //O
265 {-1, -4, -6, -3, -2, -6, -5, -4, -5, -5, -2, -5, -4, -4,
266 -3, 12, -3, -3, -2, -3, -3, -4, -7, -3, -6, -2, -8}, //P
267 {-2, -1, -5, -1, 3, -5, -4, 1, -5, -5, 2, -4, -1, 0, -2, -3, 9, 1, -1, -1, -2, -4, -4, -2, -3, 5, -8}, //Q
268 {-3, -2, -6, -3, -1, -5, -4, 0, -5, -5, 3, -4, -3, -1, -2, -3, 1, 9, -2, -2, -2, -4, -5, -2, -4, 0, -8}, //R
269 {2, 0, -2, -1, -1, -4, -1, -2, -4, -4, -1, -4, -3, 1, -1, -2, -1, -2, 7, 2, -1, -3, -6, -1, -3, -1, -8}, //S
270 {0, -1, -2, -2, -2, -4, -3, -3, -2, -3, -1, -3, -1, 0, -1, -3, -1, -2, 2, 8, -1, 0, -5, -1, -3, -2, -8}, //T
271 {-1, -3, -4, -3, -2, -3, -3, -2, -2, -2, -2, -2, -2, -2,
272 -2, -3, -2, -2, -1, -1, -2, -2, -5, -2, -3, -1, -8}, //U
273 {-1, -6, -2, -6, -4, -2, -6, -5, 4, 3, -4, 1, 1, -5, -2, -4, -4, -4, -3, 0, -2, 7, -5, -2, -3, -4, -8}, //V
274 {-5, -8, -5, -8, -6, 0, -6, -4, -5, -5, -6, -4, -3, -7, -5, -7, -4, -5, -6, -5, -5, -5, 16, -5, 3, -5, -8}, //W
275 {-1, -3, -4, -3, -2, -3, -3, -2, -2, -2, -2, -2, -2, -2,
276 -2, -3, -2, -2, -1, -1, -2, -2, -5, -2, -3, -1, -8}, //X
277 {-4, -5, -5, -6, -5, 4, -6, 3, -3, -3, -4, -2, -3, -4, -3, -6, -3, -4, -3, -3, -3, -3, 3, -3, 11, -4, -8}, //Y
278 {-2, 0, -7, 1, 6, -6, -4, 0, -6, -6, 1, -5, -3, -1, -1, -2, 5, 0, -1, -2, -1, -4, -5, -1, -4, 6, -8}, //Z
279 {-8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, 1} //*
281 }};
282
283 //TODO(h-2): add more matrixes
284};
285
292aminoacid_scoring_scheme()->aminoacid_scoring_scheme<int8_t>;
293
297template <arithmetic score_arg_type>
300
302template <arithmetic score_arg_type>
304
308aminoacid_scoring_scheme(aminoacid_similarity_matrix)->aminoacid_scoring_scheme<int8_t>;
310
311} // namespace seqan3
Provides seqan3::aa27, container aliases and string literals.
The twenty-seven letter amino acid alphabet.
Definition aa27.hpp:43
A data structure for managing and computing the score of two amino acids.
Definition aminoacid_scoring_scheme.hpp:72
constexpr void set_similarity_matrix(aminoacid_similarity_matrix const matrix_id)
Set the similarity matrix scheme (e.g. blosum62).
Definition aminoacid_scoring_scheme.hpp:118
constexpr aminoacid_scoring_scheme() noexcept=default
The default constructor (delegates to set_hamming_distance()).
aminoacid_scoring_scheme(aminoacid_similarity_matrix) -> aminoacid_scoring_scheme< int8_t >
Attention: This guide does not actually deduce from the underlying type, but always defaults to int8_...
aminoacid_scoring_scheme() -> aminoacid_scoring_scheme< int8_t >
Default constructed objects deduce to int8_t.
constexpr aminoacid_scoring_scheme(matrix_type const &matrix) noexcept
Constructor for a custom scheme (delegates to set_custom_matrix()).
Definition aminoacid_scoring_scheme.hpp:100
aminoacid_scoring_scheme(match_score< score_arg_type >, mismatch_score< score_arg_type >) -> aminoacid_scoring_scheme< int8_t >
Attention: This guide does not actually deduce from the underlying type, but always defaults to int8_...
aminoacid_scoring_scheme(std::array< std::array< score_arg_type, 27 >, 27 >) -> aminoacid_scoring_scheme< score_arg_type >
Deduce the score type from the provided matrix.
constexpr aminoacid_scoring_scheme(aminoacid_similarity_matrix const matrix_id)
Construct for seqan3::aminoacid_similarity_matrix.
Definition aminoacid_scoring_scheme.hpp:105
A CRTP base class for scoring schemes.
Definition scoring_scheme_base.hpp:97
std::array< std::array< score_type, matrix_size >, matrix_size > matrix_type
Type of the internal matrix (a two-dimensional array).
Definition scoring_scheme_base.hpp:117
score_t score_type
Type of the score values.
Definition scoring_scheme_base.hpp:103
T copy(T... args)
aminoacid_similarity_matrix
Identifiers for amino acid similarity matrixes.
Definition aminoacid_scoring_scheme.hpp:33
@ blosum80
The blosum80 matrix for closely related proteins.
@ blosum30
The blosum30 matrix for very distantly related proteins.
@ blosum45
The blosum45 matrix for distantly related proteins.
@ blosum62
The blosum62 matrix recommended for most use-cases.
A type that satisfies std::is_arithmetic_v<t>.
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Provides seqan3::scoring_scheme_base.
A strong type of underlying type score_type that represents the score of two matching characters.
Definition scoring_scheme_base.hpp:38
A strong type of underlying type score_type that represents the score two different characters.
Definition scoring_scheme_base.hpp:63
Hide me