NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
quality_coeffs.cpp
Go to the documentation of this file.
1 /*
2  * nvbio
3  * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of the NVIDIA CORPORATION nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #include <nvbio/basic/types.h>
29 
30 namespace nvbio {
31 namespace bowtie2 {
32 
35 unsigned char s_phred_to_maq[] = {
36  0, 0, 0, 0, 0,
37  10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
38  20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
39  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
40  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
41  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
42  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
43  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
44  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
45  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
46  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
47  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
48  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
49  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
50  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
51  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
52  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
53  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
54  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
55  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
56  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
57  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
58  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
59  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
60  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
61  30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
62  30
63 };
64 
67 unsigned char s_solexa_to_phred[] = {
68  0, 1, 1, 1, 1, 1, 1, 2, 2, 3,
69  3, 4, 4, 5, 5, 6, 7, 8, 9, 10,
70  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
71  20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
72  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
73  40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
74  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
75  60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
76  70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
77  80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
78  90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
79  100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
80  110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
81  120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
82  130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
83  140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
84  150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
85  160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
86  170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
87  180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
88  190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
89  200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
90  210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
91  220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
92  230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
93  240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
94  250, 251, 252, 253, 254, 255
95 };
96 
97 } // namespace bowtie2
98 } // namespace nvbio