Debian Codegraph @

src/dr/evomodel/substmodel/aminoacid/FLU.java

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