Next version of JABA
[jabaws.git] / binaries / src / fasta34 / upam.h
1 /* Concurrent read version */
2 /*      20-June-1986    universal pam file */
3
4 /* $Name: fa_34_26_5 $ - $Id: upam.h,v 1.19 2006/02/07 17:58:19 wrp Exp $ */
5
6 /* modified to accomodate both lower and upper case amino acid numbers
7    as a result MAXSQ = 50
8 */
9
10 #ifndef UPAM_GBL_DEF
11 #define UPAM_GBL_DEF
12
13 #define EOSEQ 0
14 #define MAXSQ 50
15 #define MAXUC 24
16 #define MAXLC 48
17
18 #define MAXHASH 32
19 #define NMAP MAXHASH+1
20
21 #ifndef XTERNAL
22
23 int pamoff=0;
24
25 /*extern int gdelval, ggapval;*/
26
27 /* char sqnam[]="aa"; */
28 /* char sqtype[]="protein"; */
29
30 char aa[MAXSQ+1]  = {"\0ARNDCQEGHILKMFPSTWYVBZX*ARNDCQEGHILKMFPSTWYVBZX*\0"};
31 char aax[MAXSQ+1] = {"\0ARNDCQEGHILKMFPSTWYVBZX*arndcqeghilkmfpstwyvbzx*\0"};
32
33 int naa = 24;   /* this should be calculated from aa[] */
34 int naax = 48;
35
36 /* haa[] used to map all valid amino acid codes into a hash value;
37    now, there is an additional hash value - not-mapped - NM */
38
39 /* this has been expanded to accomodate '*' */
40 int haa[MAXSQ+1] = {
41   NMAP,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,3,7,NMAP,NMAP,
42        1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,3,7,NMAP,NMAP};
43
44 int haax[MAXSQ+1] = {
45   NMAP,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,3,7,NMAP,
46   NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,
47   NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,
48   NMAP};
49
50 /*
51   PAM 250 substitution matrix, scale = ln(2)/3 = 0.231049
52   Expected score = -0.844, Entropy = 0.354 bits
53   Lowest score = -8, Highest score = 17
54 */
55 int apam250[450] = {
56  2,
57 -2, 6,
58  0, 0, 2,
59  0,-1, 2, 4,
60 -2,-4,-4,-5,12,
61  0, 1, 1, 2,-5, 4,
62  0,-1, 1, 3,-5, 2, 4,
63  1,-3, 0, 1,-3,-1, 0, 5,
64 -1, 2, 2, 1,-3, 3, 1,-2, 6,
65 -1,-2,-2,-2,-2,-2,-2,-3,-2, 5,
66 -2,-3,-3,-4,-6,-2,-3,-4,-2, 2, 6,
67 -1, 3, 1, 0,-5, 1, 0,-2, 0,-2,-3, 5,
68 -1, 0,-2,-3,-5,-1,-2,-3,-2, 2, 4, 0, 6,
69 -4,-4,-4,-6,-4,-5,-5,-5,-2, 1, 2,-5, 0, 9,
70  1, 0,-1,-1,-3, 0,-1,-1, 0,-2,-3,-1,-2,-5, 6,
71  1, 0, 1, 0, 0,-1, 0, 1,-1,-1,-3, 0,-2,-3, 1, 2,
72  1,-1, 0, 0,-2,-1, 0, 0,-1, 0,-2, 0,-1,-3, 0, 1, 3,
73 -6, 2,-4,-7,-8,-5,-7,-7,-3,-5,-2,-3,-4, 0,-6,-2,-5,17,
74 -3,-4,-2,-4, 0,-4,-4,-5, 0,-1,-1,-4,-2, 7,-5,-3,-3, 0,10,
75  0,-2,-2,-2,-2,-2,-2,-1,-2, 4, 2,-2, 2,-1,-1,-1, 0,-6,-2, 4,
76  0,-1, 2, 3,-4, 1, 2, 0, 1,-2,-3, 1,-2,-5,-1, 0, 0,-5,-3,-2, 2,
77  0, 0, 1, 3,-5, 3, 3,-1, 2,-2,-3, 0,-2,-5, 0, 0,-1,-6,-4,-2, 2, 3,
78  0,-1, 0,-1,-3,-1,-1,-1,-1,-1,-1,-1,-1,-2,-1, 0, 0,-4,-2,-1,-1,-1,-1,
79  0,-1, 0,-1,-3,-1,-1,-1,-1,-1,-1,-1,-1,-2,-1, 0, 0,-4,-2,-1,-1,-1,-1, 8};
80
81 /*
82  This matrix was produced by "pam" Version 1.0.6 [28-Jul-93]
83  PAM 120 substitution matrix, scale = ln(2)/2 = 0.346574
84  Expected score = -1.64, Entropy = 0.979 bits
85  Lowest score = -8, Highest score = 12
86 */
87 int apam120[450] = {
88   3,
89  -3, 6,
90   0,-1, 4,
91   0,-3, 2, 5,
92  -3,-4,-5,-7, 9,
93  -1, 1, 0, 1,-7, 6,
94   0,-3, 1, 3,-7, 2, 5,
95   1,-4, 0, 0,-5,-3,-1, 5,
96  -3, 1, 2, 0,-4, 3,-1,-4, 7,
97  -1,-2,-2,-3,-3,-3,-3,-4,-4, 6,
98  -3,-4,-4,-5,-7,-2,-4,-5,-3, 1, 5,
99  -2, 2, 1,-1,-7, 0,-1,-3,-2,-2,-4, 5,
100  -2,-1,-3,-4,-6,-1,-4,-4,-4, 1, 3, 0, 8,
101  -4,-4,-4,-7,-6,-6,-6,-5,-2, 0, 0,-6,-1, 8,
102   1,-1,-2,-2,-3, 0,-1,-2,-1,-3,-3,-2,-3,-5, 6,
103   1,-1, 1, 0,-1,-2,-1, 1,-2,-2,-4,-1,-2,-3, 1, 3,
104   1,-2, 0,-1,-3,-2,-2,-1,-3, 0,-3,-1,-1,-4,-1, 2, 4,
105  -7, 1,-5,-8,-8,-6,-8,-8,-5,-7,-5,-5,-7,-1,-7,-2,-6, 12,
106  -4,-6,-2,-5,-1,-5,-4,-6,-1,-2,-3,-6,-4, 4,-6,-3,-3,-1, 8,
107   0,-3,-3,-3,-2,-3,-3,-2,-3, 3, 1,-4, 1,-3,-2,-2, 0,-8,-3, 5,
108   0,-2, 3, 4,-6, 0, 3, 0, 1,-3,-4, 0,-4,-5,-2, 0, 0,-6,-3,-3, 4,
109  -1,-1, 0, 3,-7, 4, 4,-2, 1,-3,-3,-1,-2,-6,-1,-1,-2,-7,-5,-3, 2, 4,
110  -1,-2,-1,-2,-4,-1,-1,-2,-2,-1,-2,-2,-2,-3,-2,-1,-1,-5,-3,-1,-1,-1,-2,
111  -1,-2,-1,-2,-4,-1,-1,-2,-2,-1,-2,-2,-2,-3,-2,-1,-1,-5,-3,-1,-1,-1,-2, 6};
112
113 /*
114 #     VTML160
115 #
116 # This matrix was produced with scripts written by
117 # Tobias Mueller and Sven Rahmann [June-2001]. 
118 #
119 # VTML160 substitution matrix, Units = Third-Bits
120 # Expected Score = -1.297840 Third-Bits
121 # Lowest Score = -7, Highest Score = 16
122 #
123 # Entropy H = 0.562489 Bits
124 #
125 # 30-Jun-2001 
126 */
127 int avt160[450] = {
128   5,
129   -2,  7,
130   -1,  0,  7,
131   -1, -3,  3,  7,
132   1, -3, -3, -5, 13,
133   -1,  2,  0,  1, -4,  6,
134   -1, -1,  0,  3, -5,  2,  6,
135   0, -3,  0, -1, -2, -3, -2,  8,
136   -2,  1,  1,  0, -2,  2, -1, -3,  9,
137   -1, -4, -4, -6, -1, -4, -5, -7, -4,  6,
138   -2, -3, -4, -6, -4, -2, -4, -6, -3,  3,  6,
139   -1,  4,  0,  0, -4,  2,  1, -2,  0, -4, -3,  5,
140   -1, -2, -3, -5, -1, -1, -3, -5, -3,  2,  4, -2,  8,
141   -3, -5, -5, -7, -4, -4, -6, -6,  0,  0,  2, -5,  1,  9,
142   0, -2, -2, -1, -3, -1, -1, -3, -2, -4, -3, -1, -4, -5,  9,
143   1, -1,  1,  0,  1,  0,  0,  0, -1, -3, -3, -1, -3, -3,  0,  4,
144   1, -1,  0, -1,  0, -1, -1, -2, -1, -1, -2, -1, -1, -3, -1,  2,  5,
145   -5, -4, -5, -7, -7, -6, -7, -5, -1, -2, -1, -5, -4,  3, -5, -4, -6, 16,
146   -3, -3, -2, -5, -1, -4, -3, -5,  3, -2, -1, -3, -2,  6, -6, -2, -3,  4, 10,
147   0, -4, -4, -4,  1, -3, -3, -5, -3,  4,  2, -3,  1, -1, -3, -2,  0, -5, -3,  5,
148   -1, -2,  5,  6, -4,  0,  2, -1,  0, -5, -5,  0, -4, -6, -2,  1,  0, -6, -3, -4,  5,
149   -1,  0,  0,  3, -5,  4,  5, -2,  0, -4, -3,  2, -3, -5, -1,  0, -1, -7, -4, -3,  2,  5,
150   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
151   -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,  6};
152
153 /*
154   Matrix made by matblas from blosum50.iij
155   BLOSUM Clustered Scoring Matrix in 1/3 Bit Units
156   Blocks Database = /data/blocks_5.0/blocks.dat
157   Cluster Percentage: >= 50
158   Entropy =   0.4808, Expected =  -0.3573
159 */
160 int abl50[450] = {
161   5,
162  -2, 7,
163  -1,-1, 7,
164  -2,-2, 2, 8,
165  -1,-4,-2,-4,13,
166  -1, 1, 0, 0,-3, 7,
167  -1, 0, 0, 2,-3, 2, 6,
168   0,-3, 0,-1,-3,-2,-3, 8,
169  -2, 0, 1,-1,-3, 1, 0,-2,10,
170  -1,-4,-3,-4,-2,-3,-4,-4,-4, 5,
171  -2,-3,-4,-4,-2,-2,-3,-4,-3, 2, 5,
172  -1, 3, 0,-1,-3, 2, 1,-2, 0,-3,-3, 6,
173  -1,-2,-2,-4,-2, 0,-2,-3,-1, 2, 3,-2, 7,
174  -3,-3,-4,-5,-2,-4,-3,-4,-1, 0, 1,-4, 0, 8,
175  -1,-3,-2,-1,-4,-1,-1,-2,-2,-3,-4,-1,-3,-4,10,
176   1,-1, 1, 0,-1, 0,-1, 0,-1,-3,-3, 0,-2,-3,-1, 5,
177   0,-1, 0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1, 2, 5,
178  -3,-3,-4,-5,-5,-1,-3,-3,-3,-3,-2,-3,-1, 1,-4,-4,-3,15,
179  -2,-1,-2,-3,-3,-1,-2,-3, 2,-1,-1,-2, 0, 4,-3,-2,-2, 2, 8,
180   0,-3,-3,-4,-1,-3,-3,-4,-4, 4, 1,-3, 1,-1,-3,-2, 0,-3,-1, 5,
181  -2,-1, 4, 5,-3, 0, 1,-1, 0,-4,-4, 0,-3,-4,-2, 0, 0,-5,-3,-4, 5,
182  -1, 0, 0, 1,-3, 4, 5,-2, 0,-3,-3, 1,-1,-4,-1, 0,-1,-2,-2,-3, 2, 5,
183  -1,-1,-1,-1,-2,-1,-1,-2,-1,-1,-1,-1,-1,-2,-2,-1, 0,-3,-1,-1,-1,-1,-1,
184  -1,-1,-1,-1,-2,-1,-1,-2,-1,-1,-1,-1,-1,-2,-2,-1, 0,-3,-1,-1,-1,-1,-1, 7};
185
186 /*
187   A   R   N   D   C   Q   E   G   H   I   L   K   M   F   P   S   T   W   Y   V   B   Z   X   * */
188 int a_md10[450]= {
189  11,    /* A */
190 -12, 12,        /* R */
191 -12,-13, 13,    /* N */
192 -11,-18, -3, 12,        /* D */
193 -13,-10,-14,-20, 17,    /* C */
194 -13, -5,-11,-13,-19, 13,        /* Q */
195 -10,-15,-12, -2,-22, -5, 12,    /* E */
196  -8, -9,-11, -9,-12,-16, -9, 11,        /* G */
197 -16, -5, -5,-10,-12, -3,-15,-16, 16,    /* H */
198 -13,-17,-14,-19,-17,-20,-19,-21,-18, 12,        /* I */
199 -15,-14,-19,-21,-16,-12,-20,-21,-13, -7, 10,    /* L */
200 -14, -2, -6,-15,-21, -6, -8,-15,-13,-17,-18, 12,        /* K */
201 -13,-14,-15,-18,-15,-14,-18,-19,-15, -4, -4,-12, 16,    /* M */
202 -18,-22,-19,-22,-11,-22,-23,-22,-14,-11, -6,-23,-14, 14,        /* F */
203  -7,-12,-17,-18,-18, -8,-17,-16,-10,-19,-10,-16,-17,-17, 13,    /* P */
204  -5,-10, -4,-12, -7,-13,-15, -7,-11,-14,-13,-13,-15,-11, -6, 11,        /* S */
205  -4,-12, -7,-14,-14,-13,-15,-14,-13, -7,-16,-10, -7,-19, -9, -4, 12,    /* T */
206 -21, -9,-21,-21,-10,-17,-21,-13,-21,-21,-13,-21,-17,-13,-21,-15,-18, 18,        /* W */
207 -20,-17,-12,-13, -7,-16,-21,-20, -3,-15,-16,-20,-17, -3,-20,-12,-17,-12, 15,    /* Y */
208  -6,-17,-17,-15,-12,-17,-14,-13,-19, -1, -8,-18, -5,-12,-16,-14,-10,-16,-18, 11,        /* V */
209 -12,-15,  5,  5,-17,-12, -7,-10, -7,-16,-20,-11,-17,-21,-17, -8,-10,-22,-13,-16, 13,    /* B */
210 -16,-18,-17, -8,-32,  1,  9,-17,-17,-29,-26,-11,-24,-34,-21,-21,-21,-29,-29,-22, -9, 13, /* Z */
211  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
212  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9};
213
214 int a_md20[450] = {
215  10,
216 -10, 12,
217  -9,-10, 13,
218  -8,-14, -1, 12,
219 -10, -7,-11,-16, 17,
220 -10, -3, -8, -9,-16, 13,
221  -7,-11, -9,  1,-19, -3, 11,
222  -5, -6, -8, -6, -9,-12, -7, 11,
223 -12, -3, -2, -7, -9,  0,-12,-13, 15,
224 -10,-14,-11,-16,-14,-16,-16,-17,-14, 12,
225 -12,-11,-15,-18,-13, -9,-17,-18,-10, -4, 10,
226 -11,  0, -4,-12,-17, -3, -5,-12, -9,-14,-15, 12,
227  -9,-11,-12,-15,-12,-11,-15,-16,-12, -1, -2, -9, 15,
228 -15,-19,-16,-19, -8,-18,-20,-19,-11, -8, -4,-19,-10, 13,
229  -5, -9,-13,-15,-14, -5,-14,-12, -7,-15, -7,-13,-14,-14, 12,
230  -2, -8, -1, -9, -4,-10,-12, -5, -8,-11,-10,-10,-12, -8, -3, 10,
231  -1, -9, -4,-11,-10,-10,-12,-11,-10, -4,-12, -7, -4,-15, -7, -1, 11,
232 -17, -6,-18,-18, -7,-14,-18,-10,-17,-17,-10,-17,-14,-10,-18,-12,-15, 18,
233 -16,-14, -9,-11, -4,-12,-18,-17,  0,-12,-12,-17,-14,  0,-16, -9,-13, -9, 14,
234  -3,-14,-14,-12, -9,-14,-11,-11,-15,  2, -5,-15, -2, -9,-13,-11, -7,-13,-14, 11,
235  -9,-12,  6,  6,-14, -9, -4, -7, -4,-13,-17, -8,-13,-18,-14, -5, -7,-19,-10,-13, 12,
236 -12,-13,-13, -4,-27,  4, 10,-13,-12,-24,-21, -6,-20,-29,-17,-17,-17,-24,-24,-18, -6, 12,
237  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
238  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9 };
239
240 int a_md40[450] = {
241   9,
242  -7, 11,
243  -6, -6, 12,
244  -6,-10,  1, 11,
245  -7, -5, -8,-13, 16,
246  -7,  0, -5, -6,-12, 12,
247  -5, -8, -5,  3,-15,  0, 11,
248  -3, -4, -5, -4, -7, -9, -4, 10,
249  -9,  0,  0, -4, -6,  2, -8,-10, 14,
250  -6,-10, -8,-12,-11,-12,-12,-13,-11, 11,
251  -9, -9,-12,-14,-10, -6,-13,-14, -7, -1,  9,
252  -8,  3, -1, -8,-12, -1, -3, -9, -6,-11,-12, 11,
253  -6, -8, -9,-12, -9, -8,-11,-12, -9,  1,  1, -7, 14,
254 -11,-15,-12,-15, -5,-14,-16,-15, -7, -5, -1,-16, -7, 13,
255  -2, -6, -9,-11,-11, -3,-11, -9, -4,-11, -5,-10,-10,-11, 12,
256   0, -5,  1, -6, -2, -7, -8, -2, -6, -8, -7, -7, -8, -6, -1,  9,
257   1, -6, -2, -8, -7, -7, -8, -7, -7, -2, -9, -5, -2,-11, -4,  1, 10,
258 -14, -4,-14,-15, -4,-11,-15, -7,-13,-13, -8,-13,-11, -7,-14, -9,-12, 18,
259 -13,-10, -6, -8, -2, -9,-14,-13,  2, -9, -9,-13,-11,  2,-13, -7,-10, -6, 14,
260  -1,-11,-10, -9, -7,-11, -8, -8,-12,  4, -2,-12,  0, -6, -9, -7, -4,-10,-11, 10,
261  -6, -8,  6,  6,-10, -6, -1, -4, -2,-10,-13, -5,-10,-14,-10, -3, -5,-15, -7,-10, 11,
262  -8, -8, -8,  0,-21,  6, 10, -8, -7,-18,-16, -3,-15,-23,-12,-12,-12,-19,-18,-14, -3, 11,
263  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
264  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9};
265
266 /* 
267   Matrix made by matblas from blosum62.iij
268   * column uses minimum score
269   BLOSUM Clustered Scoring Matrix in 1/2 Bit Units
270   Blocks Database = /data/blocks_5.0/blocks.dat
271   Cluster Percentage: >= 62
272   Entropy =   0.6979, Expected =  -0.5209
273 */
274
275 int abl62[450] = {
276   4,
277  -1, 5,
278  -2, 0, 6,
279  -2,-2, 1, 6,
280   0,-3,-3,-3, 9,
281  -1, 1, 0, 0,-3, 5,
282  -1, 0, 0, 2,-4, 2, 5,
283   0,-2, 0,-1,-3,-2,-2, 6,
284  -2, 0, 1,-1,-3, 0, 0,-2, 8,
285  -1,-3,-3,-3,-1,-3,-3,-4,-3, 4,
286  -1,-2,-3,-4,-1,-2,-3,-4,-3, 2, 4,
287  -1, 2, 0,-1,-3, 1, 1,-2,-1,-3,-2, 5,
288  -1,-1,-2,-3,-1, 0,-2,-3,-2, 1, 2,-1, 5,
289  -2,-3,-3,-3,-2,-3,-3,-3,-1, 0, 0,-3, 0, 6,
290  -1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4, 7,
291   1,-1, 1, 0,-1, 0, 0, 0,-1,-2,-2, 0,-1,-2,-1, 4,
292   0,-1, 0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1, 1, 5,
293  -3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1, 1,-4,-3,-2,11,
294  -2,-2,-2,-3,-2,-1,-2,-3, 2,-1,-1,-2,-1, 3,-3,-2,-2, 2, 7,
295   0,-3,-3,-3,-1,-2,-2,-3,-3, 3, 1,-2, 1,-1,-2,-2, 0,-3,-1, 4,
296  -2,-1, 3, 4,-3, 0, 1,-1, 0,-3,-4, 0,-3,-3,-2, 0,-1,-4,-3,-3, 4,
297  -1, 0, 0, 1,-3, 3, 4,-2, 0,-3,-3, 1,-1,-3,-1, 0,-1,-3,-2,-2, 1, 4,
298   0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2, 0, 0,-2,-1,-1,-1,-1,-1,
299   0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2, 0, 0,-2,-1,-1,-1,-1,-1, 6};
300
301 /* blosum80 in 1/2 bit units (previous versions had 1/3 bit units) */
302 /*
303   Matrix made by matblas from blosum80.iij
304   * column uses minimum score
305   BLOSUM Clustered Scoring Matrix in 1/2 Bit Units
306   Blocks Database = /data/blocks_5.0/blocks.dat
307   Cluster Percentage: >= 80
308   Entropy =   0.9868, Expected =  -0.7442
309 */
310
311 int abl80[450] = {
312   5,
313  -2, 6,
314  -2,-1, 6,
315  -2,-2, 1, 6,
316  -1,-4,-3,-4, 9,
317  -1, 1, 0,-1,-4, 6,
318  -1,-1,-1, 1,-5, 2, 6,
319   0,-3,-1,-2,-4,-2,-3, 6,
320  -2, 0, 0,-2,-4, 1, 0,-3, 8,
321  -2,-3,-4,-4,-2,-3,-4,-5,-4, 5,
322  -2,-3,-4,-5,-2,-3,-4,-4,-3, 1, 4,
323  -1, 2, 0,-1,-4, 1, 1,-2,-1,-3,-3, 5,
324  -1,-2,-3,-4,-2, 0,-2,-4,-2, 1, 2,-2, 6,
325  -3,-4,-4,-4,-3,-4,-4,-4,-2,-1, 0,-4, 0, 6,
326  -1,-2,-3,-2,-4,-2,-2,-3,-3,-4,-3,-1,-3,-4, 8,
327   1,-1, 0,-1,-2, 0, 0,-1,-1,-3,-3,-1,-2,-3,-1, 5,
328   0,-1, 0,-1,-1,-1,-1,-2,-2,-1,-2,-1,-1,-2,-2, 1, 5,
329  -3,-4,-4,-6,-3,-3,-4,-4,-3,-3,-2,-4,-2, 0,-5,-4,-4,11,
330  -2,-3,-3,-4,-3,-2,-3,-4, 2,-2,-2,-3,-2, 3,-4,-2,-2, 2, 7,
331   0,-3,-4,-4,-1,-3,-3,-4,-4, 3, 1,-3, 1,-1,-3,-2, 0,-3,-2, 4,
332  -2,-2, 4, 4,-4, 0, 1,-1,-1,-4,-4,-1,-3,-4,-2, 0,-1,-5,-3,-4, 4,
333  -1, 0, 0, 1,-4, 3, 4,-3, 0,-4,-3, 1,-2,-4,-2, 0,-1,-4,-3,-3, 0, 4,
334  -1,-1,-1,-2,-3,-1,-1,-2,-2,-2,-2,-1,-1,-2,-2,-1,-1,-3,-2,-1,-2,-1,-1,
335  -1,-1,-1,-2,-3,-1,-1,-2,-2,-2,-2,-1,-1,-2,-2,-1,-1,-3,-2,-1,-2,-1,-1, 6};
336
337 /*      DNA alphabet
338
339         A, C, G, T, U   1-4, 5
340         R, Y            6, 7
341         M (A or C)      8
342         W (A or T)      9
343         S (C or G)      10
344         K (G or T)      11
345         D (not C)       12
346         H (not G)       13
347         V (not T)       14
348         B (not A)       15
349         N               16
350         X               17
351 */
352
353 char nt[MAXSQ+1] ={"\0ACGTURYMWSKDHVBNXACGTURYMWSKDHVBNX\0"};
354 char ntx[MAXSQ+1]={"\0ACGTURYMWSKDHVBNXacgturymwskdhvbnx\0"};
355 char ntc[MAXSQ+1]={"\0TGCAAYRKWSMHDBVNXtgcaayrkwsmhdbvnx\0"};
356
357 /* nt complement to encoding */
358                      /* A:T C:G G:C T:A U:A */
359 int gc_nt[MAXSQ+1]={ 0,  4,  3,  2,  1,  1, 
360                      /* R:Y Y:R M:K W:W */
361                          7,  6, 11,  9,
362                      /* S:S K:M D:H H:D */
363                         10,  8, 13, 12,
364                      /* B:V V:B N:N X:X */
365                         15, 14, 16, 16};
366
367 int nnt = 17;
368 int nntx = 34;
369
370 int hnt[MAXSQ+1] = {
371   NMAP,0,1,2,3,3,0,1,0,0,1,2,0,0,0,1,NMAP,
372   NMAP,0,1,2,3,3,0,1,0,0,1,2,0,0,0,1,NMAP,NMAP};
373 int hntx[MAXSQ+1] = {
374   NMAP,0,1,2,3,3,0,1,0,0,1,2,0,0,0,1,NMAP,
375   NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,
376   NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP,NMAP};
377
378 int npam[450] = {
379 /*       A  C  G  T  U  R  Y  M  W  S  K  D  H  V  B  N  X  */
380          5,                                             /* A */
381         -4, 5,                                          /* C */
382         -4,-4, 5,                                       /* G */
383         -4,-4,-4, 5,                                    /* T */
384         -4,-4,-4, 5, 5,                                 /* U */
385          2,-1, 2,-1,-1, 2,                              /* R (A G)*/
386         -1, 2,-1, 2, 2,-2, 2,                           /* Y (C T)*/
387          2, 2,-1,-1,-1,-1,-1, 2,                        /* M (A C)*/
388          2,-1,-1, 2, 2, 1, 1, 1, 2,                     /* W (A T)*/
389         -1, 2, 2,-1,-1, 1, 1, 1,-1, 2,                  /* S (C G)*/
390         -1,-1, 2, 2, 2, 1, 1,-1, 1, 1, 2,               /* K (G T)*/
391          1,-2, 1, 1, 1, 1,-1,-1, 1,-1, 1, 1,            /* D (!C) */
392          1, 1,-2, 1, 1,-1, 1, 1, 1,-1,-1,-1, 1,         /* H (!G) */
393          1, 1, 1,-2,-2, 1,-1, 1,-1, 1,-1,-1,-1, 1,      /* V (!T) */
394         -2, 1, 1, 1, 1,-1, 1,-1,-1, 1, 1,-1,-1,-1, 1,   /* B (!A) */
395         -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* N */
396         -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}; /* X */
397 /*       A  C  G  T  U  R  Y  M  W  S  K  D  H  V  B  N  */
398
399 int *pam;                       /* Pam matrix- 1D */
400 int *pam12;
401 int *pam12x;
402 int pamh1[MAXSQ+1];             /* used for kfact replacement */
403
404 /* Robinson & Robinson counts */
405 long rrcounts[25] = {
406   0,
407   35155,
408   23105,
409   20212,
410   24161,
411   8669,
412   19208,
413   28354,
414   33229,
415   9906,
416   23161,
417   40625,
418   25872,
419   10101,
420   17367,
421   23435,
422   32070,
423   26311,
424   5990,
425   14488,
426   29012,
427   0, 0, 0, 0 };
428
429 long rrtotal = 450431;
430 #else
431
432 /* extern char sqnam[]; */
433 /* extern char sqtype[]; */
434 /* extern int gdelval, ggapval; */
435 extern int pamoff;
436 extern char aa[MAXSQ+1];
437 extern char aax[MAXSQ+1];
438 extern char nt[MAXSQ+1];
439 extern char ntx[MAXSQ+1];
440 extern char ntc[MAXSQ+1];
441 extern int gc_nt[MAXSQ+1];
442
443 extern  int naa;
444 extern  int naax;
445 extern  int nnt;
446 extern  int nntx;
447
448 extern  int haa[MAXSQ+1];
449 extern  int haax[MAXSQ+1];
450 extern  int hnt[MAXSQ+1];
451 extern  int hntx[MAXSQ+1];
452 /* extern  int had[MAXSQ+1]; */
453
454 extern  int apam250[450];
455 extern  int apam120[450];
456 extern  int a_md10[450];
457 extern  int a_md20[450];
458 extern  int a_md40[450];
459 extern  int abl50[450];
460 extern  int abl62[450];
461 extern  int abl80[450];
462 extern  int npam[450];
463 extern  int *pam;
464 extern  int *pam12;
465 extern  int *pam12x;
466 extern  int pamh1[MAXSQ+1];
467 extern  long rrcounts[25];
468 extern  long rrtotal;
469 #endif
470 #endif