Debian Codegraph @

src/dr/oldevomodel/substmodel/FLU.java

raw symbols SCIP
1 /*
2 * FLU.java
3 *
4 * Copyright (c) 2002-2015 Alexei Drummond, Andrew Rambaut and Marc Suchard
5 *
6 * This file is part of BEAST.
7 * See the NOTICE file distributed with this work for additional
8 * information regarding copyright ownership and licensing.
9 *
10 * BEAST is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as
12 * published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * BEAST is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with BEAST; if not, write to the
22 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23 * Boston, MA 02110-1301 USA
24 */
25
26 package dr.oldevomodel.substmodel;
27
28 import dr.evolution.datatype.AminoAcids;
29 import dr.util.Author;
30 import dr.util.Citation;
31
32 import java.util.*;
33
34 /**
35 * FLU model of amino acid evolution (add reference).
36 *
37 * Cuong Cao Dang, Quang Si Le, Olivier Gascuel and Vinh Sy Le (2010)
38 * FLU, an amino acid substitution model for influenza proteins. BMC Evol Biol 10:99
39 *
40 * @version 08/01/2010
41 *
42 * @author Marc A. Suchard
43 * @author Yu-Nong Gong
44 */
45
46 public class FLU extends EmpiricalRateMatrix.AbstractAminoAcid {
47
48 public static final FLU INSTANCE = new FLU();
49
50 // The rates below are specified assuming that the amino acids are in this order:
51 // ARNDCQEGHILKMFPSTWYV
52 // but the AminoAcids dataType wants them in this order:
53 // ACDEFGHIKLMNPQRSTVWY
54 // This is solved by calling the setEmpiricalRates and setEmpiricalFrequencies methods
55
56 private FLU() { super("FLU");
57
58 int n = AminoAcids.INSTANCE.getStateCount();
59
60 double[][] rate = new double[n][n];
61
62 // Q matrix
63 rate[0][1] = 0.138659; rate[0][2] = 0.053367;
64 rate[0][3] = 0.584852; rate[0][4] = 0.026447;
65 rate[0][5] = 0.353754; rate[0][6] = 1.484235;
66 rate[0][7] = 1.132313; rate[0][8] = 0.214758;
67 rate[0][9] = 0.149927; rate[0][10] = 0.023117;
68 rate[0][11] = 0.474334; rate[0][12] = 0.058745;
69 rate[0][13] = 0.080491; rate[0][14] = 0.659311;
70 rate[0][15] = 3.011345; rate[0][16] = 5.418298;
71 rate[0][17] = 0.195966; rate[0][18] = 0.018289;
72 rate[0][19] = 3.532005;
73 rate[1][2] = 0.161001; rate[1][3] = 0.006772;
74 rate[1][4] = 0.167207; rate[1][5] = 3.292717;
75 rate[1][6] = 0.124898; rate[1][7] = 1.190624;
76 rate[1][8] = 1.879570; rate[1][9] = 0.246117;
77 rate[1][10] = 0.296046; rate[1][11] = 15.300097;
78 rate[1][12] = 0.890162; rate[1][13] = 0.016055;
79 rate[1][14] = 0.154027; rate[1][15] = 0.950138;
80 rate[1][16] = 0.183077; rate[1][17] = 1.369429;
81 rate[1][18] = 0.099855; rate[1][19] = 0.103964;
82
83 rate[2][3] = 7.737393; rate[2][4] = 0.000013;
84 rate[2][5] = 0.530643; rate[2][6] = 0.061652;
85 rate[2][7] = 0.322525; rate[2][8] = 1.387096;
86 rate[2][9] = 0.218572; rate[2][10] = 0.000836;
87 rate[2][11] = 2.646848; rate[2][12] = 0.005252;
88 rate[2][13] = 0.000836; rate[2][14] = 0.036442;
89 rate[2][15] = 3.881311; rate[2][16] = 2.140332;
90 rate[2][17] = 0.000536; rate[2][18] = 0.373102;
91 rate[2][19] = 0.010258;
92 rate[3][4] = 0.014132; rate[3][5] = 0.145469;
93 rate[3][6] = 5.370511; rate[3][7] = 1.934833;
94 rate[3][8] = 0.887571; rate[3][9] = 0.014086;
95 rate[3][10] = 0.005731; rate[3][11] = 0.290043;
96 rate[3][12] = 0.041763; rate[3][13] = 0.000001;
97 rate[3][14] = 0.188539; rate[3][15] = 0.338372;
98 rate[3][16] = 0.135481; rate[3][17] = 0.000015;
99 rate[3][18] = 0.525399; rate[3][19] = 0.297124;
100
101 rate[4][5] = 0.002547; rate[4][6] = 0.000000;
102 rate[4][7] = 0.116941; rate[4][8] = 0.021845;
103 rate[4][9] = 0.001112; rate[4][10] = 0.005614;
104 rate[4][11] = 0.000004; rate[4][12] = 0.111457;
105 rate[4][13] = 0.104054; rate[4][14] = 0.000000;
106 rate[4][15] = 0.336263; rate[4][16] = 0.011975;
107 rate[4][17] = 0.094107; rate[4][18] = 0.601692;
108 rate[4][19] = 0.054905;
109 rate[5][6] = 1.195629; rate[5][7] = 0.108051;
110 rate[5][8] = 5.330313; rate[5][9] = 0.028840;
111 rate[5][10] = 1.020367; rate[5][11] = 2.559587;
112 rate[5][12] = 0.190259; rate[5][13] = 0.032681;
113 rate[5][14] = 0.712770; rate[5][15] = 0.487822;
114 rate[5][16] = 0.602341; rate[5][17] = 0.044021;
115 rate[5][18] = 0.072206; rate[5][19] = 0.406698;
116
117 rate[6][7] = 1.593099; rate[6][8] = 0.256492;
118 rate[6][9] = 0.014211; rate[6][10] = 0.016500;
119 rate[6][11] = 3.881489; rate[6][12] = 0.313974;
120 rate[6][13] = 0.001004; rate[6][14] = 0.319559;
121 rate[6][15] = 0.307140; rate[6][16] = 0.280125;
122 rate[6][17] = 0.155245; rate[6][18] = 0.104093;
123 rate[6][19] = 0.285048;
124 rate[7][8] = 0.058775; rate[7][9] = 0.000016;
125 rate[7][10] = 0.006516; rate[7][11] = 0.264149;
126 rate[7][12] = 0.001500; rate[7][13] = 0.001237;
127 rate[7][14] = 0.038632; rate[7][15] = 1.585647;
128 rate[7][16] = 0.018808; rate[7][17] = 0.196486;
129 rate[7][18] = 0.074815; rate[7][19] = 0.337230;
130
131 rate[8][9] = 0.243190; rate[8][10] = 0.321612;
132 rate[8][11] = 0.347303; rate[8][12] = 0.001274;
133 rate[8][13] = 0.119029; rate[8][14] = 0.924467;
134 rate[8][15] = 0.580704; rate[8][16] = 0.368714;
135 rate[8][17] = 0.022373; rate[8][18] = 6.448954;
136 rate[8][19] = 0.098631;
137 rate[9][10] = 3.512072; rate[9][11] = 0.227708;
138 rate[9][12] = 9.017954; rate[9][13] = 1.463357;
139 rate[9][14] = 0.080543; rate[9][15] = 0.290381;
140 rate[9][16] = 2.904052; rate[9][17] = 0.032132;
141 rate[9][18] = 0.273934; rate[9][19] = 14.394052;
142
143 rate[10][11] = 0.129224; rate[10][12] = 6.746936;
144 rate[10][13] = 2.986800; rate[10][14] = 0.634309;
145 rate[10][15] = 0.570767; rate[10][16] = 0.044926;
146 rate[10][17] = 0.431278; rate[10][18] = 0.340058;
147 rate[10][19] = 0.890599;
148 rate[11][12] = 1.331292; rate[11][13] = 0.319896;
149 rate[11][14] = 0.195751; rate[11][15] = 0.283808;
150 rate[11][16] = 1.526964; rate[11][17] = 0.000050;
151 rate[11][18] = 0.012416; rate[11][19] = 0.073128;
152
153 rate[12][13] = 0.279911; rate[12][14] = 0.056869;
154 rate[12][15] = 0.007027; rate[12][16] = 2.031511;
155 rate[12][17] = 0.070460; rate[12][18] = 0.874272;
156 rate[12][19] = 4.904842;
157 rate[13][14] = 0.007132; rate[13][15] = 0.996686;
158 rate[13][16] = 0.000135; rate[13][17] = 0.814753;
159 rate[13][18] = 5.393924; rate[13][19] = 0.592588;
160
161 rate[14][15] = 2.087385; rate[14][16] = 0.542251;
162 rate[14][17] = 0.000431; rate[14][18] = 0.000182;
163 rate[14][19] = 0.058972;
164 rate[15][16] = 2.206860; rate[15][17] = 0.099836;
165 rate[15][18] = 0.392552; rate[15][19] = 0.088256;
166
167 rate[16][17] = 0.207066; rate[16][18] = 0.124898;
168 rate[16][19] = 0.654109;
169 rate[17][18] = 0.427755; rate[17][19] = 0.256900;
170
171 rate[18][19] = 0.167582;
172
173 setEmpiricalRates(rate, "ARNDCQEGHILKMFPSTWYV");
174
175 double[] f = new double[n];
176 f[0] = 0.0470718; // A
177 f[1] = 0.0509102; // R
178 f[2] = 0.0742143; // N
179 f[3] = 0.0478596; // D
180 f[4] = 0.0250216; // C
181 f[5] = 0.0333036; // Q
182 f[6] = 0.0545874; // E
183 f[7] = 0.0763734; // G
184 f[8] = 0.0199642; // H
185 f[9] = 0.0671336; // I
186 f[10] = 0.0714981; // L
187 f[11] = 0.0567845; // K
188 f[12] = 0.0181507; // M
189 f[13] = 0.0304961; // F
190 f[14] = 0.0506561; // P
191 f[15] = 0.0884091; // S
192 f[16] = 0.0743386; // T
193 f[17] = 0.0185237; // W
194 f[18] = 0.0314741; // Y
195 f[19] = 0.0632292; // V
196 setEmpiricalFrequencies(f, "ARNDCQEGHILKMFPSTWYV");
197 }
198
199 @Override
200 public Citation.Category getCategory() {
201 return Citation.Category.SUBSTITUTION_MODELS;
202 }
203
204 @Override
205 public String getDescription() {
206 return "FLU amino acid substitution model";
207 }
208
209 @Override
210 public List<Citation> getCitations() {
211 return Collections.singletonList(CITATION);
212 }
213
214 public static Citation CITATION = new Citation(
215 new Author[]{
216 new Author("CC", "Dang"),
217 new Author("QS", "Le"),
218 new Author("O", "Gascuel"),
219 new Author("VS", "Le")
220 },
221 "FLU, an amino acid substitution model for influenza proteins",
222 2010, "BMC Evolutionary Biology", 10, 99, -1
223 );
224 }