1 #include "esl_config.h"
2
3 #include "easel.h"
4 #include "esl_composition.h"
5
6
7 /* Function: esl_composition_BL62()
8 *
9 * Purpose: Sets <f> to the background frequencies used in
10 * \citep{Henikoff92} to calculate the BLOSUM62
11 * substitution matrix. Caller provides space in <f>
12 * allocated for at least 20 doubles. The entries are in
13 * alphabetic order A..Y, same as the standard Easel amino
14 * acid alphabet order.
15 *
16 * Returns: <eslOK> on success.
17 */
18 int
esl_composition_BL62(double * f)19 esl_composition_BL62(double *f)
20 {
21 f[0] = 0.074;
22 f[1] = 0.025;
23 f[2] = 0.054;
24 f[3] = 0.054;
25 f[4] = 0.047;
26 f[5] = 0.074;
27 f[6] = 0.026;
28 f[7] = 0.068;
29 f[8] = 0.058;
30 f[9] = 0.099;
31 f[10] = 0.025;
32 f[11] = 0.045;
33 f[12] = 0.039;
34 f[13] = 0.034;
35 f[14] = 0.052;
36 f[15] = 0.057;
37 f[16] = 0.051;
38 f[17] = 0.073;
39 f[18] = 0.013;
40 f[19] = 0.032;
41 return eslOK;
42 }
43
44 /* Function: esl_composition_WAG()
45 *
46 * Purpose: Sets <f> to the background frequencies used in
47 * \citep{WhelanGoldman01} to calculate the WAG rate
48 * matrix. Caller provides space in <f> allocated for at
49 * least 20 doubles. The entries are in alphabetic order
50 * A..Y, same as the standard Easel amino acid alphabet
51 * order.
52 *
53 * Returns: <eslOK> on success.
54 */
55 int
esl_composition_WAG(double * f)56 esl_composition_WAG(double *f)
57 {
58 f[0] = 0.086628; /* A */
59 f[1] = 0.019308; /* C */
60 f[2] = 0.057045; /* D */
61 f[3] = 0.058059; /* E */
62 f[4] = 0.038432; /* F */
63 f[5] = 0.083252; /* G */
64 f[6] = 0.024431; /* H */
65 f[7] = 0.048466; /* I */
66 f[8] = 0.062029; /* K */
67 f[9] = 0.086209; /* L */
68 f[10] = 0.019503; /* M */
69 f[11] = 0.039089; /* N */
70 f[12] = 0.045763; /* P */
71 f[13] = 0.036728; /* Q */
72 f[14] = 0.043972; /* R */
73 f[15] = 0.069518; /* S */
74 f[16] = 0.061013; /* T */
75 f[17] = 0.070896; /* V */
76 f[18] = 0.014386; /* W */
77 f[19] = 0.035274; /* Y */
78 return eslOK;
79 }
80
81 /* Function: esl_composition_SW34()
82 *
83 * Purpose: Sets <f> to the background frequencies observed in
84 * Swiss-Prot release 34 (21.2M residues). Caller provides
85 * space in <f> allocated for at least 20 doubles. The
86 * entries are in alphabetic order A..Y, same as the
87 * standard Easel amino acid alphabet order.
88 *
89 * Returns: <eslOK> on success.
90 */
91 int
esl_composition_SW34(double * f)92 esl_composition_SW34(double *f)
93 {
94 f[0] = 0.075520; /* A */
95 f[1] = 0.016973; /* C */
96 f[2] = 0.053029; /* D */
97 f[3] = 0.063204; /* E */
98 f[4] = 0.040762; /* F */
99 f[5] = 0.068448; /* G */
100 f[6] = 0.022406; /* H */
101 f[7] = 0.057284; /* I */
102 f[8] = 0.059398; /* K */
103 f[9] = 0.093399; /* L */
104 f[10] = 0.023569; /* M */
105 f[11] = 0.045293; /* N */
106 f[12] = 0.049262; /* P */
107 f[13] = 0.040231; /* Q */
108 f[14] = 0.051573; /* R */
109 f[15] = 0.072214; /* S */
110 f[16] = 0.057454; /* T */
111 f[17] = 0.065252; /* V */
112 f[18] = 0.012513; /* W */
113 f[19] = 0.031985; /* Y */
114 return eslOK;
115 }
116
117
118 /* Function: esl_composition_SW50()
119 *
120 * Purpose: Sets <f> to the background frequencies observed in
121 * Swiss-Prot release 50.8 (86.0M residues; Oct 2006).
122 *
123 * Returns: <eslOK> on success.
124 */
125 int
esl_composition_SW50(double * f)126 esl_composition_SW50(double *f)
127 {
128 f[0] = 0.0787945; /* A */
129 f[1] = 0.0151600; /* C */
130 f[2] = 0.0535222; /* D */
131 f[3] = 0.0668298; /* E */
132 f[4] = 0.0397062; /* F */
133 f[5] = 0.0695071; /* G */
134 f[6] = 0.0229198; /* H */
135 f[7] = 0.0590092; /* I */
136 f[8] = 0.0594422; /* K */
137 f[9] = 0.0963728; /* L */
138 f[10]= 0.0237718; /* M */
139 f[11]= 0.0414386; /* N */
140 f[12]= 0.0482904; /* P */
141 f[13]= 0.0395639; /* Q */
142 f[14]= 0.0540978; /* R */
143 f[15]= 0.0683364; /* S */
144 f[16]= 0.0540687; /* T */
145 f[17]= 0.0673417; /* V */
146 f[18]= 0.0114135; /* W */
147 f[19]= 0.0304133; /* Y */
148 return eslOK;
149 }
150
151