]> git.donarmstrong.com Git - paml.git/blob - doc/pamlHistory.txt
import paml4.8
[paml.git] / doc / pamlHistory.txt
1 History and bug fixes of PAML (Phylogenetic Analysis by Maximum Likelihood)\r
2 \r
3 Ziheng Yang\r
4 \r
5 \r
6 If you find problems or have questions, please visit the PAML\r
7 discussion site\r
8 https://groups.google.com/forum/#!forum/pamlsoftware.\r
9 \r
10 \r
11 \r
12 \r
13 Version 4.8a, August 2014\r
14 \r
15 (*) baseml (nhomo = 3 or 4).  I have added the nonhomogeneous GTR\r
16 (REV) model with a set of abcde parameters for every branch.  The\r
17 specifications are as follows.\r
18 \r
19 model=7 nhomo=4 fix_kappa=0: one set of rate parameters abcde in GTR for the whole tree.\r
20 model=7 nhomo=4 fix_kappa=1: one set of rate parameters abcde in GTR for every branch.\r
21 \r
22 In version 4.8, only the second option (one set of abcde parameters\r
23 for the whole tree) is implemented, no matter whether you choose 0 or\r
24 1 for fix_kappa.  After this change, the use of fix_kappa in the nhomo\r
25 models is consistent between HKY and GTR.  For HKY, the specifications\r
26 have always been as follows.\r
27 \r
28 model=4 nhomo=4 fix_kappa=0: one kappa in HKY for the whole tree.\r
29 model=4 nhomo=4 fix_kappa=1: one kappa in HKY for every branch.\r
30  \r
31 Note that nhomo=4 means one set of frequency parameters for every\r
32 branch on the tree.\r
33 \r
34 I have also added a method for calculating the expected number of\r
35 changes from any nucleotide i to nucleotide j along every branch under\r
36 the nonhomogeneous models (nhomo=3 or 4).  This accounts for the fact\r
37 that the base frequencies are changing over time, and so does the rate\r
38 of substitution.\r
39 \r
40 I tested only the nhomo=4 option carefully and the options nhomo=3 and\r
41 5 are not well tested.\r
42 \r
43 \r
44 \r
45 Version 4.8, March 2014\r
46 \r
47 (*) mcmctree.  The prior for rates for loci (with ndata = 2 or more)\r
48 has changed in this version, and the gamma-Dirichlet prior is used.\r
49 The old i.i.d. prior is replaced and unavailable anymore.  The new\r
50 gamma-Dirichlet prior is decribed in a paper \r
51 dos Reis M, Zhu T, Yang Z. 2014. The impact of the rate prior on\r
52 Bayesian estimation of divergence times with multiple loci. Syst\r
53 Biol. in press.\r
54 \r
55 (*) codeml.  Added a Bayesian method for estimating distance t and dN/dS\r
56 ratio w in pairwise comparisons.  The option is \r
57       runmode = -3  * -3: pairwise Bayesian\r
58       runmode = -3 1.1 1.1 1.1 2.2   * -3: pairwise Bayesian\r
59 The four numbers are the parameters in the gamma priors for t and w (a_t b_t a_w b_w).\r
60 The method is described in a manuscript\r
61 Angelis K, dos Reis M, Yang Z. 2014. Bayesian estimation of nonsynonymous/synonymous rate \r
62 ratios for pairwise sequence comparisons.  Mol Biol Evol.\r
63 \r
64 (*) baseml, codeml, mcmctree).  In version 4.7a, I disabled the option\r
65 of reading species indexes in the tree file (for example, the number\r
66 19, instead of the sequence name, may be used in the tree file to mean\r
67 the 19th sequence in the sequence alignment).  I have added this back.\r
68 Version 4.7 does not have this problem.\r
69 \r
70 (*) codeml in paml 4.6 and 4.7 has a bug if your sequences have stop\r
71 codons.  Stop codons have always been disallowed in the codon models\r
72 implemented in codeml.  In versions 4.6-4.7, if there is a stop codon\r
73 in any sequence, the codons in all sequences at that site (column in\r
74 alignment) are changed into ??? and then the sequences are processed\r
75 in the usual way.  The likelihood should then be the same as the\r
76 likelihood if that column is removed from the alignment.  However, the\r
77 implementation of the idea was incorrect and gives wrong results if\r
78 the sequences do not contain any ambiguity characters and if you\r
79 choose cleandata = 0.  I have now fixed this.  The idea is not really\r
80 useful, so the good advice is that you delete the column of stop\r
81 codons before the data are analyzed using codeml.\r
82  \r
83 \r
84 Version 4.7a, October 2013\r
85 \r
86 (*) codeml.  The mutation-selection model of Yang and Nielsen (2008)\r
87 is noted to work for the site and branch-site models but not for the\r
88 branch models.  This is now fixed.\r
89 \r
90 (*) mcmctree.  I fixed and modified the infinitesites program, which\r
91 generates the limiting distribution when the amount of sequence data\r
92 approaches infinity.  This works for both the clock (clock=1) and\r
93 relaxed clock models (clock=2 or 3).  The mcmctree tutorial explains\r
94 how to run this program.\r
95 \r
96 \r
97 Version 4.7, January 2013\r
98 \r
99 (*) mcmctree.  This version includes a method for dating divergences\r
100 using sampled tips, as in viral datasets.  The prior for node ages in\r
101 the given rooted tree is generated using a\r
102 birth-death-sequential-sampling model, described in Stadler and Yang\r
103 (2012 Syst Biol, submitted).  The SIV/HIV-2 example dataset analyzed\r
104 in the paper is in the examples/TipDate/ folder.  Look at the readme\r
105 file there.\r
106 \r
107 (*) codeml.  Version 4.6 crashes if you have a lot of ambiguity codons\r
108 in the alignment, or precisely if the total number of fully determined\r
109 codons (61 in the standard code) and the ambiguous codons exceed 127.\r
110 I was using "unsigned char" to represent the codons, which go from 0\r
111 to 255 and can represent 256 distinct codons.  Somehow I changed this\r
112 to "char", which on some systems goes from -128 to 127.  Can't\r
113 remember why I made the change.  Anyway this is now fixed.  Versions\r
114 4.5 or earlier do not have this problem.  Thanks to David Yu for\r
115 pointing out the problem.\r
116 \r
117 \r
118 \r
119 Version 4.6, September 2012\r
120 \r
121 (*) baseml. The model of autocorrelated-rates among sites (Yang 1995\r
122 Genetics 139:993-1005) is broken in paml versions 4.3 to 4.5\r
123 inclusive.  Earlier versions were apparently fine.  When you select\r
124 the auto-discrete-gamma model (alpha > 0, rho > 0) or the\r
125 nonparametric autocorrelated-rates model (fix_alpha = 0, ncatG = 3,\r
126 nparK = 4), the program aborts with the following error message:\r
127 \r
128 "Error: use 10, 20, 32, 64, 128, 512, 1024 for npoints for legendre.."\r
129 \r
130 This is now fixed.  The option of nparK = 3 seems to have problems in\r
131 all versions, and the program prints out the following warning\r
132 message.  \r
133 \r
134 "nparK==3, double stochastic, may not work.  Use nparK=4?"\r
135 \r
136 This option is supposed to fit a Markov-dependent model with equal\r
137 proportions in the rate categies.  I have not got time to investigate\r
138 this option, but a glance at table 3 in that paper indicates that this\r
139 model was not used in the table and probably never properly\r
140 implemented, so please follow the advice and use nparK = 4 instead.\r
141 \r
142 (*) codeml.  I have now added the site model M2a_rel of Weadick & Chang\r
143 (2012 Mol. Biol. Evol.), in which w2 > 0.  This is specified using\r
144 NSsites = 22 while model M2a is specified as NSsites = 2 (with w2 >\r
145 1).  M2a_rel is the null model for the likelihood ratio test based on\r
146 clade model C, suggested by Weadick & Chang (2012 Mol. Biol. Evol.).\r
147 Note that the very old site model M2 from Nielsen & Yang (1998\r
148 Genetics) assumes w0 = 0.  Yang, Wong, Nielsen (2005 MBE) changed the\r
149 model so that 0 < w0 < 1 and renamed the model M2a.  My tests using\r
150 the versions around that time reveals the following:\r
151 \r
152 3.13d (M2):  w0 = 0, w2 > 0\r
153 3.14a (M2a): w0 > 0, w2 >= 1\r
154 3.14b (M2a): w0 > 0, w2 >= 1\r
155 \r
156 If seems that when we changed M2 into M2a, we also changed the\r
157 constraint on w2.  I don't have a copy of version 3.14 to check.\r
158 \r
159 (*) basseml & codeml.  To following option\r
160     bootstrap = 1000\r
161 \r
162 should produce 1000 bootstrap samples in the file boot.txt.  A bug is\r
163 introduced in versions 4.4 and 4.5, so that garbiage is created\r
164 instead of bootstrap datasets.  Versions 4.3 and earlier were correct.\r
165 This bug is now fixed.\r
166 \r
167 (*) evolver.  The simulation of codon sequences (evolver 6\r
168 MCcodon.dat) is incorrect when a genetic code different from the\r
169 universal code is used.  This is a conceptual error I made and it has\r
170 been in all previous versions when simulation of codon sequences is\r
171 allowed.  I have assumed incorrectly that setting the frequencies of\r
172 stop codons to 0 should be sufficient to get correct results.  The\r
173 zero frequencies allow the program to identify the stop codons\r
174 correctly, but one still needs the code table to know which changes\r
175 are synonymous and which nonsynonymous.  evolver has been using the\r
176 universal code to simulate codon sequences.  Simulation using the\r
177 universal code has been correct, and simulation using the\r
178 mitochondrial code (for example) is affcted and the results should be\r
179 incorrect although the impact may be slight.  This bug is now fixed.\r
180 A variable is added in the control file MCcodon.dat right below the\r
181 codon frequencies, which tells the program which genetic code to use.\r
182 \r
183 1   * genetic code (0:universal; 1:mammalian mt; 2-10:see below)\r
184 \r
185 The program also checks that the stop codons have frequency 0 and that\r
186 the frequencies of the sense codons sum to 1.  Thanks to Mario dos\r
187 Reis for pointing this out.\r
188 \r
189 (*) mcmctree.  A bug is found in the calculation of the prior on rates\r
190 under the correlated-rates model (clock=3).  This bug has been in\r
191 version 4 (July 2007) to version 4.5 (December 2011), inclusive.  The\r
192 prior is calculated by multiplying the conditional densities of\r
193 equation (7) in Rannala & Yand (2007) over all interior nodes on the\r
194 master tree (see also Figure 1 in that paper).  However, the rA used\r
195 in the program was not for the current branch: it was instead for the\r
196 ancestral branch.  The correct formula used was correct for the root\r
197 of the master tree, but incorrect for other interior nodes.  The\r
198 impact of the bug on posterior time estimates may be expected to be\r
199 small, but if the clock is seriously violated and rates change over\r
200 neighboring branches, this may be a concern.\r
201 \r
202 \r
203 \r
204 Version 4.5, December 2011\r
205 \r
206 baseml.  I have added the joint ancestral reconstruction under the\r
207 nonhomogeneous models (nhomo = 3 or 4).  This works for the model of\r
208 one rate for all sites, and does not work for the model of gamma rates\r
209 for sites or the partition models.  Also I implemented the joint\r
210 reconstruction only and not the marginal reconstruction.\r
211 \r
212 mcmctree.  The program now prints out a file called FigTree.tre in the\r
213 current working directory that is readable by FigTree.  The branch\r
214 lengths show the posterior means of times while the bars generated by\r
215 FigTree will indicate the 95% CIs.  I have also added an option to\r
216 deal with TipDate data, such as viral sequences with dates.  See\r
217 examples/TipDate/README.txt for more notes.\r
218 \r
219 \r
220 \r
221 Version 4.4e, May 2011\r
222 \r
223 mcmctree.  I have added an option of automatically adjusting the step\r
224 lengths for proposals in the MCMC algorithm.  The program will use the\r
225 burn in to automatically adjust the step lengths, using those values\r
226 specified in the control file as initial values.\r
227 \r
228 codeml: The iteration method that updates one branch length at a time\r
229 (method = 1) is broken for the free-ratios model (model = 1) from\r
230 versions 4.3 to 4.4d inclusive.  When codeml runs, you will see\r
231 messages like the following on the screen: \r
232 Warning rounding error? b=3 cycle=0 lnL=6036.9413757 != 6070.1069284 \r
233 Version 4.2 and earlier are correct.  This bug is now fixed.  \r
234 Thanks to Tae-Kun Seo for reporting the bug.\r
235 \r
236 \r
237 \r
238 Version 4.4d, March 2011\r
239 \r
240 yn00.  The option of using weighting (weighting = 1) in the\r
241 calculation of dN and dS by the YN00 method (Yang and Nielsen 2000)\r
242 has been broken since Version 4.4 (February 2010).  A bug was\r
243 introduced when I changed the character coding in Version 4.4, so that\r
244 this bug affects Versions 4.4, 4.4a, 4.4b, and 4.4c.  The bug\r
245 typically causes a crash.  The result for weighting = 0 is not\r
246 affected.  Versions before 4.4 are correct.  This bug is now fixed.\r
247 Thanks for Charlie\r
248 (http://www.ucl.ac.uk/discussions/viewtopic.php?t=8726&highlight=yn00).\r
249 \r
250 \r
251 \r
252 Version 4.4c, August 2010\r
253 \r
254 mcmctree.  A bug causes the exotic calibrations (gamma, skew normal\r
255 and skew t) to be sometimes ignored, if you have multiple loci\r
256 (partitions) and if some species/sequences are missing at some loci.\r
257 If all calibrations are bounds (minimum, maximum, and joint), or if\r
258 the partitions have the same number of species/sequences, the\r
259 calculation is still correct.  This bug is in versions 4.1-4.4b.  This\r
260 is now fixed.  Thanks to Mike Steiper.\r
261 \r
262 \r
263 \r
264 Version 4.4b, July 2010\r
265 \r
266 mcmctree.  A serious bug has been discovered which affects the option\r
267 of approximate likelihood calculation (usedata = 2).  If the first\r
268 child of the root in the tree for any locus is a tip, the MLEs of\r
269 branch lengths in the in.BV file are assigned to wrong branches, so\r
270 that the results are entirely incorrect, and also very different from\r
271 those obtained using the exact likelihood calculation (usedata = 1).\r
272 Suppose the tree for a locus is (A, B), with a bifurcation at the\r
273 root, and with A and B representing species or clades.  If A is a tip,\r
274 the program is incorrect, while if A is an internal node, the program\r
275 is correct.  This bug is in versions 4.2b - 4.4a.  Hopefully this is\r
276 now corrected.  Thanks to Mario dos Reis.\r
277 \r
278 mcmctree.  I also changed the specification on L, U, and B bounds to\r
279 allow the user to specify the tail probabilities (which used to be\r
280 fixed at 2.5%) for each fossil calibration.  See table 8 in\r
281 pamlDOC.pdf for details.  You will still have to run the program\r
282 without data to get the effective prior of times used by the program.\r
283 \r
284 \r
285 \r
286 Version 4.4a, June 2010\r
287 \r
288 codeml (RateAncestor=1).  For ancestral reconstruction under codon\r
289 models, the program prints out the translated amino acids when it\r
290 prints the codons.  A bug caused the translation to be incorrect,\r
291 so instead of the amino acid, the program prints something like h or\r
292 H.  This bug was introduced in Version 4.4, February 2010 when I\r
293 changed the way that the characters are coded.  This is fixed now.\r
294 \r
295 baseml (clock = 1, 2, or 3 Mgene option).  If you assign different\r
296 rates for different genes (or site parations) and the model assumes\r
297 global clock or local clock, the program fails to print out the\r
298 relative rates for genes.  This bug seems to be introduced between\r
299 3.13 and 3.14 and has since.  The log likelihood value and estimates\r
300 of parameters are all correct, and the problem is only that MLEs of\r
301 rates for genes are not printed in the output file properly.\r
302 \r
303 \r
304 \r
305 Version 4.4a, April 2010\r
306 \r
307 In versions 4.2, 4.3, 4.4, Clade model D does not print the w\r
308 estimates for the site classes correctly.  For the example run in\r
309 examples/datasets2/, the incorrect output looks like the following\r
310 \r
311 site class             0         1         2\r
312 proportion        0.48590   0.10718   0.40692\r
313 branch type 0:    0.10557   4.17186   4.17186\r
314 branch type 1:    0.10557   4.17186   3.05340\r
315 \r
316 while the correct results (from version 4.1) are \r
317 \r
318 site class         0         1         2\r
319 proportion       0.48590  0.10718  0.40692\r
320 background w     0.10557  4.17186  3.05340\r
321 foreground w     0.10557  4.17186  0.95081\r
322 \r
323 The ratios w2 and w3 for site class 2 are incorrectly printed, with w2\r
324 equal to w1.  The branch lengths and lnL values etc. are all correct.\r
325 This bug affects versions 4.2, 4.3, and 4.4, and version 4.1 and\r
326 earlier versions appear to be correct.  Also the bug affects clade\r
327 model D, and clade model C appears to be fine.  This is fixed now.\r
328 Thanks to cajawe for reporting the bug (see\r
329 http://www.ucl.ac.uk/discussions/viewtopic.php?p=28240#28240).\r
330 \r
331 \r
332 \r
333 Version 4.4, February 2010\r
334 \r
335 I changed the way that the characters are coded in the programs, which\r
336 means that essentially every program in the package is modified.  It\r
337 is likely that some bugs are introduced during the process.  \r
338 \r
339 codeml.  The iteration algorithm specified by method = 1 when applied\r
340 to amino acid model of gamma rates among sites (seqtype = 2, alpha >\r
341 0, method = 1) is broken in versions 4.2-4.3b.  The bug causes the\r
342 iteration to fail to converge, with messages like the following\r
343 printed on the monitor: \r
344 "Warning rounding error? b=5 cycle=0 lnL=1718.5667685 != 1749.4724545".\r
345 \r
346 mcmctree.  If the gamma prior for rates has alpha <1/3, the initial\r
347 values are generated incorrectly.  This is now fixed.\r
348 \r
349 \r
350 \r
351 Version 4.3b, November 2009\r
352 \r
353 mcmctree.  A bug was introduced in version 4.2, which causes the\r
354 program to ignore the minimum age constraint on the root age and uses\r
355 the maximum bound specified by RootAge in the control file, if there\r
356 is a calibration on the root and it is a minimum-age constraint.  If\r
357 you have no calibration on the root, or if the calibration is an\r
358 maximum bound, both minimum and maximum bound or gamma distribution,\r
359 there is no problem.  The error affects versions 4.2 and 4.3, and\r
360 version 4.1 is correct.  This is now fixed.  Thanks to Mathieu\r
361 Groussin.\r
362 \r
363 evolver.  I have now added back the option of printing out the site\r
364 pattern counts instead of the sequences (specified at the beginning of\r
365 the control file such as MCbase.dat).  Use of pattern counts takes\r
366 less disk space.  The option was removed in version 4.2b after the\r
367 algorithm for collaspsing sites into patterns was rewritten.\r
368 \r
369 \r
370 \r
371 Version 4.3a, October 2009\r
372 \r
373 mcmctree.  A bug was introduced in version 4.3, which causes the root\r
374 age to be proposed incorrectly.  The effect of the bug appears to be\r
375 subtle and is hard to assess.  It means that the results from all\r
376 three clock models (clock = 0, 1, 2) are incorrect.  Here is a bit more\r
377 detail about the bug.  The internal maximum node age was set too high,\r
378 and caused loss of significant digits in a smart reflection algorithm\r
379 which reflects proposed values into the feasible interval.  This\r
380 update fixes the bug.  Please use this version to reanalyze your data\r
381 if you have used version 4.3.  Version 4.2 does not have this bug.\r
382 \r
383 mcmctree.  I now supplies compiling options so that you can use hard\r
384 minimum hard maximum, or hard minimum soft maximum.  The executables\r
385 are called mcmctreeHH and mcmctreeHS.  See the commands for compiling\r
386 at the beginning of the file mcmctree.c.\r
387 \r
388 \r
389 \r
390 Version 4.3, August 2009\r
391 \r
392 mcmctree.  The approximate likelihood calculation was unreliable,\r
393 because the Hessian matrix was not calculated reliably, especially if\r
394 the maximum likelihood estimates of some branch lengths are 0.  I have\r
395 now implemented the approach of Seo, Kishino and Thorne (2004), which\r
396 appears to be more stable.\r
397 \r
398 baseml & codeml: I changed these two programs to read fasta alignments\r
399 directly, working out the number of sequences and the sequence length\r
400 automatically.  However, this does not work when you have multiple\r
401 alignments in one file, that is, if ndata = 2 or higher.\r
402 \r
403 \r
404 \r
405 Version 4.2b, April 2009\r
406 \r
407 mcmctree. There is a bug that leads to crash when usedata = 3 and when\r
408 the data at some loci have ambiguity characters while other loci do\r
409 not.  usedata = 3 means that the program invokes baseml or codeml to\r
410 calculate the maximum likelihood estimates (MLEs) of branch lengths\r
411 and the variances of those MLEs.  The temporary sequence alignment\r
412 files for the loci (tmp?.txt) generated by mcmctree have garbiage and\r
413 are unreadable by baseml (or codeml).  This bug is now corrected.\r
414 (You can replace the wrong alignment file for the locus by your\r
415 original alignment and run baseml outside mcmctree.)\r
416 \r
417 \r
418 All programs.  I rewrote the code for collapsing sites into patterns.\r
419 This should have no impact on user files, except that evolver does not\r
420 produce data files in the "pattern-count" format anymore.  Now two\r
421 formats (paml/phylip format and PAUP nexus format) are used, specified\r
422 by the first line of the control data file (e.g., MCbase.dat,\r
423 MCcodon.dat, MCaa.dat).  This pattern-count format is still accepted\r
424 as input by baseml, codeml, etc. (See the section on "Site pattern\r
425 counts" in the documentation).\r
426 \r
427 baseml & codeml.  A bug was introduced to the local clock model\r
428 (clock=6), so that the program generates the following error message:\r
429 "need fossils for this locus".  For example, running codeml on the\r
430 control file /examples/MouseLemurs/codonml2.ctl will do so.  This bug\r
431 is now fixed.\r
432 \r
433 codeml: The bug introduced in version 4.2 concerning the free-ratios\r
434 model (Yang 1998 MBE) was not fixed properly in version 4.2a (see the\r
435 notes for 4.2a below).  The results are incorrect when there are\r
436 exactly 7 branch types (for example when you run the free-ratios model\r
437 on a 5-species tree) but are correct for other numbers of branch\r
438 types.  I hope this is now finally fixed.\r
439 \r
440 \r
441 \r
442 Version 4.2a, February 2009\r
443 \r
444 \r
445 codeml: Two bugs were known to have been introduced in version 4.2\r
446 when I rewrote the code for the branch-site and clade models.  The\r
447 first is the null hypothesis in the branch-site test (model = 2\r
448 NSsites = 2, fix_omega = 1 omega = 1).  The reference for this model\r
449 is Yang, Wong & Nielsen (2005), and Zhang et al. (2005).  The\r
450 alternative model (fix_omega = 0) is fine.\r
451 \r
452 The second bug is in the free-ratios model (Yang 1998 MBE).\r
453 \r
454 The results from those two models are incorrect and should be ignored\r
455 if you used version 4.2.  Both mistakes are fixed in this update.\r
456 \r
457 Thanks to W.P. Zhou and BYLee.\r
458 \r
459 \r
460 \r
461 Version 4.2, December 2008\r
462 \r
463 MCMCtree: The implementation of the lower bound and of the upper bound\r
464 is changed.  The improper density of equation (15) of Yang and Rannala\r
465 (2006) for the lower bound is noted to push up divergence times, a\r
466 feature we consider undesirable.  Now a truncated Cauchy distribution\r
467 is used instead.  This will be described in more detail somewhere.\r
468 \r
469 The default file name for the MCMC samples is mcmc.out.  To change\r
470 this, add the following line in the control file mcmctree.ctl:\r
471       mcmcfile = mcmc.out \r
472 \r
473 codeml: Clade models C and D are extended to accommodate more than two\r
474 branch types.  The old models accept two branch types only, referred\r
475 to as foreground and background branches.  The structure of the new\r
476 models are below.  You use branch/node numbers to specify the branch\r
477 types (with #0 to be the default, followed by #1, #2, #3, ...).  As\r
478 before, the BEB calculation is implemented for clade model C only, and\r
479 is not available for clade model D.  The BEB calculation is expensive,\r
480 so I expect clade model C will work if you have only a few branch\r
481 types.  For each additional branch type, the BEB computation is 10\r
482 times more expensive.\r
483 \r
484 Site class   Proportion    w ratio\r
485 \r
486   0             p0         0 < w0 < 1\r
487   1             p1         w1 (w1 = 1 is fixed in model C)\r
488   2             p2         w2, w3, w4, ...\r
489 \r
490 I also added an option of fixing the last w to 1 in clade model C,\r
491 specified in the control file as follows.  For example, if there are\r
492 three branch types in the tree (see the table above), the last w fixed\r
493 will be w4.\r
494 \r
495        fix_omega = 1\r
496        omega = 1\r
497 \r
498 The two versions of the clade model can be compared to test whether\r
499 the last w is > 1.\r
500 \r
501 \r
502 codeml: branch model with amino acid chemical properties, specified\r
503 using model = 2 and aaDist = 7.  Under this model, the types of\r
504 branches are specified just like the branch model (by labelling\r
505 branches).  For each branch type, the program estimates a few w's,\r
506 depending on specifications in the file OmegaAA.dat.  This model seems\r
507 to be broken for a long time since its implementation.  Look at the\r
508 readme.txt file in examples/mtCDNAape/.\r
509 \r
510 \r
511 \r
512 Version 4.1, August 2008\r
513 \r
514 MCMCtree: A few changes have been introduced to this program.  The\r
515 format for specifying fossil calibrations in the tree file has been\r
516 changed, so that the gamma distribution is specified as 'G(alpha,\r
517 beta)' and the old format '>0.6=0.7<0.8' does not work anymore.  The\r
518 bounds can be specified using either the old form '<0.8' or the new\r
519 form 'U(0.8)'.  Two exotic distributions, skew normal and skew t, are\r
520 added, using the format 'SN(location, scale, shape)' and 'ST(location,\r
521 scale, shape, df)'.  I edited the documentation pamlDOC.pdf and\r
522 rewrote the part for mcmctree.  The format of the MCMC output file\r
523 mcmc.out has been modified so that it is readable by Andrew Rambaut's\r
524 Tracer program.  Note that MCMCtree starts taking samples and writing\r
525 into the file only after burnin.\r
526 \r
527 codeml. The mutation-selection models of Yang and Nielsen (2008\r
528 Mol. Biol. Evol. 25, 568-579) are specified using the options\r
529 \r
530     CodonFreq = 6 or 7  * 6:FMutSel0, 7:FMutSel\r
531       estFreq = 1\r
532 \r
533 Use examples/mtCDNAape/codeml.HC.ctl to duplicate results in table 1\r
534 in the paper.  It seems that some results are in the mlc file while\r
535 some other results are in the rst and rst1 files.\r
536 \r
537 \r
538 codeml (branch model): When codon sequences are analyzed under the\r
539 branch model (model = 1 or 2, NSsites = 0), the main output file\r
540 includes a tree under the line "w ratios as labels for TreeView:".\r
541 This line was introduced in version 3.15.  However, the branch lengths\r
542 in the tree had the dN values, while I intended them to be the\r
543 original branch lengths (which are t, the number of nucleotide\r
544 substitutions per codon).  This bug may also affect the results of\r
545 ancestral reconstruction under the same branch model.  This bug is\r
546 fixed now.\r
547 \r
548 \r
549 baseml and codeml (discrete-gamma model): My intention has been to use\r
550 the mean and not the median to represent all rates in each category\r
551 when the discrete-gamma model is implemented.  See Yang (1994\r
552 J. Mol. Evol. 39:306-314) for the distinction.  However, a bug caused\r
553 a few recent versions to use the median instead.  This affects baseml\r
554 versions 3.14c and 3.15, while version 3.14b or earlier and version 4\r
555 or later are correct.  codeml in version 4a & 4b were incorrect while\r
556 other versions are correct.  I hope both baseml and codeml are correct\r
557 from version 4c.\r
558 \r
559 \r
560 baseml and codeml (branch and clade labels): The local clock models\r
561 (clock = 2) in the two programs and also the branch or branch-site\r
562 models in codeml use labels to identify branches.  When nested clade\r
563 label ($) are used, the program may get confused so that the branches\r
564 are not labeled correctly.  I think this is not fixed in version 4c.\r
565 \r
566 \r
567 Version 4b, January 2008\r
568 \r
569 mcmctree.  Changed a variable name in the control file from MaxRootAge\r
570 to RootAge.  This should be specified in any of the following formats: \r
571 \r
572        RootAge = <1.0  * constraint on root age, used if no fossil for root.\r
573        RootAge = '<1.0'  * constraint on root age, used if no fossil for root.\r
574        RootAge = <1.0>0.8  * constraint on root age, used if no fossil for root.\r
575        RootAge = '<1.0>0.8'  * constraint on root age, used if no fossil for root.\r
576 \r
577 Added some text around the output, to make the results more comprehensible.\r
578 \r
579 evolver (option 8).  option 8 for calculating bipartition distances\r
580 between trees is broken.  I changed the program to prepare for a\r
581 figure and forgot to remove the changes afterwards.  This is now\r
582 fixed.\r
583 \r
584 \r
585 Version 4, July 2007\r
586 \r
587 mcmctree.  The MCMC algorithm of Rannala and Yang (2007) dealing with\r
588 rate drift is added.  The section of manual on mcmctree is now\r
589 rewritten.  An example data set is included in the\r
590 examples/DatingSoftBound/ folder.\r
591 \r
592 codeml. This now implements the mutation-selection models of codon\r
593 substitution of Yang and Nielsen (2008).  I should include more\r
594 details after the models are better tested, for example, after the\r
595 paper is written.\r
596 \r
597 baseml.  The log likelihood under the gamma-rates model (that is, when\r
598 alpha > 0 in the control file) is not calculated correctly, or not as\r
599 intended.  Version 3.14a is correct, but versions 3.14c and 3.15 are\r
600 incorrect.  I am not sure about version 3.14b, as I have not kept a\r
601 copy.  The bug causes the median to be used to represent all rates in\r
602 each category of the discre-gamma model whereas the mean was intended.\r
603 See the discussion around equation (10) and the paragraph below it in\r
604 Yang (1994. J. Mol. Evol. 39:306-314).  The bug is not expected to\r
605 have much effect on tree topologies or branch lengths.  Thanks to\r
606 Simon Whelan for reporting the bug.\r
607 \r
608 \r
609 \r
610 Version 3.15, March 2006\r
611 \r
612 evolverNSbranches (simulation program to generate data under the\r
613 branch models of codon substitution).  A bug was introduced after\r
614 version 3.14a so that versions 3.14b (?), 3.14c, and 3.15 have a bug\r
615 that makes the program abort prematurely.  This is now corrected.\r
616 Thanks to N. Clark for reporting the bug.\r
617 \r
618 \r
619 Version 3.15, January 2006\r
620 \r
621 evolver.  The simulation option of the evolver program in version\r
622 3.14b (?), 3.14c, and 3.15 has a serious bug that makes the program\r
623 generate nonsensible sequences when the user tree has 0 internal\r
624 branch lengths.  The bug was introduced between versions 3.14a (which\r
625 is correct) and 3.14c (which is wrong).  I don't seem to have kept\r
626 3.14b to check whether it is in error.  In this case, the smart idea\r
627 that led to the bug was the thought that no evolution occurs if the\r
628 branch length is 0 (or less than 1e-20, to be more precise).  If the\r
629 branch length is 0, there is no need to evolve the sequence along the\r
630 branch, so I decided to copy the sequence at the start of the branch\r
631 to the node at the end of the branch.  This would be fine, except that\r
632 I introduced a bug at the same time that caused the program to skip\r
633 generating sequences at all nodes that are descendents of the\r
634 zero-length branch.  As a result, sequences at tips that are\r
635 descendents of the zero-length branch have no data.  On some systems\r
636 the uninitialized space is initialized as 0, and then the sequences\r
637 will be printed out as consisting of all Ts (T is the first nucleotide\r
638 in my program).\r
639 \r
640 \r
641 At the same time, I also turned on the option of simulating data on\r
642 random trees in evolver.  You change fixtree=1 into 0, and recompile.\r
643 Then use MCbaseRandomTree.dat to simulate data instead of MCbase.dat:\r
644 \r
645     evolver 5 MCbaseRandomTree.dat\r
646 \r
647 \r
648 \r
649 Version 3.15,  November 2005\r
650 \r
651 mcmctree: This implements the MCMC algorithm of Yang and Rannala (2005\r
652 MBE) for estimating species divergence times using soft bounds.  The\r
653 example file is in examples/SoftBound/.  Look at the readme file and\r
654 see whether you can duplicate our results in the paper.  Note that\r
655 this program works with DNA sequence data only, and assumes the\r
656 molecular clock (clock = 1).  Note that assumption of the clock can\r
657 lead to seriously biased results if the clock is violated.  Work is\r
658 under way to relax the clock assumption.  \r
659 \r
660 yn00: Added three methods for estimating dS and dN: LWL85 (Li, Wu &\r
661 Luo 1985), LPB93 (Li 1993; Pamilo and Bianchi 1993), and LWL85m (Yang\r
662 2006 Computaional Molecular Evolution, Oxford University Press.  Eqs.\r
663 2.12 & 2.13).\r
664 \r
665 codonml.  Added example files for clade model C, in folder\r
666 examples/CladeModelC.  Thanks for Joe Bielawski for preparing these.\r
667 \r
668 Added a sequence data format, in which the numbers or frequencies of\r
669 site patterns are inputed instead of the sequences.  The format is\r
670 indicated by the option variable P on the first line of the data file,\r
671 used in the same way as option variables I (for interleaved format)\r
672 and S (for sequential format, which is the default).  See the section\r
673 on sequence data format in the paml documentation for details.  The\r
674 old control variable readpattf for baseml and codeml is now deleted.\r
675 You can also use evolver to simulate data using this format.  Look at\r
676 the control files MCbase.dat, MCcodon.dat, and MCaa.dat.  This format\r
677 is useful for very large data sets with >1M sites, when collapsing\r
678 sites into patterns can take a long time.  \r
679 \r
680 \r
681 \r
682 Version 3.14b, May 2005\r
683 \r
684 pamp crashes when there are more than 127 or 255 (depending on the\r
685 system) species in the data.  The bug is due to my declaration of the\r
686 variable visit[] in the routine PathwayMP1 in pamp.c as char rather\r
687 than int.  Another problem is that the formula used to calculate\r
688 distances under REV (GTR) is sometimes inapplicable and the program\r
689 prints out messages like "err: DistanceREV".  I introduced some ad hoc\r
690 way of dealing with the problem.\r
691 \r
692 \r
693 \r
694 Version 3.14b, April 2005\r
695 \r
696 aaml (codeml with seqtype = 2): \r
697 \r
698 Under the REV model (model = 9), codeml failed to print out the\r
699 estimated amino acid substitution rate matrix.  This is fixed.\r
700 \r
701 \r
702 aaml (codeml with seqtype = 2 or 3):\r
703 \r
704 If you have multiple data sets (ndata > 1) and analysing protein data\r
705 sets under the empirical models such as wag, jtt, dayhoff.  The\r
706 results for the first data set are correct, but all later data sets\r
707 are analyzed incorrectly under the corresponding +F models, that is,\r
708 wag+F, jtt+F, dayhoff+F.  A bug in the program means that for the\r
709 second and later data sets, the equilibrium amino acid frequencies are\r
710 from the real data and not correctly set to those specified by the\r
711 empirical models.  Thanks to Ben Evans.\r
712 \r
713 \r
714 Version 3.14b, February 2005\r
715 \r
716 codonml and aaml:\r
717 \r
718 There is a bug that affects the joint reconstruction of ancestral\r
719 sequences when some branch lengths are equal to each other and when\r
720 those branches are visited one after the other in the program.  For\r
721 example, if some branch lengths are estimated to be 0, such a problem\r
722 might occur.  I think this bug is in the program for a long time,\r
723 although I note that joint ancestral reconstruction is turned off in\r
724 some versions for other reasons.  The marginal reconstruction is not\r
725 affected by this bug.  The update fixes this bug.\r
726 \r
727 \r
728 baseml and codeml:\r
729 \r
730 The program crashes on some systems for the local clock models (clock\r
731 = 5 and 6) after the calculation is finished.  If you manage to run\r
732 the model, the results should be fine.  There are bugs in the program\r
733 when freeing memory at the end of the calculation.  They are fixed in\r
734 this update.  See the discussion site at\r
735 \r
736 http://www.rannala.org/phpBB2/viewtopic.php?t=228\r
737 \r
738 Thanks to fjvera.\r
739 \r
740 \r
741 \r
742 Version 3.14a, December 2004\r
743 \r
744 codonml (codeml for codons):\r
745 \r
746 The mechanisctic amino acid substitution models (table 3 in Yang et\r
747 al. 1998 MBBE 15: 1600-1611) appear to be broken in paml/codeml\r
748 versions 3.13 and 3.14.  They were correct in version 3.12.  This is\r
749 now fixed.  If you use those models, please run the examples in the\r
750 folder examples/mtCDNA/ and compare results with those published in\r
751 the paper to confirm the program.  The results in the paper are\r
752 correct, but the program implementation may be broken due to lack of\r
753 maintenance.\r
754 \r
755 codonml (codeml for codons)\r
756 \r
757 When you fit the branch models with three or more branch types (omega\r
758 ratios), the program aborts with an error message saying that only two\r
759 omega ratios are allowed.  This is due to a bug in the program and is\r
760 now fixed.\r
761 \r
762 \r
763 Version 3.14, September 2004\r
764 \r
765 \r
766 1. codonml (codeml for codons): \r
767 \r
768 (1a) NSsites models M1 (neutral), M2 (selection), and M8 (beta& ) have\r
769 been changed.  The references are two manuscripts that are not yet\r
770 published (Wong, Yang, Goldman & Nielsen, 2004 Genetics 168:\r
771 1041-1051; Yang, Wong, and Nielsen 2005 MBE).  The details are as in the\r
772 following table.\r
773 \r
774 [table missing or never written.]\r
775 \r
776 The old models M1 and M2 are noted to be rather unrealistic as they do\r
777 not account for sites with 0 < w0 < 1.  Thus in the new models 0 < w0 < 1\r
778 is estimated from the data.  Also insisting on a class of sites with 0\r
779 = 1 appears to help avoid false positives as sites under weak\r
780 selection will be absorbed in this neutral class rather than being\r
781 claimed to be under positive selection.  Under M8, the constraint s >\r
782 1 is now automatically enforced to help avoid multiple local peaks and\r
783 also to make the model a positive-selection model.  Note that the\r
784 newer models replace the old ones, which are available in older\r
785 versions of paml/codeml only.\r
786 \r
787 After the changes, the models are nested as follows: M0 (one ratio) <\r
788 M1a (NearlyNeutral) < M2a (PositiveSelection) < M3 (discrete), and M7\r
789 (beta) < M8 (beta& ), where "<" means the model on the left is a\r
790 special case of the model on the right:.  Two LRTs can be constructed\r
791 using those models.  The first one compares M1a against M2a, using a\r
792 chi square with df 2, and the second one compares M7 against M8, using\r
793 a chi square with d.f. = 2.\r
794 \r
795 (1b) Similarly branch-site model A (Yang and Nielsen 2002) is changed.\r
796 The old model assumes 0 = 0 and is unrealistic.  This is replaced by 0\r
797 < 0 < 1, estimated from the data.  The new model is still called\r
798 branch-site model A.  It can be compared with the new M1a\r
799 (NearlyNeutral) to form a likelihood ratio test, with d.f.  2.  This\r
800 is called test 1.  Another test, called test 2, uses a null model A\r
801 but with 2 = 1 fixed (use fix_omega = 1 and omega = 1).  Test 2 is\r
802 very conservative, but test 1 might mistake relaxed selective\r
803 constraint on the foreground branch as positive selection.\r
804 \r
805 \r
806 (1c) Similarly the clade model C ( see also Forsberg and Christiansen\r
807 2003; Bielawski and Yang 2004) is changed as follows.  The new model C\r
808 replaces 0 = 0 by 0 < 0 < 1 and has five parameters in the\r
809 distribution: p0, p1, 0, 2, and 3.  The new model C can be compared\r
810 with the new M1a (NearlyNeutral), with d.f.  3.\r
811 \r
812 (1d) The empirical Bayes procedure for calculating posterior\r
813 probabilities of site classes under the site models, branch-site\r
814 models, and clade models are called naïve empirical Bayes (NEB).  They\r
815 are naïve because they use the MLEs of parameters without accounting\r
816 for sampling errors in them.  This problem is now fixed using a\r
817 procedure called Bayes empirical Bayes (BEB) (Yang, Wong, and Nielsen\r
818 2005).  The BEB procedure is implemented for the site models M2a and\r
819 M8, the (modified) branch-site model A, and the (modified) clade model\r
820 C.  The old NEB calculation is kept in the output and the new BEB\r
821 results follow the NEB result.  Perhaps I will remove the NEB\r
822 calculation in later versions.\r
823 \r
824 \r
825 baseml/codeml: rewrote likelihood clock and local clock models.\r
826 Implemented models for combined analysis of multiple genes\r
827 incorporating multiple calibration points (Yang and Yoder 2003).  The\r
828 ad hoc rate smoothing procedure of Yang (2004) is implemented for\r
829 nucleotide, amino acid, and codon substitution models, and the\r
830 implementation also deals with missing species at some loci.  The\r
831 option variable clock in the control files is now used differently\r
832 from before.  See later in this documentation and also the readme and\r
833 readme2 files in the folder examples/MouseLemurs/.\r
834 \r
835 baseml/codeml local clock models.  clock = 5 and 6 are added in\r
836 3.14beta5.\r
837 \r
838 codeml: added branch-site models C and D (Bielawski and Yang in press).\r
839 \r
840 mcmctree: this program is disabled in this release.  The old program\r
841 died and the new program is still under construction.\r
842 \r
843 The main body of this documentation may not be up to date. \r
844 \r
845 \r
846 \r
847 Bug fixes and minor corrections\r
848 \r
849 \r
850 baseml/codeml.  The output in the file rates under the gamma model\r
851 lists inferred rate for each site.  The output is incorrect if the\r
852 tree is large and scaling is used to avoid underflow.  The use of\r
853 scaling is indicated by two lines of output on the monitor like the\r
854 following:\r
855 \r
856 "2 node(s) used for scaling (Yang 2000 J Mol Evol 51:423-432):\r
857  155 350".  \r
858 \r
859 The results are clearly wrong as the probabilities are much greater\r
860 than 1, and the rates are many orders of magnitude too large, etc.\r
861 Also under the same problematic condition the expected numbers of\r
862 sites with certain site patterns in the file lnf are incorrect.  When\r
863 scaling is not used, the results should be o.k. and look reasonable.\r
864 This affects versions 3.13 and 3.14beta1-3.  This is fixed in version\r
865 3.14.  Thanks for Nick Goldman for pointing out the error.\r
866 \r
867 yn00.  The program crashes for large datasets with many codons due to\r
868 a memory allocation error.  This affects versions 3.13 and some\r
869 versions of 3.14beta1.  The problem is fixed in version 3.14.\r
870 \r
871 aaml (codeml for amino acids).  Model REVaa_0 is broken due to lack of\r
872 maintenance in versions 3.1, 3.11, 3,12, 3,13, and 3,14beta1-4.  It\r
873 seems to be working in version 3.  This is fixed in 3.14beta5.  2\r
874 April 2004.\r
875 \r
876 codonml (codeml for codons) in branch-site models (model = 2 NSsites =\r
877 2 or 3) prior to 3.14beta3 have a scaling problem, which makes the\r
878 length of the foreground branch to be incorrectly estimated.  Other\r
879 branch lengths and substitution parameters, such as the parameters in\r
880 the distribution, are corrected calculated, as well as the log\r
881 likelihood values and the posterior probabilities.  27 March 2004\r
882 \r
883 pamp: The gamma parameter for variable rates among sites using the\r
884 method of Yang & Kumar (1996) is not estimated correctly in 3.14beta1,\r
885 beta2, beta3.  Versions 3.13d and earlier seem fine.\r
886 \r
887 codonml (codeml for codons) in version 3.14beta and 3.14beta1 does not\r
888 work when fix_omega = 1 is used for branch models.  The results are\r
889 incorrect.  Please use newer versions 3.14beta3 or later.  Also\r
890 version 3.13 is fine.\r
891 \r
892 baseml: Models TN93 and REV are wrong when used with Mgene = 3 or 4.\r
893 This seems correct in version 3.12 but went wrong in 3.13 and 3.14\r
894 since I inserted TN92 between HKY85 and TN93.  Thanks for Lee Bofkin\r
895 for reporting the error.\r
896 \r
897 codonml (codeml for codons): When codon models are used to reconstruct\r
898 ancestral sequences (with RateAncestor = 1), the program lists\r
899 synonymous and nonsynonymous changes at each site under the heading\r
900 "Changes at sites (syn nonsyn)."  This listing is incorrect due to a\r
901 bug in the program.  This bug affects versions 3.12, 3.13 and 3.14,\r
902 and version 3.11 seems correct.  Thanks to Joe Bielawski.\r
903 \r
904 baseml/codeml: The SE's for divergence times under the clock models\r
905 are calculated incorrectly.  This happens when you use clock = 1 or 2,\r
906 supply fossil date to calculate absolute times, and request standard\r
907 errors for times.  The estimates of times themselves are correct, but\r
908 standard errors for times are wrong.  The SEs for times and for the\r
909 rate under the TipDate model (clock = 3) are wrong as well.  The\r
910 programs print out the variances after the +-, instead of their square\r
911 roots.  This error was introduced in version 3.13.  Versions prior to\r
912 3.13 are correct.  I posted an update 3.13d to fix this bug.\r
913 \r
914 evolver: the simulation program can now accept species names in the\r
915 tree.  Note that the data file formats for evolver (MCbase.dat,\r
916 MCcodon.dat, MCaa.dat) have changed and you might have to change your\r
917 own data files.  Look at the files included in the package.\r
918 \r
919 The documentation in paml v3.13 from August 2002 - 12 December 2002\r
920 had a mistake about the critical values for the newer test using a\r
921 modified M8.  The critical values for the test are 2.71 at the 5%\r
922 significance level and 5.41 at the 1% level, rather than 1.95 and 3.32\r
923 as in the documentation.\r
924 \r
925 \r
926 \r
927 \r
928 \r
929 Version 3.14beta2, November 2003\r
930 \r
931 (1) baseml: Models TN93 and REV are wrong when used with Mgene = 3 or\r
932     4.  This seems correct in version 3.12 but went wrong in 3.13 and\r
933     3.14 since I inserted TN92 between HKY85 and TN93.  Thanks for Lee\r
934     Bofkin for reporting the error.\r
935 \r
936 (2) codonml (codeml for codons): When codon models are used to\r
937     reconstruct ancestral sequences (with RateAncestor = 1), the\r
938     program lists synonymous and nonsynonymous changes at each site\r
939     under the heading "Changes at sites (syn nonsyn)."  This listing\r
940     is incorrect due to a bug in the program.  This bug affects\r
941     versions 3.12, 3.13 and 3.14, and version 3.11 seems correct.\r
942     Thanks to Joe Bielawski.\r
943 \r
944 \r
945 \r
946 Version 3.14beta, 20 July 2003\r
947 \r
948 (1) baseml/codeml: rewrote likelihood clock and local clock models.\r
949    Implemented models for combined analysis of multiple genes using\r
950    multiple calibration points (Yang and Yoder 2003).  The option\r
951    variable clock in the control files is now used differently from\r
952    before.  See documentation below and also the readme and example\r
953    files in the folder paml/examples/MouseLemurs/.\r
954 \r
955 (2) codeml: added branch-site models C and D (Bielawski and Yang\r
956    submitted).\r
957 \r
958 (3) baseml/codeml: The SE's for divergence times under the clock\r
959    models are calculated incorrectly.  This happens when you use clock\r
960    = 1 or 2, supply fossil date to calculate absolute times, and\r
961    request standard errors for times.  The estimates of times\r
962    themselves are correct, but standard errors for times are wrong.\r
963    The SEs for times and for the rate under the TipDate model (clock =\r
964    3) are wrong as well.  The programs print out the variances after\r
965    the +-, instead of their square roots.  This error was introduced\r
966    in version 3.13.  Versions prior to 3.13 are correct.  I posted an\r
967    update 3.13d to fix this bug.\r
968 \r
969 (4) mcmctree: this program is decommissioned in this release.  The old\r
970    program died and the new program is still under construction.\r
971 \r
972 (5) evolver: the simulation program can now accept species names in\r
973    the tree.  Note that the data file formats for evolver (MCbase.dat,\r
974    MCcodon.dat, MCaa.dat) have changed and you might have to change\r
975    your own data files.  Look at the files included in the package.\r
976 \r
977 (6) Improved the iteration algorithm a little.  No change to the\r
978    interface.\r
979 \r
980 (7) The documentation in paml v3.13 from August 2002 - 12 December\r
981    2002 had a mistake about the critical values for the newer test\r
982    using a modified M8.  The critical values for the test are 2.71 at\r
983    the 5% significance level and 5.41 at the 1% level, rather than\r
984    1.95 and 3.32 as in the documentation.\r
985 \r
986 (8) Edited the manual pamlDOC.pdf.\r
987 \r
988 \r
989 \r
990 \r
991 15 May 2003\r
992 paml3.13d\r
993 \r
994 baseml/codeml: The SE's for times under the clock models are\r
995 calculated incorrectly.  This happens when you use clock = 1 or 2,\r
996 supply fossil date to calculate absolute times, and request standard\r
997 errors for times.  The estimates of times themselves are correct, but\r
998 standard errors for times are wrong.  The SEs for times and for the\r
999 rate under the TipDate model (clock = 3) are wrong as well.  The\r
1000 programs print out the variances after the +-, instead of their square\r
1001 roots.  \r
1002 \r
1003 This error was introduced in version 3.13.  Versions prior to 3.13 are\r
1004 correct.\r
1005 \r
1006 \r
1007 12 December 2002 correction of documentation\r
1008 \r
1009 The paml documentation in paml v3.13 from August 2002 - 12 December 2002\r
1010 has a mistake about the critical values for the newer test using a\r
1011 modified M8.\r
1012 \r
1013 The critical values for the test are 2.71 at the 5% significance level\r
1014 and 5.41 at the 1% level, rather than 1.95 and 3.32 as in the\r
1015 documentation.  I made a mistake and quickly discovered it.  I thought\r
1016 I corrected this a few months ago, but apparently the document\r
1017 included in the paml release had this mistake.  I am sorry.  I'll\r
1018 correct it now.\r
1019 \r
1020 \r
1021 \r
1022 Version 3.13, August 2002\r
1023 \r
1024 (1) baseml: nhomo = 1 and model = 6 (for both the one-rate and gamma-rates\r
1025     models) in version 3.12 gives incorrect results.  The error was introduced \r
1026     in version 3.12 and is now fixed.  Sorry for the trouble and thanks to\r
1027     Joshua Scott Rest.\r
1028 \r
1029 (2) baseml: Tamura's (1992) model is inserted between HKY85 and TN93.  \r
1030     Unfortunately this means that the model code for TN93 and REV are shifted, \r
1031     and you have to change your control file for those two models.  I also \r
1032     added user-specified REV or UNREST models.\r
1033     0:JC69, 1:K80, 2:F81, 3:F84, 4:HKY85, 5:T92, 6:TN93,\r
1034     7:REV, 8:UNREST, 9:REVu; 10:UNRESTu\r
1035 \r
1036 (4) I implemented the nonhomogeneous models of Galtier and Gouy\r
1037     (1998).  The options are model = 5 (T92) and nhomo = 3 (N1) or 4\r
1038     (N2) or 5 (user).  nhomo = 5 is added for the model of Yang and\r
1039     Roberts (1995) as well.  It means that the user specifies, in the\r
1040     tree, how many sets of base frequencies (or how many GC content\r
1041     parameters in the model of Galtier and Gouy 1998) should be used\r
1042     and which branches has which sets.\r
1043 \r
1044 (5) codeml: For pairwise amino acid sequence comparison (seqtype = 2\r
1045     and runmode = -2), the program crashes.  This is fixed now.\r
1046     Thanks to Dennis Paul Wall.  \r
1047 \r
1048 (6) codeml: The mechanistic models of amino acid substitution (model = 6 or 7)\r
1049     are broken for quite some time due to lack of maintenance.  I have\r
1050     now fixed them.  See the file examples/mtCDNA/readme.txt.\r
1051 \r
1052 (7) codemlsites is now removed, which is for batch run of multiple NSsites\r
1053     models.  This is now done by specifying several NSsites models in\r
1054     the control file codeml.ctl for codeml, for example: NSsites = 0 1\r
1055     7 8.\r
1056 \r
1057 (8) baseml & codeml used to ask the user what to do if the tree has branch \r
1058     lengths.  I have now introduced a variable fix_blength in the control \r
1059     file that does the same thing. \r
1060     fix_blength = -1  * 0: ignore, -1: random, 1: initial, 2: fixed\r
1061 \r
1062 \r
1063 \r
1064 Version 3.12, March 2002\r
1065 \r
1066 (1) baseml and codeml, Mgene=2 or 4 (different pi's) and RateAncestor\r
1067     = 1 Ancestral reconstruction does not work properly although the\r
1068     ML iteration is fine.  The output likelihood values (in the form\r
1069     "Node 20: lnL = -1047.965624") are different from the optimum\r
1070     likelihood already calculated.  The option was fine in version\r
1071     3.0e and 3.1, and was broken in version 3.11.\r
1072 \r
1073 (2) codeml stops with an error message "pi=0" when some amino acids are \r
1074     missing in the sequences.  Earlier versions of the program are correct.\r
1075 \r
1076 (3) yn00 now accepts multiple data sets (specified by ndata).\r
1077 \r
1078 \r
1079 Version 3.11, September 2001\r
1080 \r
1081 (1) baseml and codeml (clock = 1 or clock = 2) sometimes print out\r
1082     ridiculous (e.g., large negative) tree lengths and branch lengths.\r
1083     I thought this was fixed in version 3.1, but it was not.\r
1084     Hopefully it is now fixed.\r
1085 \r
1086 (2) baseml and codeml: Malpha (a separate alpha for each site\r
1087     partition) does not work with Mgene = 0.  The output will give you\r
1088     the same alpha value for each gene as you specify in the control\r
1089     file.  This is now fixed.\r
1090 \r
1091 (3) baseml: When the REV or UNREST models (model = 6 or 7) are used\r
1092     together with Mgene = 2, 3, 4, the program outputs one Q matrix,\r
1093     when each site partition should have a different Q matrix.  The ML\r
1094     parameter estimates are correct, but I did not bother to format\r
1095     the output correctly.  The single Q matrix in the output is the\r
1096     one for the first partition.  I have added the output for the\r
1097     other matrices now.\r
1098 \r
1099 (4) baseml and codeml.  Ancestral reconstruction was disabled for\r
1100     large trees with more than 100 or 200 sequences in previous\r
1101     versions.  It is now allowed.  On large trees, the multiplication\r
1102     of transition probabilities across branches in the tree cause the\r
1103     product to become too small to be represented in the computer.\r
1104     This is known as underflows.  I implemented a scaling algorithm to\r
1105     avoid underflows some time ago but did not bother to do it with\r
1106     the ancestral reconstruction algorithm at the time.  The algorithm\r
1107     should now work, up to the upper limit set in the program, that\r
1108     is, 1000 or 2000 sequences.\r
1109 \r
1110 \r
1111 \r
1112 Version 3.1, June 2001\r
1113 \r
1114 Changed the way of counting base or amino acid frequencies so that\r
1115 this version of baseml or codeml might generate different results from\r
1116 previous versions under the following model specifications.  \r
1117 \r
1118    . baseml & aaml: if you have multiple genes and the model uses the same\r
1119    frequencies in the model for the different site partitions.  \r
1120 \r
1121    . codonml:\r
1122    if you have ambiguity characters at all.  Ambiguity characters were\r
1123    ignored when counting frequencies in previous versions but are used now.\r
1124 \r
1125 There is no difference if your data do not contain any alignment gaps\r
1126 or ambiguity characters or if you choose to remove them before any\r
1127 analysis (cleandata = 1).  The early versions used two ad hoc methods\r
1128 in dealing with such ambiguity characters in different places of the\r
1129 programs.  The new version uses another ad hoc method and in all\r
1130 places.  I think it will be fine which ever version you use, but do\r
1131 not use different versions in the same analysis.\r
1132 \r
1133 codonml (codeml with seqtype = 1) with Mgene = 1 does not work\r
1134 correctly if the sequences have alignment gaps or ambiguity\r
1135 characters.  Mgene = 1 means separate analysis.  The bug causes data\r
1136 for the genes except the first to be read out of frames, so that most\r
1137 likely you will see a lot of messages "stop codon XXX" before the\r
1138 program aborts.  This is now fixed.\r
1139 \r
1140 \r
1141 codonml (codeml with seqtype = 1) with fix_alpha=0: In the final\r
1142 output for the codon + gamma model, parameter alpha is not correctly\r
1143 identified.  If you have fix_kappa = 0, fix_omega =0, and fix_alpha=0,\r
1144 the last three numbers should be kappa, omega (dn/ds), and alpha.  The\r
1145 detailed output did not identify alpha correctly, although the\r
1146 likelihood value and the outputted rates and frequencies (r and f) are\r
1147 correct.  I believe this is now corrected.\r
1148 \r
1149 \r
1150 \r
1151 Version 3.0e, 14 May 2001\r
1152 \r
1153 codonml (codeml with seqtype = 1) with model = 1: The program crashes\r
1154 when you have a small tree with <= 5 branches.  This is a new error\r
1155 introduced in version 3.0c.  It is now fixed.\r
1156 \r
1157 baseml and codeml (clock = 1 or clock = 2) sometimes print out ridiculous\r
1158 tree lengths and branch lengths.  \r
1159 \r
1160 yn00 in version 3.0c ignores icode and uses the universal code only.\r
1161 It was correct in vesion 3.0b.  This is fixed in version 3.0d.\r
1162 \r
1163 \r
1164 Versions 3.0c-3.0d, 20 February 2001\r
1165 \r
1166 We bought a Pentium III cluster running redhat linux 6.2.  The gcc\r
1167 compiler 2.61 seems to have bugs and codeml does not run for NSsites =\r
1168 7 or 8.  The program might output "points out of order" or "Det goes\r
1169 to 0" error messages.  3.0d seems to be safer for these models.\r
1170 \r
1171 codonml (codeml with seqtype = 1) with NSsites = 3 might generate a\r
1172 message "error: sortwM3." and then stop with no output after the\r
1173 iteration.  This is now fixed.  During the iteration, there was no\r
1174 restriction on the w values, so that w0 can be greater than w1 and so\r
1175 on.  At the end of the iteration, I sort the three w values so that w0\r
1176 < w1 < w2 before outputting.  3.0c has a bug at sorting.  If you don't\r
1177 see the error message, everything is fine.\r
1178 \r
1179 \r
1180 10 November 2000\r
1181 \r
1182 The probabilities for Joint ancestral reconstruction are not correct.\r
1183 Many values are larger than 1.  Fixed in version 3.0c.\r
1184 \r
1185 \r
1186 \r
1187 Version 3.0c, 30 October 2000\r
1188 \r
1189 (1) Changed parameterization of clock models (clock = 1, 2, or 3), so that\r
1190 the output now lists node ages, and the SEs are for node ages as well.\r
1191 Node ages are measured by the expected number of nucleotide or amino\r
1192 acid substitutions per site (nucleotide, amino acid, or codon) from\r
1193 the node to the present time, and are proportional to the divergence\r
1194 times.  In earlier versions, the output list proportions.\r
1195 \r
1196 (2) codonml: problem with NSsites model with multiple gene data\r
1197 (Mgene=1) is now fixed(?).  In the earlier version, the likelihood\r
1198 calculation was o.k., but identification of sites under positive\r
1199 selection was incorrect as the program attempted to list sites in\r
1200 another gene when it was analyzing data for one gene.  (1) Mgene\r
1201 options for codons and amino acids:\r
1202 \r
1203 \r
1204 \r
1205 Version 3.0b, 6 October 2000\r
1206 \r
1207 The local clock models (clock = 2) are not implemented correctly in paml3.0 or 3.0a. \r
1208 \r
1209 Yoder, A. D., and Z. Yang.  2000.  Estimation of primate speciation\r
1210 dates using local molecular clocks.  Molecular Biology and Evolution\r
1211 17 (7): 1081-1090.\r
1212 \r
1213 I introduced a serious error before I made the models available to the\r
1214 public, in ver3.0 (May 2000).  Two symptoms are noted right now: (1)\r
1215 crashes (which are good as they make you realise that something is\r
1216 wrong immediately) and (2) the local clock model (clock=2) having a\r
1217 worse likelihood than the global clock model (clock = 1).  The results\r
1218 in the paper are correct except for a typo ("37.30 - 48.48" in table 3\r
1219 for the cetacean-whale divergence using the C3 calibration should be\r
1220 "57.30 - 48.48").  I now include the example data sets and results\r
1221 from that paper to help you prepare your own data files.\r
1222 \r
1223 Sorry for any damages done.\r
1224 \r
1225 Many thanks to Toby Johnson and Philip Awadalla for spotting the error.\r
1226 \r
1227 \r
1228 \r
1229 Version 3, 4 February 2000\r
1230 \r
1231 The program evolver may not generate sequences correctly if branch\r
1232 lengths are very large, say >10.  \r
1233 \r
1234 Scaling by nodes to avoid underflow.  When there are many sequences in\r
1235 the data (say > 200 or 300), the probability of observing data at a\r
1236 site can become too small to represent in the machine.  This is\r
1237 because the probabilities are multiplied along branches in the tree\r
1238 and a large tree has many branches.  Since version 2.0, this underflow\r
1239 is dealt with by scaling, and it works with both the one-rate and\r
1240 gamma-rates models.  It did not work with the NSsites models in\r
1241 codonml, but probably nobody has analysed large data sets to notice\r
1242 this.  Anyway, this version hopefully fixes that problem, when I was\r
1243 analysing the data set of Bush et al. (1999 MBE 16:1457-1465), which\r
1244 has about 350 sequences.  If you use the program on very large data\r
1245 sets, watch out for anything strange and let me know.  I suppose with\r
1246 the option of using supplied branch lengths, data sets of such sizes\r
1247 will become manageable, and this scaling will become important.\r
1248 \r
1249 \r
1250 \r
1251 Version 2.0h, Oct 14, 1999\r
1252 \r
1253 Fixed the following errors, all simple errors.\r
1254 \r
1255 The RemoveIndel routine in 2.0e and 20.f has a bug that removes most\r
1256 sites in the sequence except those with all T's and C's for baseml.\r
1257 The same routine in 2.0g has a different bug that removes most sites\r
1258 except those will all T's and C's in the sequence for aaml.  In either\r
1259 case, the results will be grossly wrong.  The bugs affect the analysis\r
1260 only if you have gaps or ambiguity characters in the data and use\r
1261 runmode = 1 for aaml in 2.0e and 2.0f, and runmode = 1 for codonml for\r
1262 2.0g.\r
1263 \r
1264 The newly introduced option for amino acid reconstruction by baseml\r
1265 (icode) does not work.  The program aborts with an error message.\r
1266 This is now fixed.\r
1267 \r
1268 \r
1269 \r
1270 \r
1271 Version 2.0g, Sept 21, 1999\r
1272 \r
1273 Fixed a bug in 2.0f that causes crash in codeml when getSE = 1.  \r
1274 \r
1275 If the tree has branch lengths, codeml and baseml in 2.0f will simply\r
1276 use the branch lengths rather than estimating them by iteration.  I\r
1277 have added a question for the user to choose to ignore the branch\r
1278 lengths, use them as fixed or use them as initial values for the\r
1279 iteration.\r
1280 \r
1281 \r
1282 \r
1283 Version 2.0d, June 30, 1999\r
1284 Fixed some convergence problems in ML pairwise estimation of dS and \r
1285 dN, in particular, in presence of data partitions (the G option).\r
1286 \r
1287 Fixed a bug in evolver.  The bug means that no sensible data are\r
1288 generated if the tree has branch lengths smaller than 1e-7.  At some\r
1289 point, I did something "clever" (taking advantage of the fact that at\r
1290 such small branch lengths, no evolution would occur), which destroyed\r
1291 the calculation.  \r
1292 \r
1293 \r
1294 \r
1295 Version 2.0c, May 12, 1999\r
1296 Corrected a few problems with the evolver program, and with running \r
1297 multiple data sets using baseml.  Added REV in MCbase.dat.\r
1298 Thanks to John Mercer.\r
1299 \r
1300 Note--Uncomment ndata in baseml or codeml to analyse multiple\r
1301 data sets generated from evolver.\r
1302 \r
1303 \r
1304 \r
1305 April 16, 1999\r
1306 \r
1307 Although posted only a few days ago, paml2.0 has an error in the\r
1308 program codeml, which invalidates most analyses based on codon\r
1309 substitution models.  The symptom is relatively easy to spot and is\r
1310 indicated by one of the parameters (say omega) not being estimated at\r
1311 all and in the output you will have exactly the same number as you\r
1312 specified in the control file.\r
1313 \r
1314 Amino acid-based analysis or pairwise comparison of codon sequences\r
1315 are not affected.  Use paml2.0a to redo the analysis.  Apologies for\r
1316 the trouble.\r
1317 \r
1318 \r
1319 \r
1320 version 2.0, 31 March 1999\r
1321 Added back the faster calculation when there is no missing data.\r
1322 Enabled the programs/analysis that broke in the temporary versions, \r
1323 such as pamp, joint reconstruction.\r
1324 \r
1325 Renamed listtree as evolver, and added simulation options.\r
1326 \r
1327 \r
1328 \r
1329 PAML 1.4 Temporary versions\r
1330 Dec98 & Jan99 \r
1331 \r
1332   pamlTMP.Jan99.notes\r
1333   ===================\r
1334   Ziheng Yang\r
1335   Fri Jan 15 10:01:42 GMT 1999\r
1336 \r
1337   .Type make to compile the programs.  If you got error messages, see\r
1338   whether you know how to change the file Makefile.  If it does not work\r
1339   either, look at the files paml.cc, paml.gcc, etc.\r
1340 \r
1341   .At the suggestion of David Posada, I added ML estimation of pairwise \r
1342   distances between amino acid sequences in the program codeml.  \r
1343 \r
1344   The relavant variables in the control file codeml.ctl are \r
1345 \r
1346    runmode = -2 for pairwise distance calculation\r
1347      aaRatefile = jones.dat * only used for aa seqs with model=empirical(_F)\r
1348               * dayhoff.dat, jones.dat, mtmam.dat, or your own\r
1349      model = 3 \r
1350      alpha = 0\r
1351 \r
1352   model specifies the amino acid substitution model.  You should choose\r
1353   a value from 0, 1, 2, 3.  If you want to estimate the rate matrix from\r
1354   your data, you should do that using many sequences and then move the\r
1355   estimated substitution rate matrix (in the output file mlc) into a\r
1356   file and change the variable aaRatefile.  \r
1357 \r
1358   Choosing alpha>0 means using gamma distance with that specified alpha\r
1359   parameter.  If you see anything strange, please let me know.\r
1360 \r
1361   .I have included only three programs baseml, codeml, and listtree.\r
1362   I have not tested the others and so they are not included.\r
1363 \r
1364 \r
1365 \r
1366   pamlTMP.Dec98.notes\r
1367   ===================\r
1368   Ziheng Yang\r
1369   Wed Dec  9 10:44:37 GMT 1998\r
1370 \r
1371 \r
1372   This temporary version of paml has involved a number of changes, and\r
1373   is quite likely to contain errors.  Please let me know if you notice\r
1374   anything strange.  Some of the options do not work for now.  Details\r
1375   follow.  I will compile the Win32 and PowerMac versions after\r
1376   everything is fixed and tested.\r
1377 \r
1378   . Missing data: baseml and codeml now handle missing data.  Choose\r
1379   DelMissing = 1 in the control file to remove sites with ambiguity\r
1380   characters or alignment gaps, as did previous versions.\r
1381 \r
1382   . Clock: The clock is now fixed.  It may still crash, but the option\r
1383   is not worse than the no-clock options.  The definitions of the node\r
1384   times or branch lengths are now different from the documentation\r
1385   (pamlDOC.html), and so check the branch lengths in the output tree\r
1386   topology.  Thanks to Jeff Thorne.\r
1387 \r
1388   . Nexus file formats: Paml programs now read sequence files and tree\r
1389   structure files in the Nexus format used by paup and MacClade.  Only\r
1390   the data or tree are read, and everything else in the file is ignored.\r
1391 \r
1392   .  Ancestral reconstruction: Marginal ancestral reconstructions are\r
1393   now done under the gamma-rates model as well as the constant-rate\r
1394   model.  For protein-coding genes, reconstructions can now be done at\r
1395   the nucleotide level with baseml (in particular, by using models that\r
1396   account for differences at the three codon positions), at the amino\r
1397   acid level with aaml, and at the codon level with aaml.  According to\r
1398   Belinda Chang, those different reconstructions tend to be similar.\r
1399   Results for ancestral reconstruction are now listed by site, and not\r
1400   by site pattern as in earlier versions.  Missing data are now handled\r
1401   in those analysis.  See instructions in this doc about baseml.ctl for\r
1402   more options.  Thanks to Belinda Chang.  I would like to take this\r
1403   opportunity to point out that the reconstructed ancestral sequences\r
1404   are not the real observed sequences and may contain errors.\r
1405 \r
1406   . I have disabled the option for variable rates among sites in\r
1407   combination with variable dN/dS rate ratios among lineages in codonml.\r
1408   This option has never been implemented in the program but was not\r
1409   disabled.\r
1410 \r
1411   . Distance matrices from codonml.  The program codonml outputs\r
1412   matrices of synonymous and nonsynonymous rates in all pairwise\r
1413   comparisons using the method of Nei & Gojobori (1986) into two files\r
1414   named DistanceNG.dN & DistanceNG.dN.  The matrices are lower-diagonal\r
1415   and can be used with programs, such as neighbor and fitch, in phylip\r
1416   (and possibly paup* too) for tree reconstruction or branch length\r
1417   estimation by distance methods.  If you choose runmode = -2 for ML\r
1418   pairwise comparison, the program will also output two matrices of ML\r
1419   estimates into two files named DistanceML.dS & DistanceML.dN, for\r
1420   synonymous and nonsynonymous rates.  Since many users seem interested\r
1421   in looking at dN/dS rate ratios among lineages, examination of the\r
1422   tree shapes indicated by branch lengths calculated from the two rates\r
1423   may be interesting although the analysis is intuitive.  Obviously, you\r
1424   should NOT name your own data files with those names; otherwise they\r
1425   will get overwritten.  If your species name has more than 10\r
1426   characters, you will have to edit the files and cut the names short\r
1427   before you can use Phylip programs.  I have decided to leave this work\r
1428   to the user.  I plan to create some other distance matrix files for\r
1429   nucleotides and amino acids as well.\r
1430 \r
1431   . An minor prompt error when running codonml with model = 2 (variable\r
1432   dN/dS ratios among lineages) is fixed.  The example data set\r
1433   lysozymeSmall.nuc is included for the user to duplicate my results in\r
1434   Yang (1998 Molecular Biology and Evolution 15: 568-573).  The control\r
1435   file codemlLysozyme.ctl explains in more detail how to specify the\r
1436   options.  I would like to remind you that it is not correct to use the\r
1437   option model = 1 to estimate dN/dS ratios for branches to find out\r
1438   which ratios are greater than one, and then to use model = 2 to test\r
1439   whether that ratio is significantly greater than one.  The problem\r
1440   with such an analysis is that the hypothesis being tested is derived\r
1441   from the data which you use to test the hypothesis, and as a result,\r
1442   you tend to get significantly results too often.  Strictly speaking,\r
1443   the hypothesis should be formulated before the data are analysed.\r
1444 \r
1445   Things that do not work in this version include\r
1446 \r
1447   . All parsimony-based analyses are now broken.  The program pamp is\r
1448   not included.  Programs baseml and codeml used to calculate the MP\r
1449   score for each tree before doing an ML analysis on that tree.  Now a\r
1450   -1 is used to indicate this is not possible.\r
1451 \r
1452 \r
1453 \r
1454 Version 1.4 (UCL)\r
1455 July 1998 \r
1456 \r
1457      1. Most of the changes are in the program codeml (aaml for amino\r
1458   acid sequences and codonml for codon sequences). A few new models of\r
1459   codon substitution are implemented (see Yang and Nielsen 1998; Nielsen\r
1460   and Yang 1998; Yang 1998).\r
1461      2. Some problems relating to ancestral sequence reconstruction (in\r
1462   baseml and codeml) are fixed. The earlier algorithm does not work\r
1463   properly if the data contain more than several sequences. The\r
1464   algorithm makes a guess at the likely character states at the interior\r
1465   nodes of the tree, and then uses those to generate reconstructions\r
1466   (joint reconstructions, see eq. 2 in Yang et al. 1995) to be\r
1467   evaluated. Sometimes this strategy misses important reconstructions,\r
1468   and as a result, the probabilities for reconstructed characters at\r
1469   specific interior nodes (marginal reconstructions; see eq. 4 in Yang\r
1470   et al. 1995) are substantially underestimated if the number of\r
1471   sequences is not very small. I have now written separate codes to do\r
1472   the marginal reconstruction, evaluating all possible character states\r
1473   for each interior node. This works also under the gamma model of\r
1474   substitution rates among sites, a feature that was not implemented\r
1475   before. The joint reconstruction works with one rate for all sites\r
1476   only and has the old problem of possibly missing important\r
1477   reconstructions. However, the posterior probabilities for those joint\r
1478   reconstructions that do get evaluated are accurate. I have added an\r
1479   option (choose RateAncestor = 2 rather than 1) for the user to specify\r
1480   the reconstruction to be evaluated. The two approaches are expected to\r
1481   produce very similar results, and since the marginal reconstruction is\r
1482   always reliable, perhaps it can always be used for data analysis.\r
1483   (Thanks to Belinda Chang.)\r
1484      3. The output file for estimated rates for sites under the\r
1485   variable-rates models is now "Rates.out" instead of "rst".\r
1486      4. I have implemented ancestral sequence reconstructions based on\r
1487   codon-substitution models (codonml). This has not been tested\r
1488   carefully, and I would appreciate your comments if you use it.\r
1489      5. A number of minor changes have been made. I have fixed several\r
1490   floating exception errors that seem to occur on DEC Alpha machines\r
1491   only.\r
1492      6. The documentation is now changed into the html format. \r
1493 \r
1494 \r
1495 \r
1496 Version 1.3a,b,c (UCL)\r
1497 June 1998 \r
1498 \r
1499   1. Basemlg was put back at the request of a user.\r
1500 \r
1501   2. Some changes are made to codeml concerning codon-substitution\r
1502   models (Yang and Nielsen 1998 JME; Yang 1998 MBE; Nielsen and Yang\r
1503   1998 Genetics)\r
1504 \r
1505 \r
1506 \r
1507 PAML Version 1.3: (UC Berkeley)\r
1508 July 1997 \r
1509 \r
1510   1. Starting with this version, the program basemlg will not be\r
1511   included in the package.  This program implements the (continuous)\r
1512   gamma model of substitution rate variation among nucleotide sites\r
1513   (Yang 1993).  It involves intensive computation and has been\r
1514   superseded by the discrete-gamma model implemented in the program\r
1515   baseml.  If you want to use this program, you should use previous\r
1516   versions of paml, which can be obtained from me if nowhere else.\r
1517 \r
1518   2. The simulation program mcml.c is removed from the package.  This is\r
1519   now superced by the program listtree.c, which does different things\r
1520   besides simulating data sets.\r
1521 \r
1522   3. I have implemented the stepwise addition algorithm in the programs\r
1523   baseml and codeml.  This algorithm is faster than the\r
1524   star-decomposition algorithm implemented before, but my implementation\r
1525   is crude and inefficient.  The NNI perturbation is implemented too.\r
1526   These work without the molecular clock.\r
1527 \r
1528   4. Many changes are made with the program codonml (codeml with\r
1529   seqtype=1).  A few new codon-based models are implemented.  One\r
1530   assumes different nonsynonymous/synonymous (dN/dS) rate ratios among\r
1531   branches in the phylogeny, and may be useful for detecting episodic\r
1532   positive selection.  Another allows the dN/dS ratio to vary among\r
1533   sites and may be useful for testing neutrality and detecting\r
1534   positively-selected sites in the sequence.  These are based on my\r
1535   collaborative work with Rasmus Nielsen.  I made some changes to the\r
1536   output of estimates of dS and dN in pairwise comparisons (codonml with\r
1537   runmode=-2), so that the results are easy to understand.  Another\r
1538   change with this program is in the codon-substitution model of Goldman\r
1539   and Yang (1994).  We used the amino acid distance matrix of Grantham\r
1540   (1974) to modify the rate of nonsynonymous substitutions, but\r
1541   unfortunately the model does not fit data well.  It does not always\r
1542   fit the data better than if we simply assume equal distance between\r
1543   any two amino acids.  So I have added the option of ignoring the amino\r
1544   acid differences.  Goldman and Yang's original formula is still\r
1545   available but not recommended for use.  As a result of these changes,\r
1546   the formulation of the Goldman and Yang model is now somewhat\r
1547   different from the paper and previous versions of the program.  See\r
1548   Section 6.2 for details.\r
1549 \r
1550   5. I have again made some changes with the user interface, based on my\r
1551   guess of what the "user" would like to see.\r
1552 \r
1553 \r
1554 \r
1555 Version 1.1a-d: (University of California, Berkeley)\r
1556 1995-1996 \r
1557 \r
1558 1.1a No records of changes remain.\r
1559 \r
1560 1.1b November, 1995:\r
1561 \r
1562 The following line at the beginning of the file tools.h \r
1563       #define __cplusplus\r
1564 is removed.  I added this line to avoid some (unjustified) warning\r
1565 messages from a compiler I used to use and forgot to remove it when I\r
1566 was preparing paml1.1.  This line made some compilers unable to\r
1567 compile.\r
1568 \r
1569 A bug that caused baseml and basemlg to give wrong estimates of kappa\r
1570 under the F84 model is now fixed.  Estimates of kappa under the F84\r
1571 models listed in the paml 1.0 and 1.1 documents are all incorrect and\r
1572 are a bit too small.  For example, the estimate of kappa under the F84\r
1573 model for the mtDNA data of Brown et al. (1982) should be 4.344 while\r
1574 the wrong estimate given in the large table of the document is 3.420.\r
1575 Likelihood value, branch lengths and other parameters seem to have\r
1576 been correctly calculated by paml 1.0 and 1.1.  Versions prior to 1.0\r
1577 do not have this bug, and results in Yang (J. Mol. Evol. 1994,\r
1578 39:306-314) and Yang, Lauder, and Lin (J. Mol. Evol. 1995,\r
1579 41:587-596), where the F84 model was used, are correct.\r
1580 \r
1581 1.1c March 1996 \r
1582 \r
1583 Representation of tree topologies using branches (see the document)\r
1584 are now allowed (restored) in the tree structure file.  This is for\r
1585 coping with cases where some taxa are ancestors of others.  If this\r
1586 representation is used, the line starts with a dollar sign.  So the\r
1587 following line in the file trees.5s (the tree file for 5 species)\r
1588 \r
1589 $ 5      6 3  6 4  6 5  3 1  3 2\r
1590 \r
1591 represents the tree ((12)34), with 5 to be the ancestor of 1 and 2.\r
1592 \r
1593 Alignment gaps are now allowed when option G is used (for multiple\r
1594 genes).  The gaps are removed before analysis.\r
1595 \r
1596 A small program listtree lists all the bifurcating trees for a given\r
1597 (small) number of species.\r
1598 \r
1599 codonml (codeml.c with seqtype=1) now has an option for calculating\r
1600 the number of synonymous substitutions per synonymous site (Ks) and\r
1601 the number of nonsynonymous substitutions per nonsynonymous site (Ka)\r
1602 and their ratio for each pairwise comparison, using the method of\r
1603 Goldman and Yang (1994).  This is implemented with\r
1604 runmode=-2. Estimates of Ks and Ka are collected in the file rst and\r
1605 estimates of model parameters in the file mlc.  This option produces\r
1606 table 2 in the Goldman & Yang paper.\r
1607 \r
1608 The interior nodes were incorrectly identified when the ancestral\r
1609 sequences were listed in the file rst.  They were all one less than\r
1610 their correct numbers.  Nodes 7, 8, 9, 10 for the stewart.aa data were\r
1611 incorrectly identified as nodes 6, 7, 8, 9.  This is corrected now.\r
1612 \r
1613 1.1d. July 1996\r
1614 \r
1615 An unintended version of codeml.c was included in version 1.1c, which\r
1616 causes the program to produce different results under the codon-based\r
1617 model of Goldman and Yang (1994).  The small number in baseml.c was\r
1618 set too small, making the program do unnecessary iterations; this is\r
1619 fixed now.  I also changed the program pamp so that it will estimate\r
1620 the substitution rate matrix without using a tree.\r
1621 \r
1622 I have included a few other genetic code tables in this version of\r
1623 codeml; see the file codeml.ctl.\r
1624 \r
1625 \r
1626 PAML Version 1.2: November 1996 (UC Berkeley)\r
1627 \r
1628   1. I have done some changes with the user interface.  Name of files\r
1629 (sequence data file, control file, tree structure file) are now\r
1630 specified in the control files (The default are baseml.ctl,\r
1631 codeml.ctl, pamp.ctl, mcmctree.ctl).  The command line for executing a\r
1632 program is now ProgramName ControlFileName with ControlFileName\r
1633 optional.  I have added some text in the output file of baseml so that\r
1634 the results are eassier to understand.  Choose verbose=0 in the\r
1635 control file if you do not want the detailed output.\r
1636 \r
1637   2. A new program mcmctree is included, which performs Bayesian\r
1638 estimation of phylogenies using Markov chain Monte Carlo methods\r
1639 (Rannala and Yang 1996; Yang and Rannala 1997).\r
1640 \r
1641   3. A number of minor changes are made, such as using species names\r
1642 in the parenthesis tree representation.\r
1643 \r
1644 \r
1645 \r
1646 July 1995 \r
1647 Version 1.1: (IMEG PennState)\r
1648 \r
1649   Models for analyzing data of multiple genes (Yang 1996 JME) are\r
1650   implemented in baseml and codeml.  Two more programs are included:\r
1651   pamp for parsimony-based analysis implementing the methods of Yang and\r
1652   Kumar (1996 MBE) and mcml for Monte Carlo simulation (prepared for\r
1653   Arndt von Haeseler but apparently not used).\r
1654 \r
1655 \r
1656 February 1995 \r
1657 Version 1.0 (IMEG, PennState)\r
1658 \r
1659   This is the first official version of paml.  Three main programs are\r
1660   included: baseml, basemlg and codeml.  Control files are used for all\r
1661   of them.  The program codeml is formed by merging two programs codonml\r
1662   and aaml, for codon sequences and amino acid sequences, respectively.\r
1663   One rate, gamma rates, and auto-discrete-gamma rates for sites are\r
1664   implemented for nucleotide, amino acid, and codon-based models.  The\r
1665   document is provided as postscript files (paml1_3.ps).\r
1666 \r
1667 \r
1668 October 1994 \r
1669 Version 0.12, no name for package (BAU and IMEG PennState) \r
1670 \r
1671   The bracket notation of tree topologies is introduced.  Tree\r
1672   search by star decomposition is implemented in baseml and codonml.\r
1673   The options for baseml are moved into an option file baseml.ctl.  The\r
1674   molecular clock seems to work with the automatic tree search model\r
1675   (runmode=1 or 2).  The old readme file is renamed manual.\r
1676 \r
1677 \r
1678 March 1994 \r
1679 Version 0.10, no name for package: (NHM, England)\r
1680 \r
1681   Programs tripml and comptree are renamed codonml and rell.  The readme\r
1682   file is expanded and the numerical optimization routine, ming1, used\r
1683   by dnaml and codonml, is improved.  The discrete-gamma model of Yang\r
1684   (1994 JME) is implemented in both baseml and codonml.\r
1685 \r
1686   Preliminary version 0.11, no name for package: April 1994 (NHM,\r
1687   England) Programs dnaml and dnamls are renamed baseml and basemlg to\r
1688   avoid confusion with Joe Felsenstein's programs.  The\r
1689   auto-discrete-gamma model and the nonparametric models of rate\r
1690   variation and correlation mong sites of Yang (1995 Genetics) are added\r
1691   in baseml.  Nonhomogeneous-process models of Yang and Roberts (1995\r
1692   MBE) are implemented in baseml.\r
1693 \r
1694 \r
1695 April 1993 \r
1696 Version 0.01, no name for package (Cambridge).  Three programs are included in \r
1697 the package:\r
1698 \r
1699   1. dnamls implements the model of gamma rates among sites of Yang\r
1700   (1993) and works with arbitrary topologies and substitution models\r
1701   (JC69, K80, F81, HKY85).\r
1702 \r
1703   2. dnaml implements the model of a single rate for all sites. (The\r
1704   same name as Joe Felsenstein's program was used.)\r
1705 \r
1706   3. tripml implements the codon-based model of Goldman and Yang (1994).\r
1707   Trees are represented by the "branch notation".\r
1708 \r
1709 // end of file\r