-
Notifications
You must be signed in to change notification settings - Fork 0
/
aa20_8hpp_source.html
238 lines (236 loc) · 30.8 KB
/
aa20_8hpp_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BioC++: bio/alphabet/aminoacid/aa20.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="biocpp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="biocpp_logo.svg"/></td>
<td id="projectalign">
<div id="projectname">BioC++<span id="projectnumber"> core-0.7.0</span>
</div>
<div id="projectbrief">The Modern C++ libraries for Bioinformatics.</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function(){initNavTree('aa20_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">aa20.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="aa20_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// -----------------------------------------------------------------------------------------------------</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// Copyright (c) 2022 deCODE Genetics</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">// shipped with this file and also available at: https://github.com/biocpp/biocpp-core/blob/main/LICENSE.md</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// -----------------------------------------------------------------------------------------------------</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <<a class="codeRef" target="_blank" href="https://en.cppreference.com/w/cpp/header/vector.html">vector</a>></span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <<a class="code" href="aminoacid__base_8hpp.html">bio/alphabet/aminoacid/aminoacid_base.hpp</a>></span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <<a class="code" href="alphabet_2aminoacid_2concept_8hpp.html">bio/alphabet/aminoacid/concept.hpp</a>></span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <bio/alphabet/detail/to_lower.hpp></span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacebio_1_1alphabet.html">bio::alphabet</a></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>{</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html"> 62</a></span><span class="keyword">class </span><a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a> : <span class="keyword">public</span> <a class="code hl_class" href="classbio_1_1alphabet_1_1aminoacid__base.html">aminoacid_base</a><aa20, 20></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span>{</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">using </span><a class="code hl_class" href="classbio_1_1alphabet_1_1aminoacid__base.html">base_t</a> = <a class="code hl_class" href="classbio_1_1alphabet_1_1aminoacid__base.html">aminoacid_base<aa20, 20></a>;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">friend</span> <a class="code hl_class" href="classbio_1_1alphabet_1_1aminoacid__base.html">base_t</a>;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">friend</span> <a class="code hl_class" href="classbio_1_1alphabet_1_1base.html">base_t::base_t</a>;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#ab11db49a093e5e5ef75fa8c3f38434b1"> 78</a></span> <span class="keyword">constexpr</span> <a class="code hl_function" href="classbio_1_1alphabet_1_1aa20.html#ab11db49a093e5e5ef75fa8c3f38434b1">aa20</a>() noexcept = default; </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#a3c78d96827dec19d8162fdf2c7039ab1"> 79</a></span> constexpr <a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a>(<a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a> const &) noexcept = default; </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#a0b04d6e19ffe665fdc106af370bc09c7"> 80</a></span> constexpr <a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a>(<a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a> &&) noexcept = default; </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#a8770b75d01c670071792ff62520fc8dc"> 81</a></span> constexpr <a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a> & operator=(<a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a> const &) noexcept = default; </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#af99ab9b86a9af2f3dbb58bd572c82635"> 82</a></span> constexpr <a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a> & operator=(<a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a> &&) noexcept = default; </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#aef4d695fcf4a1d70f9a30adb82d18454"> 83</a></span> ~<a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a>() noexcept = default; </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> using <a class="code hl_class" href="classbio_1_1alphabet_1_1aminoacid__base.html">base_t</a>::<a class="code hl_class" href="classbio_1_1alphabet_1_1aminoacid__base.html">base_t</a>;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>protected:</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#a96afe9293da9dfc9cd558f2052d46dbf"> 90</a></span> static constexpr <a class="code hl_namespaceRef" target="_blank" href="https://en.cppreference.com/w/namespacestd.html">std</a>::array<<a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/conditional.html">char_type</a>, <a class="code hl_variable" href="classbio_1_1alphabet_1_1base.html#a834f007f409b2761dc774fc45e457b11">alphabet_size</a>> <a class="code hl_variable" href="classbio_1_1alphabet_1_1aa20.html#a96afe9293da9dfc9cd558f2052d46dbf">rank_to_char</a>{</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="charliteral">'A'</span>, <span class="charliteral">'C'</span>, <span class="charliteral">'D'</span>, <span class="charliteral">'E'</span>, <span class="charliteral">'F'</span>, <span class="charliteral">'G'</span>, <span class="charliteral">'H'</span>, <span class="charliteral">'I'</span>, <span class="charliteral">'K'</span>, <span class="charliteral">'L'</span>, <span class="charliteral">'M'</span>, <span class="charliteral">'N'</span>, <span class="charliteral">'P'</span>, <span class="charliteral">'Q'</span>, <span class="charliteral">'R'</span>, <span class="charliteral">'S'</span>, <span class="charliteral">'T'</span>, <span class="charliteral">'V'</span>, <span class="charliteral">'W'</span>, <span class="charliteral">'Y'</span>,</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> };</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#ae179b38c47f141992b9ef76ce45057b3"> 95</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/container/array.html">std::array<rank_type, 256></a> <a class="code hl_variable" href="classbio_1_1alphabet_1_1aa20.html#ae179b38c47f141992b9ef76ce45057b3">char_to_rank</a> = []() <span class="keyword">constexpr</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/container/array.html">std::array<rank_type, 256></a> ret{};</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="comment">// initialize with UNKNOWN</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> ret.<a class="code hl_functionRef" target="_blank" href="https://en.cppreference.com/w/cpp/container/array/fill.html">fill</a>(15); <span class="comment">// value of 'S', because that appears most frequently</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="comment">// reverse mapping for characters and their lowercase</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">for</span> (<a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/conditional.html">rank_type</a> rnk = 0u; rnk < <a class="code hl_variable" href="classbio_1_1alphabet_1_1base.html#a834f007f409b2761dc774fc45e457b11">alphabet_size</a>; ++rnk)</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> {</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> ret[<span class="keyword">static_cast<</span><a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/conditional.html">rank_type</a><span class="keyword">></span>(<a class="code hl_variable" href="classbio_1_1alphabet_1_1aa20.html#a96afe9293da9dfc9cd558f2052d46dbf">rank_to_char</a>[rnk])] = rnk;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> ret[<span class="keyword">static_cast<</span><a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/types/conditional.html">rank_type</a><span class="keyword">></span>(detail::to_lower(<a class="code hl_variable" href="classbio_1_1alphabet_1_1aa20.html#a96afe9293da9dfc9cd558f2052d46dbf">rank_to_char</a>[rnk]))] = rnk;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> ret[<span class="charliteral">'B'</span>] = ret[<span class="charliteral">'D'</span>];</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> ret[<span class="charliteral">'b'</span>] = ret[<span class="charliteral">'D'</span>]; <span class="comment">// Convert b (either D/N) to D, since D occurs more frequently.</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> ret[<span class="charliteral">'J'</span>] = ret[<span class="charliteral">'L'</span>];</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> ret[<span class="charliteral">'j'</span>] = ret[<span class="charliteral">'L'</span>]; <span class="comment">// Convert j (either I/L) to L, since L occurs more frequently.</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> ret[<span class="charliteral">'O'</span>] = ret[<span class="charliteral">'L'</span>];</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> ret[<span class="charliteral">'o'</span>] = ret[<span class="charliteral">'L'</span>]; <span class="comment">// Convert Pyrrolysine to lysine.</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> ret[<span class="charliteral">'U'</span>] = ret[<span class="charliteral">'C'</span>];</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> ret[<span class="charliteral">'u'</span>] = ret[<span class="charliteral">'C'</span>]; <span class="comment">// Convert Selenocysteine to cysteine.</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> ret[<span class="charliteral">'X'</span>] = ret[<span class="charliteral">'S'</span>];</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> ret[<span class="charliteral">'x'</span>] = ret[<span class="charliteral">'S'</span>]; <span class="comment">// Convert unknown amino acids to serine.</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> ret[<span class="charliteral">'Z'</span>] = ret[<span class="charliteral">'E'</span>];</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> ret[<span class="charliteral">'z'</span>] = ret[<span class="charliteral">'E'</span>]; <span class="comment">// Convert z (either E/Q) to E, since E occurs more frequently.</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> ret[<span class="charliteral">'*'</span>] = ret[<span class="charliteral">'W'</span>]; <span class="comment">// The most common stop codon is UGA. This is most similar to a Tryptophan.</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">return</span> ret;</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> }();</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span>};</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span>} <span class="comment">// namespace bio::alphabet</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span><span class="comment">// ------------------------------------------------------------------</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="comment">// literals</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="comment">// ------------------------------------------------------------------</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacebio_1_1alphabet.html">bio::alphabet</a></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span>{</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="keyword">inline</span> <span class="keyword">namespace </span>literals</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span>{</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#a1bebb47495edb58554a94323342c0af4"> 146</a></span><span class="keyword">consteval</span> <a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a> <span class="keyword">operator</span><span class="stringliteral">""</span>_aa20(<span class="keywordtype">char</span> <span class="keyword">const</span> c)</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span>{</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">if</span> (!char_is_valid_for<aa20>(c))</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">throw</span> <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>{<span class="stringliteral">"Illegal character in character literal."</span>};</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">return</span> <a class="code hl_class" href="classbio_1_1alphabet_1_1aa20.html">aa20</a>{}.<a class="code hl_function" href="classbio_1_1alphabet_1_1base.html#a9dfef1259c4c0112e490255343de0d2f">assign_char</a>(c);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span>}</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="keyword">template</span> <meta::detail::literal_buffer_<span class="keywordtype">string</span> str></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"><a class="line" href="classbio_1_1alphabet_1_1aa20.html#ae7dab3bdba9238fb8d7f718a1ed90922"> 164</a></span><span class="keyword">constexpr</span> <a class="code hl_classRef" target="_blank" href="https://en.cppreference.com/w/cpp/container/vector.html">std::vector<aa20></a> <span class="keyword">operator</span><span class="stringliteral">""</span>_aa20()</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span>{</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordflow">return</span> detail::string_literal<str, aa20>();</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span>}</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span>} <span class="comment">// namespace literals</span></div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span>} <span class="comment">// namespace bio::alphabet</span></div>
<div class="ttc" id="aalphabet_2aminoacid_2concept_8hpp_html"><div class="ttname"><a href="alphabet_2aminoacid_2concept_8hpp.html">concept.hpp</a></div><div class="ttdoc">Provides bio::alphabet::aminoacid.</div></div>
<div class="ttc" id="aaminoacid__base_8hpp_html"><div class="ttname"><a href="aminoacid__base_8hpp.html">aminoacid_base.hpp</a></div><div class="ttdoc">Provides bio::alphabet::aminoacid_base.</div></div>
<div class="ttc" id="aarray_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/container/array.html">std::array</a></div></div>
<div class="ttc" id="aclassbio_1_1alphabet_1_1aa20_html"><div class="ttname"><a href="classbio_1_1alphabet_1_1aa20.html">bio::alphabet::aa20</a></div><div class="ttdoc">The canonical amino acid alphabet..</div><div class="ttdef"><b>Definition:</b> aa20.hpp:63</div></div>
<div class="ttc" id="aclassbio_1_1alphabet_1_1aa20_html_a96afe9293da9dfc9cd558f2052d46dbf"><div class="ttname"><a href="classbio_1_1alphabet_1_1aa20.html#a96afe9293da9dfc9cd558f2052d46dbf">bio::alphabet::aa20::rank_to_char</a></div><div class="ttdeci">static constexpr std::array< char_type, alphabet_size > rank_to_char</div><div class="ttdoc">Value to char conversion table.</div><div class="ttdef"><b>Definition:</b> aa20.hpp:90</div></div>
<div class="ttc" id="aclassbio_1_1alphabet_1_1aa20_html_ab11db49a093e5e5ef75fa8c3f38434b1"><div class="ttname"><a href="classbio_1_1alphabet_1_1aa20.html#ab11db49a093e5e5ef75fa8c3f38434b1">bio::alphabet::aa20::aa20</a></div><div class="ttdeci">constexpr aa20() noexcept=default</div><div class="ttdoc">Defaulted.</div></div>
<div class="ttc" id="aclassbio_1_1alphabet_1_1aa20_html_ae179b38c47f141992b9ef76ce45057b3"><div class="ttname"><a href="classbio_1_1alphabet_1_1aa20.html#ae179b38c47f141992b9ef76ce45057b3">bio::alphabet::aa20::char_to_rank</a></div><div class="ttdeci">static constexpr std::array< rank_type, 256 > char_to_rank</div><div class="ttdoc">Char to value conversion table.</div><div class="ttdef"><b>Definition:</b> aa20.hpp:95</div></div>
<div class="ttc" id="aclassbio_1_1alphabet_1_1aminoacid__base_html"><div class="ttname"><a href="classbio_1_1alphabet_1_1aminoacid__base.html">bio::alphabet::aminoacid_base</a></div><div class="ttdoc">A CRTP-base that refines bio::alphabet::base and is used by the amino acids.</div><div class="ttdef"><b>Definition:</b> aminoacid_base.hpp:31</div></div>
<div class="ttc" id="aclassbio_1_1alphabet_1_1base_html"><div class="ttname"><a href="classbio_1_1alphabet_1_1base.html">bio::alphabet::base< aa20, size, char ></a></div></div>
<div class="ttc" id="aclassbio_1_1alphabet_1_1base_html_a834f007f409b2761dc774fc45e457b11"><div class="ttname"><a href="classbio_1_1alphabet_1_1base.html#a834f007f409b2761dc774fc45e457b11">bio::alphabet::base::alphabet_size</a></div><div class="ttdeci">static constexpr size_t alphabet_size</div><div class="ttdoc">The size of the alphabet, i.e. the number of different values it can take.</div><div class="ttdef"><b>Definition:</b> base.hpp:177</div></div>
<div class="ttc" id="aclassbio_1_1alphabet_1_1base_html_a9dfef1259c4c0112e490255343de0d2f"><div class="ttname"><a href="classbio_1_1alphabet_1_1base.html#a9dfef1259c4c0112e490255343de0d2f">bio::alphabet::base::assign_char</a></div><div class="ttdeci">constexpr derived_type & assign_char(char_type const c) noexcept</div><div class="ttdoc">Assign from a character, implicitly converts invalid characters.</div><div class="ttdef"><b>Definition:</b> base.hpp:145</div></div>
<div class="ttc" id="aconditional_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/types/conditional.html">std::conditional_t</a></div></div>
<div class="ttc" id="afill_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/container/array/fill.html">std::array::fill</a></div><div class="ttdeci">T fill(T... args)</div></div>
<div class="ttc" id="ainvalid_argument_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a></div></div>
<div class="ttc" id="anamespacebio_1_1alphabet_html"><div class="ttname"><a href="namespacebio_1_1alphabet.html">bio::alphabet</a></div><div class="ttdoc">The alphabet module's namespace.</div><div class="ttdef"><b>Definition:</b> aa10li.hpp:23</div></div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="https://en.cppreference.com/w/namespacestd.html">std</a></div></div>
<div class="ttc" id="avector_html"><div class="ttname"><a href="https://en.cppreference.com/w/cpp/header/vector.html">vector</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.16-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<div id="list_bottom_right" style="text-align:right; float:left; color:black; padding: 0px 0px 0px 10px"></div>
<script type="text/javascript" charset="utf-8" src="version.js"></script>
<li class="navelem"><a class="el" href="dir_740f9cb2a3f5b47e1148c9e4d90d8bf4.html">bio</a></li><li class="navelem"><a class="el" href="dir_9b716f18bdad80f0bcc9544c5d50fede.html">alphabet</a></li><li class="navelem"><a class="el" href="dir_c5c94c5e6394b8bbdcce9ce299c309d0.html">aminoacid</a></li><li class="navelem"><a class="el" href="aa20_8hpp.html">aa20.hpp</a></li>
<li class="footer">Generated on Thu Mar 30 2023 15:25:51 for BioC++ by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.6 </li>
</ul>
</div>
</body>
</html>