ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cd-hit/cd-hi-init.h
Revision: 1.1
Committed: Sat Feb 7 10:55:42 2004 UTC (17 years, 10 months ago) by dmb
Branch point for: main, MAIN
Log Message:
Initial revision

Line File contents
1 int NAA1 = MAX_UAA;
2 int NAA2 = NAA1 * NAA1;
3 int NAA3 = NAA1 * NAA1 * NAA1;
4 int NAA4 = NAA1 * NAA1 * NAA1 * NAA1;
5 int NAA5 = NAA1 * NAA1 * NAA1 * NAA1 * NAA1;
6
7 int DB_no, NR_no, NR90_no;
8 int *NR_len;
9 int *NR_idx; // idx table -> unsorted no
10 int *NR90_idx; // idx table -> old no
11 int *NR_clstr_no; // cluster no.
12 char *NR_iden;
13 char *NR_flag;
14 char *NR_coverage;
15 char *(*NR_seq);
16 double NR_clstr = 0.9;
17 double NR_cov = 0.0;
18 int NR_clstr100 = 90;
19 int BAND_width = 20;
20 int NAA = 5;
21 int NAAN = NAA5;
22 int mem_limit = 400000000;
23 int mem_size = 3;
24 int length_of_throw = 10;
25 int des_len = 20;
26 int tolerance = 2;
27
28 IDX_TBL word_table;
29
30 int SEG_no;
31 int SEG_b[MAX_SEG], SEG_e[MAX_SEG], SEG90_b[MAX_SEG], SEG90_e[MAX_SEG];
32 char db_swap[MAX_SEG][MAX_FILE_NAME];
33
34 int NN1=0, NN2=0, NN21=0, NN22=0, NN3=0, NN4=0, NN5=0, NN6=0;
35
36 // following variables are for update
37 int old_clstr_file = 0;
38 int NRo_no = 0;
39 int NRo90_no = 0;
40 int *NRo_idx;
41 int *NRo_id1;
42 int *NRo_id2;
43 int *NRo_clstr_no;
44 int *NRo_NR_idx;
45 char *NRo_iden;
46 // end
47
48 // following for mcd-hit
49 int *NR90f_idx;
50 int NR90f_no;
51 int NR_frag_no;
52 int Frag_size = 400;
53 int SEG90f_b[MAX_SEG], SEG90f_e[MAX_SEG];
54 // end
55
56 AA_MATRIX mat;
57
58 int naa_stat_start_percent = 40;
59 int naa_stat[5][61][4] = {
60
61 // cover 0.99
62 {
63 // N=5 N=4 N=3 N=2
64 { 0, 0, 0, 7, }, // 40%
65 { 0, 0, 0, 8, }, // 41%
66 { 0, 0, 0, 9, }, // 42%
67 { 0, 0, 0, 9, }, // 43%
68 { 0, 0, 1, 10, }, // 44%
69 { 0, 0, 1, 11, }, // 45%
70 { 0, 0, 1, 12, }, // 46%
71 { 0, 0, 2, 13, }, // 47%
72 { 0, 0, 2, 14, }, // 48%
73 { 0, 0, 4, 16, }, // 49%
74 { 0, 0, 4, 16, }, // 50%
75 { 0, 0, 5, 17, }, // 51%
76 { 0, 0, 5, 18, }, // 52%
77 { 0, 0, 7, 20, }, // 53%
78 { 0, 1, 7, 21, }, // 54%
79 { 0, 1, 7, 21, }, // 55%
80 { 0, 2, 8, 23, }, // 56%
81 { 0, 2, 8, 25, }, // 57%
82 { 0, 2, 10, 25, }, // 58%
83 { 0, 3, 10, 26, }, // 59%
84 { 0, 4, 13, 28, }, // 60%
85 { 0, 5, 13, 30, }, // 61%
86 { 0, 5, 14, 30, }, // 62%
87 { 1, 6, 15, 33, }, // 63%
88 { 2, 7, 17, 34, }, // 64%
89 { 2, 7, 17, 35, }, // 65%
90 { 2, 9, 20, 37, }, // 66%
91 { 4, 10, 20, 37, }, // 67%
92 { 4, 11, 22, 40, }, // 68%
93 { 5, 12, 24, 41, }, // 69%
94 { 5, 12, 25, 42, }, // 70%
95 { 6, 16, 27, 43, }, // 71%
96 { 8, 16, 27, 45, }, // 72%
97 { 9, 17, 29, 47, }, // 73%
98 { 10, 18, 31, 47, }, // 74%
99 { 10, 20, 32, 50, }, // 75%
100 { 12, 20, 32, 51, }, // 76%
101 { 14, 22, 36, 54, }, // 77%
102 { 15, 24, 37, 55, }, // 78%
103 { 17, 26, 41, 58, }, // 79%
104 { 18, 29, 41, 59, }, // 80%
105 { 20, 30, 45, 60, }, // 81%
106 { 24, 35, 48, 62, }, // 82%
107 { 26, 36, 48, 64, }, // 83%
108 { 27, 38, 51, 65, }, // 84%
109 { 31, 43, 54, 68, }, // 85%
110 { 35, 43, 55, 70, }, // 86%
111 { 36, 48, 60, 71, }, // 87%
112 { 36, 50, 61, 73, }, // 88%
113 { 40, 50, 61, 75, }, // 89%
114 { 45, 54, 65, 75, }, // 90%
115 { 52, 60, 70, 79, }, // 91%
116 { 53, 62, 71, 81, }, // 92%
117 { 57, 66, 75, 84, }, // 93%
118 { 57, 66, 76, 85, }, // 94%
119 { 64, 71, 78, 85, }, // 95%
120 { 70, 75, 82, 89, }, // 96%
121 { 77, 81, 86, 92, }, // 97%
122 { 82, 86, 90, 94, }, // 98%
123 { 83, 87, 91, 95, }, // 99%
124 { 91, 93, 95, 97, }, // 100%
125 },
126 // cover 0.95
127 {
128 // N=5 N=4 N=3 N=2
129 { 0, 0, 1, 9, }, // 40%
130 { 0, 0, 2, 10, }, // 41%
131 { 0, 0, 2, 11, }, // 42%
132 { 0, 0, 3, 12, }, // 43%
133 { 0, 0, 3, 12, }, // 44%
134 { 0, 0, 4, 14, }, // 45%
135 { 0, 0, 4, 14, }, // 46%
136 { 0, 1, 5, 16, }, // 47%
137 { 0, 1, 6, 17, }, // 48%
138 { 0, 2, 7, 19, }, // 49%
139 { 0, 2, 8, 19, }, // 50%
140 { 0, 2, 8, 20, }, // 51%
141 { 0, 2, 9, 21, }, // 52%
142 { 0, 4, 10, 23, }, // 53%
143 { 1, 4, 11, 24, }, // 54%
144 { 1, 4, 11, 24, }, // 55%
145 { 1, 5, 13, 26, }, // 56%
146 { 2, 5, 13, 27, }, // 57%
147 { 2, 6, 15, 29, }, // 58%
148 { 2, 7, 15, 30, }, // 59%
149 { 3, 8, 16, 31, }, // 60%
150 { 4, 8, 18, 32, }, // 61%
151 { 4, 9, 18, 33, }, // 62%
152 { 5, 11, 20, 36, }, // 63%
153 { 6, 12, 22, 37, }, // 64%
154 { 6, 12, 22, 38, }, // 65%
155 { 8, 14, 24, 40, }, // 66%
156 { 8, 15, 25, 41, }, // 67%
157 { 10, 16, 27, 42, }, // 68%
158 { 10, 18, 28, 45, }, // 69%
159 { 11, 18, 29, 45, }, // 70%
160 { 14, 21, 31, 47, }, // 71%
161 { 14, 22, 32, 48, }, // 72%
162 { 14, 22, 33, 50, }, // 73%
163 { 17, 24, 36, 52, }, // 74%
164 { 17, 25, 36, 52, }, // 75%
165 { 18, 27, 39, 54, }, // 76%
166 { 20, 29, 41, 56, }, // 77%
167 { 21, 31, 42, 58, }, // 78%
168 { 21, 31, 46, 60, }, // 79%
169 { 27, 35, 46, 60, }, // 80%
170 { 28, 37, 50, 63, }, // 81%
171 { 31, 38, 50, 64, }, // 82%
172 { 34, 43, 53, 66, }, // 83%
173 { 36, 45, 54, 67, }, // 84%
174 { 41, 50, 60, 70, }, // 85%
175 { 43, 51, 60, 71, }, // 86%
176 { 45, 54, 63, 74, }, // 87%
177 { 48, 55, 64, 75, }, // 88%
178 { 54, 60, 68, 78, }, // 89%
179 { 55, 62, 71, 80, }, // 90%
180 { 56, 63, 71, 80, }, // 91%
181 { 64, 70, 76, 84, }, // 92%
182 { 69, 74, 80, 86, }, // 93%
183 { 73, 78, 83, 88, }, // 94%
184 { 74, 78, 84, 89, }, // 95%
185 { 80, 84, 87, 91, }, // 96%
186 { 83, 86, 90, 93, }, // 97%
187 { 86, 89, 92, 95, }, // 98%
188 { 91, 93, 95, 97, }, // 99%
189 { 92, 93, 95, 97, }, // 100%
190 },
191 // cover 0.9
192 {
193 // N=5 N=4 N=3 N=2
194 { 0, 0, 2, 11, }, // 40%
195 { 0, 0, 3, 12, }, // 41%
196 { 0, 0, 3, 12, }, // 42%
197 { 0, 1, 4, 13, }, // 43%
198 { 0, 1, 5, 14, }, // 44%
199 { 0, 1, 5, 15, }, // 45%
200 { 0, 1, 6, 16, }, // 46%
201 { 0, 2, 7, 18, }, // 47%
202 { 0, 2, 7, 18, }, // 48%
203 { 0, 3, 9, 20, }, // 49%
204 { 1, 4, 9, 20, }, // 50%
205 { 1, 4, 10, 21, }, // 51%
206 { 1, 4, 11, 23, }, // 52%
207 { 2, 5, 12, 24, }, // 53%
208 { 2, 5, 12, 25, }, // 54%
209 { 2, 6, 13, 26, }, // 55%
210 { 3, 7, 14, 28, }, // 56%
211 { 3, 7, 15, 28, }, // 57%
212 { 4, 8, 16, 30, }, // 58%
213 { 5, 9, 17, 31, }, // 59%
214 { 5, 10, 18, 32, }, // 60%
215 { 6, 11, 20, 35, }, // 61%
216 { 6, 11, 20, 35, }, // 62%
217 { 7, 13, 22, 38, }, // 63%
218 { 8, 14, 23, 39, }, // 64%
219 { 8, 15, 24, 39, }, // 65%
220 { 10, 16, 26, 42, }, // 66%
221 { 10, 17, 27, 42, }, // 67%
222 { 12, 19, 29, 44, }, // 68%
223 { 13, 20, 30, 46, }, // 69%
224 { 13, 21, 31, 47, }, // 70%
225 { 16, 23, 33, 48, }, // 71%
226 { 18, 25, 34, 50, }, // 72%
227 { 18, 26, 36, 51, }, // 73%
228 { 19, 28, 38, 53, }, // 74%
229 { 20, 29, 38, 53, }, // 75%
230 { 23, 30, 41, 56, }, // 76%
231 { 24, 33, 43, 57, }, // 77%
232 { 26, 34, 45, 59, }, // 78%
233 { 28, 37, 48, 61, }, // 79%
234 { 30, 37, 48, 62, }, // 80%
235 { 33, 42, 52, 64, }, // 81%
236 { 35, 43, 53, 65, }, // 82%
237 { 38, 47, 56, 68, }, // 83%
238 { 40, 47, 56, 68, }, // 84%
239 { 44, 53, 61, 71, }, // 85%
240 { 45, 53, 62, 73, }, // 86%
241 { 50, 58, 66, 75, }, // 87%
242 { 51, 58, 66, 76, }, // 88%
243 { 57, 63, 71, 79, }, // 89%
244 { 60, 66, 72, 81, }, // 90%
245 { 62, 68, 75, 83, }, // 91%
246 { 70, 74, 80, 85, }, // 92%
247 { 74, 78, 82, 88, }, // 93%
248 { 85, 87, 90, 92, }, // 94%
249 { 86, 88, 90, 92, }, // 95%
250 { 87, 89, 91, 93, }, // 96%
251 { 87, 89, 92, 94, }, // 97%
252 { 89, 91, 93, 96, }, // 98%
253 { 93, 94, 96, 97, }, // 99%
254 { 94, 95, 97, 98, }, // 100%
255 },
256 // cover 0.8
257 {
258 // N=5 N=4 N=3 N=2
259 { 0, 1, 4, 13, }, // 40%
260 { 0, 1, 5, 13, }, // 41%
261 { 0, 1, 5, 14, }, // 42%
262 { 0, 2, 6, 15, }, // 43%
263 { 0, 2, 6, 16, }, // 44%
264 { 0, 2, 7, 17, }, // 45%
265 { 1, 3, 8, 18, }, // 46%
266 { 1, 4, 9, 20, }, // 47%
267 { 1, 4, 9, 20, }, // 48%
268 { 2, 5, 11, 22, }, // 49%
269 { 2, 5, 11, 22, }, // 50%
270 { 2, 6, 12, 24, }, // 51%
271 { 3, 6, 13, 25, }, // 52%
272 { 3, 7, 14, 26, }, // 53%
273 { 4, 8, 14, 27, }, // 54%
274 { 4, 8, 15, 28, }, // 55%
275 { 5, 9, 17, 30, }, // 56%
276 { 5, 9, 17, 30, }, // 57%
277 { 6, 11, 19, 32, }, // 58%
278 { 7, 12, 20, 34, }, // 59%
279 { 8, 12, 20, 34, }, // 60%
280 { 9, 14, 22, 37, }, // 61%
281 { 9, 14, 23, 37, }, // 62%
282 { 10, 16, 25, 39, }, // 63%
283 { 11, 17, 26, 41, }, // 64%
284 { 12, 18, 27, 41, }, // 65%
285 { 13, 20, 28, 43, }, // 66%
286 { 14, 21, 30, 45, }, // 67%
287 { 15, 22, 31, 46, }, // 68%
288 { 17, 24, 33, 48, }, // 69%
289 { 17, 24, 34, 48, }, // 70%
290 { 19, 26, 36, 50, }, // 71%
291 { 20, 27, 37, 51, }, // 72%
292 { 21, 29, 39, 53, }, // 73%
293 { 23, 31, 41, 55, }, // 74%
294 { 23, 31, 41, 55, }, // 75%
295 { 26, 34, 44, 58, }, // 76%
296 { 28, 36, 46, 59, }, // 77%
297 { 29, 37, 47, 60, }, // 78%
298 { 34, 41, 50, 62, }, // 79%
299 { 34, 42, 51, 63, }, // 80%
300 { 38, 45, 55, 66, }, // 81%
301 { 39, 46, 55, 67, }, // 82%
302 { 44, 51, 60, 70, }, // 83%
303 { 44, 51, 60, 70, }, // 84%
304 { 49, 56, 64, 73, }, // 85%
305 { 50, 57, 64, 74, }, // 86%
306 { 57, 63, 69, 77, }, // 87%
307 { 58, 64, 70, 78, }, // 88%
308 { 68, 71, 76, 82, }, // 89%
309 { 68, 72, 77, 83, }, // 90%
310 { 75, 79, 81, 85, }, // 91%
311 { 86, 87, 89, 90, }, // 92%
312 { 88, 89, 90, 92, }, // 93%
313 { 90, 91, 92, 93, }, // 94%
314 { 91, 92, 93, 94, }, // 95%
315 { 92, 94, 94, 95, }, // 96%
316 { 93, 94, 95, 96, }, // 97%
317 { 94, 95, 95, 96, }, // 98%
318 { 94, 95, 96, 98, }, // 99%
319 { 95, 96, 97, 98, }, // 100%
320 },
321 // cover 0.6
322 {
323 // N=5 N=4 N=3 N=2
324 { 1, 2, 6, 15, }, // 40%
325 { 1, 3, 7, 16, }, // 41%
326 { 1, 3, 8, 17, }, // 42%
327 { 2, 4, 9, 18, }, // 43%
328 { 2, 4, 9, 19, }, // 44%
329 { 2, 5, 10, 20, }, // 45%
330 { 3, 5, 10, 21, }, // 46%
331 { 3, 6, 12, 22, }, // 47%
332 { 3, 6, 12, 23, }, // 48%
333 { 4, 8, 14, 25, }, // 49%
334 { 4, 8, 14, 25, }, // 50%
335 { 5, 8, 15, 26, }, // 51%
336 { 5, 9, 16, 27, }, // 52%
337 { 6, 10, 17, 29, }, // 53%
338 { 6, 11, 18, 30, }, // 54%
339 { 7, 11, 18, 31, }, // 55%
340 { 8, 12, 20, 32, }, // 56%
341 { 8, 13, 20, 33, }, // 57%
342 { 10, 14, 22, 35, }, // 58%
343 { 10, 15, 23, 37, }, // 59%
344 { 11, 16, 24, 37, }, // 60%
345 { 12, 18, 26, 39, }, // 61%
346 { 13, 18, 26, 40, }, // 62%
347 { 14, 20, 28, 42, }, // 63%
348 { 16, 22, 30, 43, }, // 64%
349 { 16, 22, 31, 44, }, // 65%
350 { 17, 23, 32, 45, }, // 66%
351 { 18, 25, 33, 47, }, // 67%
352 { 19, 26, 35, 48, }, // 68%
353 { 21, 27, 36, 50, }, // 69%
354 { 22, 29, 37, 51, }, // 70%
355 { 24, 30, 39, 52, }, // 71%
356 { 25, 32, 41, 53, }, // 72%
357 { 26, 33, 42, 55, }, // 73%
358 { 29, 35, 44, 57, }, // 74%
359 { 29, 36, 45, 57, }, // 75%
360 { 32, 39, 48, 60, }, // 76%
361 { 34, 41, 50, 61, }, // 77%
362 { 36, 43, 51, 62, }, // 78%
363 { 40, 46, 54, 65, }, // 79%
364 { 40, 46, 54, 65, }, // 80%
365 { 46, 52, 59, 68, }, // 81%
366 { 46, 52, 60, 69, }, // 82%
367 { 53, 59, 65, 73, }, // 83%
368 { 54, 60, 66, 73, }, // 84%
369 { 63, 67, 73, 78, }, // 85%
370 { 68, 71, 75, 79, }, // 86%
371 { 78, 80, 82, 85, }, // 87%
372 { 79, 81, 83, 85, }, // 88%
373 { 83, 85, 86, 87, }, // 89%
374 { 85, 86, 87, 89, }, // 90%
375 { 86, 88, 89, 90, }, // 91%
376 { 88, 89, 90, 91, }, // 92%
377 { 90, 90, 91, 92, }, // 93%
378 { 91, 92, 92, 93, }, // 94%
379 { 92, 93, 94, 94, }, // 95%
380 { 94, 94, 95, 95, }, // 96%
381 { 95, 95, 96, 96, }, // 97%
382 { 95, 96, 97, 97, }, // 98%
383 { 96, 96, 97, 98, }, // 99%
384 { 97, 98, 98, 99, }, // 100%
385 },
386 };