7 #ifndef NUCLEOTIDE_INDEX_HPP_ 8 #define NUCLEOTIDE_INDEX_HPP_ 9 #include "boost/algorithm/string/predicate_facade.hpp" 10 #include "boost/assert.hpp" 14 #define BOOST_DISABLE_ASSERTS 16 #include "boost/multi_array.hpp" 20 #define VDJ_PIPE_N_NUCLEOTIDES 16 96 BOOST_THROW_EXCEPTION(
143 BOOST_THROW_EXCEPTION(
180 case 'A':
return 'T';
181 case 'a':
return 't';
182 case 'T':
return 'A';
183 case 't':
return 'a';
184 case 'C':
return 'G';
185 case 'c':
return 'g';
186 case 'G':
return 'C';
187 case 'g':
return 'c';
188 case 'U':
return 'A';
189 case 'u':
return 'a';
190 case 'R':
return 'Y';
191 case 'r':
return 'y';
192 case 'Y':
return 'R';
193 case 'y':
return 'r';
194 case 'K':
return 'M';
195 case 'k':
return 'm';
196 case 'M':
return 'K';
197 case 'm':
return 'k';
198 case 'S':
return 'W';
199 case 's':
return 'w';
200 case 'W':
return 'S';
201 case 'w':
return 's';
202 case 'N':
return 'N';
203 case 'n':
return 'n';
205 BOOST_THROW_EXCEPTION(
227 case Amine:
return 'M';
229 case Weak:
return 'W';
230 case not_A:
return 'B';
231 case not_C:
return 'D';
232 case not_G:
return 'H';
233 case not_T:
return 'V';
234 case Any:
return 'N';
252 case Amine:
return 'm';
254 case Weak:
return 'w';
255 case not_A:
return 'b';
256 case not_C:
return 'd';
257 case not_G:
return 'h';
258 case not_T:
return 'v';
259 case Any:
return 'n';
268 template<
int A,
int I,
int P,
int U>
279 A, I, I, I, U, I, P, I, I, P, I, P, I, P, P, P,
280 I, A, I, I, U, I, I, P, I, P, P, I, P, I, P, P,
281 I, I, A, I, U, I, P, I, P, I, P, I, P, P, I, P,
282 I, I, I, A, U, A, I, P, P, I, I, P, P, P, P, I,
283 U, U, U, U, U, U, U, U, U, U, U, U, U, U, U, U,
284 I, I, I, A, U, A, I, P, P, I, I, P, P, P, P, I,
285 P, I, P, I, U, I, P, I, P, P, P, P, P, P, P, P,
286 I, P, I, P, U, P, I, P, P, P, P, P, P, P, P, P,
287 I, I, P, P, U, P, P, P, P, I, P, P, P, P, P, P,
288 P, P, I, I, U, I, P, P, I, P, P, P, P, P, P, P,
289 I, P, P, I, U, I, P, P, P, P, P, I, P, P, P, P,
290 P, I, I, P, U, P, P, P, P, P, I, P, P, P, P, P,
291 I, P, P, P, U, P, P, P, P, P, P, P, P, P, P, P,
292 P, I, P, P, U, P, P, P, P, P, P, P, P, P, P, P,
293 P, P, I, P, U, P, P, P, P, P, P, P, P, P, P, P,
294 P, P, P, I, U, I, P, P, P, P, P, P, P, P, P, P
298 std::copy(n, n + p, m.data());
306 template<
int Match,
int Mismatch,
int Approximate,
int Uncertain>
308 static const scoring_matrix_t m =
309 detail::make_sm<Match,Mismatch,Approximate,Uncertain>();
318 scoring_matrix_t
const& sm = scoring_matrix<2,-2,1,0>()
326 BOOST_ASSERT(sm[n1][n2] == sm[n2][n1]);
330 struct Is_ambiguous :
public boost::algorithm::predicate_facade<Is_ambiguous> {
bool result_type
Definition: nucleotide_index.hpp:332
int identity(Seq const &s1, const boost::string_ref s2, scoring_matrix_t const &sm, const std::size_t=0)
Definition: sequence_fls.hpp:144
char to_small(const Nucleotide n)
Definition: nucleotide_index.hpp:241
R : A, G.
Definition: nucleotide_index.hpp:31
U.
Definition: nucleotide_index.hpp:30
Definition: nucleotide_index.hpp:29
boost::multi_array< int, 2 > scoring_matrix_t
Definition: nucleotide_index.hpp:264
scoring_matrix_t const & scoring_matrix()
Definition: nucleotide_index.hpp:307
Is_ambiguous()
Definition: nucleotide_index.hpp:331
Definition: find_shared.hpp:22
bool is_ambiguous(const char c)
Definition: nucleotide_index.hpp:106
Nucleotide
Definition: nucleotide_index.hpp:24
scoring_matrix_t make_sm()
Definition: nucleotide_index.hpp:269
K : G, T, U.
Definition: nucleotide_index.hpp:33
M : A, C.
Definition: nucleotide_index.hpp:34
V : A C G.
Definition: nucleotide_index.hpp:40
Definition: nucleotide_index.hpp:330
Definition: nucleotide_index.hpp:27
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
D : A G T.
Definition: nucleotide_index.hpp:38
Definition: nucleotide_index.hpp:25
boost::error_info< struct errinfo_str1_, std::string > str1_t
Definition: exception.hpp:25
S : C, G.
Definition: nucleotide_index.hpp:35
Definition: nucleotide_index.hpp:26
Nucleotide complement(const Nucleotide n)
Definition: nucleotide_index.hpp:153
const std::size_t n
Definition: vector_set_test.cpp:26
Definition: nucleotide_index.hpp:28
W : A, T, U.
Definition: nucleotide_index.hpp:36
Nucleotide nucleotide_index(const char c)
Definition: nucleotide_index.hpp:45
Definition: exception.hpp:23
char to_capital(const Nucleotide n)
Definition: nucleotide_index.hpp:216
boost::error_info< struct errinfo_message_, std::string > msg_t
Definition: exception.hpp:24
std::string sanitize(const char c)
Definition: sanitize_string.cpp:53
H : A C T.
Definition: nucleotide_index.hpp:39
B : C G T.
Definition: nucleotide_index.hpp:37
Y : C, T, U.
Definition: nucleotide_index.hpp:32
#define VDJ_PIPE_N_NUCLEOTIDES
Definition: nucleotide_index.hpp:20