source: tags/arb-6.0/GDE/PHYLIP/doc/dnaml.html

Last change on this file was 2176, checked in by westram, 20 years ago

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 36.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2<HTML>
3<HEAD>
4<TITLE>dnaml</TITLE>
5<META NAME="description" CONTENT="dnaml">
6<META NAME="keywords" CONTENT="dnaml">
7<META NAME="resource-type" CONTENT="document">
8<META NAME="distribution" CONTENT="global">
9<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
10</HEAD>
11<BODY BGCOLOR="#ccffff">
12<DIV ALIGN=RIGHT>
13version 3.6
14</DIV>
15<P>
16<DIV ALIGN=CENTER>
17<H1>DnaML -- DNA Maximum Likelihood program</H1>
18</DIV>
19<P>
20&#169; Copyright 1986-2002 by the University of
21Washington.  Written by Joseph Felsenstein.  Permission is granted to copy
22this document provided that no fee is charged for it and that this copyright
23notice is not removed.
24<P>
25This program implements the maximum likelihood method for DNA
26sequences.  The
27present version is faster than earlier versions of
28DNAML.  Details of the algorithm are published in
29the paper by Felsenstein and Churchill (1996).
30The model of base substitution allows the expected frequencies
31of the four bases to be unequal, allows the expected frequencies of
32transitions and transversions to be unequal, and has several
33ways of allowing different rates of evolution at
34different sites.
35<P>
36The assumptions of the present model are:
37<OL>
38<LI>Each site in the sequence evolves independently.
39<LI>Different lineages evolve independently.
40<LI>Each site undergoes substitution at an expected rate which is
41chosen from a series of rates (each with a probability of occurrence)
42which we specify.
43<LI>All relevant sites are included in the sequence, not just those that
44have changed or those that are "phylogenetically informative".
45<LI>A substitution consists of one of two sorts of events:
46<DL COMPACT>
47<DT>(a)</DT>
48<DD>The first kind
49of event consists of the replacement of the existing base by a base
50drawn from a pool of purines or a pool of pyrimidines (depending on
51whether the base being replaced was a purine or a pyrimidine).  It can
52lead either to no change or to a transition.</DD>
53<DT>(b)</DT>
54<DD>The second kind of
55event consists of the replacement of the existing base
56by a base drawn at random from a pool of bases at known
57frequencies, independently of the identity of the base which
58is being replaced.  This could lead either to a no change, to a transition
59or to a transversion.</DD>
60</DL>
61<P> 
62The ratio of the two
63purines in the purine replacement pool is the same as their ratio in the
64overall pool, and similarly for the pyrimidines.
65<P> 
66The ratios of transitions to transversions can be set by the
67user.  The substitution process can be diagrammed as follows:
68Suppose that you specified A, C, G, and T base frequencies of
690.24, 0.28, 0.27, and 0.21.
70<P>
71<UL>
72<LI>First kind of event:
73<P>
74<OL>
75<LI>Determine whether the existing base is a purine or a pyrimidine.
76<LI>Draw from the proper pool:
77<P>
78<PRE>
79      Purine pool:                Pyrimidine pool:
80
81     |               |            |               |
82     |   0.4706 A    |            |   0.5714 C    |
83     |   0.5294 G    |            |   0.4286 T    |
84     | (ratio is     |            | (ratio is     |
85     |  0.24 : 0.27) |            |  0.28 : 0.21) |
86     |_______________|            |_______________|
87</PRE>
88</OL>
89<P>
90<LI>Second kind of event:
91<P>
92Draw from the overall pool:
93<PRE>
94
95              |                  |
96              |      0.24 A      |
97              |      0.28 C      |
98              |      0.27 G      |
99              |      0.21 T      |
100              |__________________|
101</PRE>
102</UL>
103<P>
104Note that if the existing base is, say, an A, the first kind of event has
105a 0.4706 probability of "replacing" it by another A.  The second kind of
106event has a 0.24 chance of replacing it by another A.  This rather
107disconcerting model is used because it has nice mathematical properties that
108make likelihood calculations far easier.  A closely similar, but not
109precisely identical model having different rates of transitions and
110transversions has been used by Hasegawa et. al. (1985b).  The transition
111probability formulas for the current model were given (with my
112permission) by Kishino and Hasegawa (1989).  Another explanation is
113available in the paper by Felsenstein and Churchill (1996).
114</OL>
115<P>
116Note the assumption that we are looking at all sites, including those
117that have not changed at all.  It is important not to restrict attention
118to some sites based on whether or not they have changed; doing that
119would bias branch lengths by making them too long, and that in turn
120would cause the method to misinterpret the meaning of those sites that
121had changed.
122<P>
123This program uses a Hidden Markov Model (HMM)
124method of inferring different rates of evolution at different sites.  This
125was described in a paper by me and Gary Churchill (1996).  It allows us to
126specify to the program that there will be
127a number of different possible evolutionary rates, what the prior
128probabilities of occurrence of each is, and what the average length of a
129patch of sites all having the same rate.  The rates can also be chosen
130by the program to approximate a Gamma distribution of rates, or a
131Gamma distribution plus a class of invariant sites.  The program computes the
132the likelihood by summing it over all possible assignments of rates to sites,
133weighting each by its prior probability of occurrence.
134<P>
135For example, if we have used the C and A options (described below) to specify
136that there are three possible rates of evolution,  1.0, 2.4, and 0.0,
137that the prior probabilities of a site having these rates are 0.4, 0.3, and
1380.3, and that the average patch length (number of consecutive sites
139with the same rate) is 2.0, the program will sum the likelihood over
140all possibilities, but giving less weight to those that (say) assign all
141sites to rate 2.4, or that fail to have consecutive sites that have the
142same rate.
143<P>
144The Hidden Markov Model framework for rate variation among sites
145was independently developed by Yang (1993, 1994, 1995).  We have
146implemented a general scheme for a Hidden Markov Model of
147rates; we allow the rates and their prior probabilities to be specified
148arbitrarily  by the user, or by a discrete approximation to a Gamma
149distribution of rates (Yang, 1995), or by a mixture of a Gamma
150distribution and a class of invariant sites.
151<P>
152This feature effectively removes the artificial assumption that all sites
153have the same rate, and also means that we need not know in advance the
154identities of the sites that have a particular rate of evolution.
155<P>
156Another layer of rate variation also is available.  The user can assign
157categories of rates to each site (for example, we might want first, second,
158and third codon positions in a protein coding sequence to be three different
159categories.  This is done with the categories input file and the C option.
160We then specify (using the menu) the relative rates of evolution of sites
161in the different categories.  For example, we might specify that first,
162second, and third positions evolve at relative rates of 1.0, 0.8, and 2.7.
163<P>
164If both user-assigned rate categories and Hidden Markov Model rates
165are allowed, the program assumes that the
166actual rate at a site is the product of the user-assigned category rate
167and the Hidden Markov Model regional rate.  (This may not always make
168perfect biological sense: it would be more natural to assume some upper
169bound to the rate, as we have discussed in the Felsenstein and Churchill
170paper).  Nevertheless you may want to use both types of rate variation.
171<P>
172<H2>INPUT FORMAT AND OPTIONS</H2>
173<P>
174Subject to these assumptions, the program is a
175correct maximum likelihood method.  The
176input is fairly standard, with one addition.  As usual the first line of the
177file gives the number of species and the number of sites.
178<P>
179Next come the species data.  Each
180sequence starts on a new line, has a ten-character species name
181that must be blank-filled to be of that length, followed immediately
182by the species data in the one-letter code.  The sequences must either
183be in the "interleaved" or "sequential" formats
184described in the Molecular Sequence Programs document.  The I option
185selects between them.  The sequences can have internal
186blanks in the sequence but there must be no extra blanks at the end of the
187terminated line.  Note that a blank is not a valid symbol for a deletion.
188<P>
189The options are selected using an interactive menu.  The menu looks like this:
190<P>
191<TABLE><TR><TD BGCOLOR=white>
192<PRE>
193Nucleic acid sequence Maximum Likelihood method, version 3.6a3
194
195Settings for this run:
196  U                 Search for best tree?  Yes
197  T        Transition/transversion ratio:  2.0000
198  F       Use empirical base frequencies?  Yes
199  C                One category of sites?  Yes
200  R           Rate variation among sites?  constant rate
201  W                       Sites weighted?  No
202  S        Speedier but rougher analysis?  Yes
203  G                Global rearrangements?  No
204  J   Randomize input order of sequences?  No. Use input order
205  O                        Outgroup root?  No, use as outgroup species  1
206  M           Analyze multiple data sets?  No
207  I          Input sequences interleaved?  Yes
208  0   Terminal type (IBM PC, ANSI, none)?  (none)
209  1    Print out the data at start of run  No
210  2  Print indications of progress of run  Yes
211  3                        Print out tree  Yes
212  4       Write out trees onto tree file?  Yes
213  5   Reconstruct hypothetical sequences?  No
214
215  Y to accept these or type the letter for one to change
216
217</PRE>
218</TD></TR></TABLE>
219<P>
220The user either types "Y" (followed, of course, by a carriage-return)
221if the settings shown are to be accepted, or the letter or digit corresponding
222to an option that is to be changed.
223<P>
224The options U, W, J, O, M, and 0 are the usual ones.  They are described in the
225main documentation file of this package.  Option I is the same as in
226other molecular sequence programs and is described in the documentation file
227for the sequence programs.
228<P>
229The T option in this program does not stand for Threshold,
230but instead is the Transition/transversion option.  The user is prompted for
231a real number greater than 0.0, as the expected ratio of transitions to
232transversions.  Note
233that this is not the ratio of the first to the second kinds of events,
234but the resulting expected ratio of transitions to transversions.  The exact
235relationship between these two quantities depends on the frequencies in the
236base pools.  The default value of the T parameter if you do not use the T
237option is 2.0.
238<P>
239The F (Frequencies) option is one which may save users much time.  If you
240want to use the empirical frequencies of the bases, observed in the input
241sequences, as the base frequencies, you simply use the default setting of
242the F option.  These empirical
243frequencies are not really the maximum likelihood estimates of the base
244frequencies, but they will often be close to those values (what they are is
245maximum likelihood estimates under a "star" or "explosion" phylogeny).
246If you change the setting of the F option you will be prompted for the
247frequencies of the four bases.  These must add to 1 and are to be typed on
248one line separated by blanks, not commas.
249<P>
250The R (Hidden Markov Model rates) option allows the user to
251approximate a Gamma distribution of rates among sites, or a
252Gamma distribution plus a class of invariant sites, or to specify how
253many categories of
254substitution rates there will be in a Hidden Markov Model of rate
255variation, and what are the rates and probabilities
256for each.   By repeatedly selecting the R option one toggles among
257no rate variation, the Gamma, Gamma+I, and general HMM possibilities.
258<P>
259If you choose Gamma or Gamma+I the program will ask how many rate
260categories you want.  If you have chosen Gamma+I, keep in mind that
261one rate category will be set aside for the invariant class and only
262the remaining ones used to approximate the Gamma distribution.
263For the approximation we do not use the quantile method of Yang (1995)
264but instead use a quadrature method using generalized Laguerre
265polynomials.  This should give a good approximation to the Gamma
266distribution with as few as 5 or 6 categories.
267<P>
268In the Gamma and Gamma+I cases, the user will be
269asked to supply the coefficient of variation of the rate of substitution
270among sites.  This is different from the parameters used by Nei and Jin
271(1990) but
272related to them:  their parameter <EM>a</EM> is also known as "alpha",
273the shape parameter of the Gamma distribution.  It is
274related to the coefficient of variation by
275<P>
276&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CV = 1 / a<SUP>1/2</SUP>
277<P>
278or
279<P>
280&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a = 1 / (CV)<SUP>2</SUP>
281<P>
282(their parameter <EM>b</EM> is absorbed here by the requirement that time is scaled so
283that the mean rate of evolution is 1 per unit time, which means that <EM>a = b</EM>).
284As we consider cases in which the rates are less variable we should set <EM>a</EM>
285larger and larger, as <EM>CV</EM> gets smaller and smaller.
286<P>
287If the user instead chooses the general Hidden Markov Model option,
288they are first asked how many HMM rate categories there
289will be (for the moment there is an upper limit of 9,
290which should not be restrictive).  Then
291the program asks for the rates for each category.  These rates are
292only meaningful relative to each other, so that rates 1.0, 2.0, and 2.4
293have the exact same effect as rates 2.0, 4.0, and 4.8.  Note that an
294HMM rate category
295can have rate of change 0, so that this allows us to take into account that
296there may be a category of sites that are invariant.  Note that the run time
297of the program will be proportional to the number of HMM rate categories:
298twice as
299many categories means twice as long a run.  Finally the program will ask for
300the probabilities of a random site falling into each of these
301regional rate categories.  These probabilities must be nonnegative and sum to
3021.  Default
303for the program is one category, with rate 1.0 and probability 1.0 (actually
304the rate does not matter in that case).
305<P>
306If more than one HMM rate category is specified, then another
307option, A, becomes
308visible in the menu.  This allows us to specify that we want to assume that
309sites that have the same HMM rate category are expected to be clustered
310so that there is autocorrelation of rates.  The
311program asks for the value of the average patch length.  This is an expected
312length of patches that have the same rate.  If it is 1, the rates of
313successive sites will be independent.  If it is, say, 10.25, then the
314chance of change to a new rate will be 1/10.25 after every site.  However
315the "new rate" is randomly drawn from the mix of rates, and hence could
316even be the same.  So the actual observed length of patches with the same
317rate will be a bit larger than 10.25.  Note below that if you choose
318multiple patches, there will be an estimate in the output file as to
319which combination of rate categories contributed most to the likelihood.
320<P>
321Note that the autocorrelation scheme we use is somewhat different
322from Yang's (1995) autocorrelated Gamma distribution.  I am unsure
323whether this difference is of any importance -- our scheme is chosen
324for the ease with which it can be implemented.
325<P>
326The C option allows user-defined rate categories.  The user is prompted
327for the number of user-defined rates, and for the rates themselves,
328which cannot be negative but can be zero.  These numbers, which must be
329nonnegative (some could be 0),
330are defined relative to each other, so that if rates for three categories
331are set to 1 : 3 : 2.5 this would have the same meaning as setting them
332to 2 : 6 : 5.
333The assignment of rates to
334sites is then made by reading a file whose default name is "categories".
335It should contain a string of digits 1 through 9.  A new line or a blank
336can occur after any character in this string.  Thus the categories file
337might look like this:
338<P>
339<PRE>
340122231111122411155
3411155333333444
342</PRE>
343<P>
344With the current options R, A, and C the program has gained greatly in its
345ability to infer different rates at different sites and estimate
346phylogenies under a more realistic model.  Note that Likelihood Ratio
347Tests can be used to test whether one combination of rates is
348significantly better than another, provided one rate scheme represents
349a restriction of another with fewer parameters.  The number of parameters
350needed for rate variation is the number of regional rate categories, plus
351the number of user-defined rate categories less 2, plus one if the
352regional rate categories have a nonzero autocorrelation.
353<P>
354The G (global search) option causes, after the last species is added to
355the tree, each possible group to be removed and re-added.  This improves the
356result, since the position of every species is reconsidered.  It
357approximately triples the run-time of the program.
358<P>
359The User tree (option U) is read from a file whose default name is
360<TT>intree</TT>.
361The trees can be multifurcating.
362<P>
363If the U (user tree) option is chosen another option appears in
364the menu, the L option.  If it is selected,
365it signals the program that it
366should take any branch lengths that are in the user tree and
367simply evaluate the likelihood of that tree, without further altering
368those branch lengths.   This means that if some branches have lengths
369and others do not, the program will estimate the lengths of those that
370do not have lengths given in the user tree.  Note that the program RETREE
371can be used to add and remove lengths from a tree.
372<P>
373The U option can read a multifurcating tree.  This allows us to
374test the hypothesis that a certain branch has zero length (we can also
375do this by using RETREE to set the length of that branch to 0.0 when
376it is present in the tree).  By
377doing a series of runs with different specified lengths for a branch we
378can plot a likelihood curve for its branch length while allowing all
379other branches to adjust their lengths to it.  If all branches have
380lengths specified, none of them will be iterated.  This is useful to allow
381a tree produced by another method to have its likelihood
382evaluated.  The L option has no effect and does not appear in the
383menu if the U option is not used.
384<P>
385The W (Weights) option is invoked in the usual way, with only weights 0
386and 1 allowed.  It selects a set of sites to be analyzed, ignoring the
387others.  The sites selected are those with weight 1.  If the W option is
388not invoked, all sites are analyzed.
389The Weights (W) option
390takes the weights from a file whose default name is "weights".  The weights
391follow the format described in the main documentation file.
392<P>
393The M (multiple data sets) option will ask you whether you want to
394use multiple sets of weights (from the weights file) or multiple data sets
395from the input file.
396The ability to use a single data set with multiple weights means that
397much less disk space will be used for this input data.  The bootstrapping
398and jackknifing tool Seqboot has the ability to create a weights file with
399multiple weights.  Note also that when we use multiple weights for
400bootstrapping we can also then maintain different rate categories for
401different sites in a meaningful way.  You should not use the multiple
402data sets option without using multiple weights, you should not at the
403same time use the user-defined rate categories option (option C).
404<P>
405The algorithm used for searching among trees is faster than it was in
406version 3.5, thanks to using a technique invented by David Swofford
407and J. S. Rogers.  This involves not iterating most branch lengths on most
408trees when searching among tree topologies,  This is of necessity a
409"quick-and-dirty" search but it saves much time.  There is a menu option
410(option S) which can turn off this search and revert to the earlier
411search method which iterated branch lengths in all topologies.  This will
412be substantially slower but will also be a bit more likely to find the
413tree topology of highest likelihood.
414<P>
415<H2>OUTPUT FORMAT</H2>
416<P>
417The output starts by giving the number of species, the number of sites,
418and the base frequencies for A, C, G, and T that have been specified.  It
419then prints out the transition/transversion ratio that was specified or
420used by default.  It also uses the base frequencies to compute the actual
421transition/transversion ratio implied by the parameter.
422<P>
423If the R (HMM rates) option is used a table of the relative rates of
424expected substitution at each category of sites is printed, as well
425as the probabilities of each of those rates.
426<P>
427There then follow the data sequences, if the user has selected the menu
428option to print them out, with the base sequences printed in
429groups of ten bases along the lines of the Genbank and EMBL formats.  The
430trees found are printed as an unrooted
431tree topology (possibly rooted by outgroup if so requested).  The
432internal nodes are numbered arbitrarily for the sake of
433identification.  The number of trees evaluated so far and the log
434likelihood of the tree are also given.  Note that the trees printed out
435have a trifurcation at the base.  The branch lengths in the diagram are
436roughly proportional to the estimated branch lengths, except that very short
437branches are printed out at least three characters in length so that the
438connections can be seen.
439<P>
440A table is printed
441showing the length of each tree segment (in units of expected nucleotide
442substitutions per site), as well as (very) rough confidence
443limits on their lengths.  If a confidence limit is
444negative, this indicates that rearrangement of the tree in that region
445is not excluded, while if both limits are positive, rearrangement is
446still not necessarily excluded because the variance calculation on which
447the confidence limits are based results in an underestimate, which makes
448the confidence limits too narrow.
449<P>
450In addition to the confidence limits,
451the program performs a crude Likelihood Ratio Test (LRT) for each
452branch of the tree.  The program computes the ratio of likelihoods with and
453without this branch length forced to zero length.  This done by comparing the
454likelihoods changing only that branch length.  A truly correct LRT would
455force that branch length to zero and also allow the other branch lengths to
456adjust to that.  The result would be a likelihood ratio closer to 1.  Therefore
457the present LRT will err on the side of being too significant.  YOU ARE
458WARNED AGAINST TAKING IT TOO SERIOUSLY.  If you want to get a better
459likelihood curve for a branch length you can do multiple runs with
460different prespecified lengths for that branch, as discussed above in the
461discussion of the L option.
462<P>
463One should also
464realize that if you are looking not at a previously-chosen branch but at all
465branches, that you are seeing the results of multiple tests.  With 20 tests,
466one is expected to reach significance at the P = .05 level purely by
467chance.  You should therefore use a much more conservative significance level,
468such as .05 divided by the number of tests.  The significance of these tests
469is shown by printing asterisks next to
470the confidence interval on each branch length.  It is important to keep
471in mind that both the confidence limits and the tests
472are very rough and approximate, and probably indicate more significance than
473they should.  Nevertheless, maximum likelihood is one of the few methods that
474can give you any indication of its own error; most other methods simply fail to
475warn the user that there is any error!  (In fact, whole philosophical schools
476of taxonomists exist whose main point seems to be that there isn't any
477error, that the "most parsimonious" tree is the best tree by definition and
478that's that).
479<P>
480The log likelihood printed out with the final tree can be used to perform
481various likelihood ratio tests.  One can, for example, compare runs with
482different values of the expected transition/transversion ratio to determine
483which value is the maximum likelihood estimate, and what is the allowable range
484of values (using a likelihood ratio test, which you will find described in
485mathematical statistics books).  One could also estimate the base frequencies
486in the same way.  Both of these, particularly the latter, require multiple runs
487of the program to evaluate different possible values, and this might get
488expensive.
489<P>
490If the U (User Tree) option is used and more than one tree is supplied,
491and the program is not told to assume autocorrelation between the
492rates at different sites, the
493program also performs a statistical test of each of these trees against the
494one with highest likelihood.   If there are two user trees, the test
495done is one which is due to Kishino and Hasegawa (1989), a version
496of a test originally introduced by Templeton (1983).  In this
497implementation it uses the mean and variance of
498log-likelihood differences between trees, taken across sites.  If the two
499trees' means are more than 1.96 standard deviations different
500then the trees are
501declared significantly different.  This use of the empirical variance of
502log-likelihood differences is more robust and nonparametric than the
503classical likelihood ratio test, and may to some extent compensate for the
504any lack of realism in the model underlying this program.
505<P>
506If there are more than two trees, the test done is an extension of
507the KHT test, due to Shimodaira and Hasegawa (1999).  They pointed out
508that a correction for the number of trees was necessary, and they
509introduced a resampling method to make this correction.  In the version
510used here the variances and covariances of the sum of log likelihoods across
511sites are computed for all pairs of trees.  To test whether the
512difference between each tree and the best one is larger than could have
513been expected if they all had the same expected log-likelihood,
514log-likelihoods for all trees are sampled with these covariances and equal
515means (Shimodaira and Hasegawa's "least favorable hypothesis"),
516and a P value is computed from the fraction of times the difference between
517the tree's value and the highest log-likelihood exceeds that actually
518observed.  Note that this sampling needs random numbers, and so the
519program will prompt the user for a random number seed if one has not
520already been supplied.  With the two-tree KHT test no random numbers
521are used.
522<P>
523In either the KHT or the SH test the program
524prints out a table of the log-likelihoods of each tree, the differences of
525each from the highest one, the variance of that quantity as determined by
526the log-likelihood differences at individual sites, and a conclusion as to
527whether that tree is or is not significantly worse than the best one.  However
528the test is not available if we assume that there
529is autocorrelation of rates at neighboring sites (option A) and is not
530done in those cases.
531<P>
532The branch lengths printed out are scaled in terms of expected numbers of
533substitutions, counting both transitions and transversions but not
534replacements of a base by itself, and scaled so that the average rate of
535change, averaged over all sites analyzed, is set to 1.0
536if there are multiple categories of sites.  This means that whether or not
537there are multiple categories of sites, the expected fraction of change
538for very small branches is equal to the branch length.  Of course,
539when a branch is twice as
540long this does not mean that there will be twice as much net change expected
541along it, since some of the changes occur in the same site and overlie or
542even reverse each
543other.  The branch length estimates here are in terms of the expected
544underlying numbers of changes.  That means that a branch of length 0.26
545is 26 times as long as one which would show a 1% difference between
546the nucleotide sequences at the beginning and end of the branch.  But we
547would not expect the sequences at the beginning and end of the branch to be
54826% different, as there would be some overlaying of changes.
549<P>
550Confidence limits on the branch lengths are
551also given.  Of course a
552negative value of the branch length is meaningless, and a confidence
553limit overlapping zero simply means that the branch length is not necessarily
554significantly different from zero.  Because of limitations of the numerical
555algorithm, branch length estimates of zero will often print out as small
556numbers such as 0.00001.  If you see a branch length that small, it is really
557estimated to be of zero length.  Note that versions 2.7 and earlier of this
558program printed out the branch lengths in terms of expected probability of
559change, so that they were scaled differently.
560<P>
561Another possible source of confusion is the existence of negative values for
562the log likelihood.  This is not really a problem; the log likelihood is not a
563probability but the logarithm of a probability.  When it is
564negative it simply means that the corresponding probability is less
565than one (since we are seeing its logarithm).  The log likelihood is
566maximized by being made more positive: -30.23 is worse than -29.14.
567<P>
568At the end of the output, if the R option is in effect with multiple
569HMM rates, the program will print a list of what site categories
570contributed the most to the final likelihood.  This combination of
571HMM rate categories need not have contributed a majority of the likelihood,
572just a plurality.  Still, it will be helpful as a view of where the
573program infers that the higher and lower rates are.  Note that the
574use in this calculations of the prior probabilities of different rates,
575and the average patch length, gives this inference a "smoothed"
576appearance: some other combination of rates might make a greater
577contribution to the likelihood, but be discounted because it conflicts
578with this prior information.  See the example output below to see
579what this printout of rate categories looks like.
580A second list will also be printed out, showing for each site which
581rate accounted for the highest fraction of the likelihood.  If the fraction
582of the likelihood accounted for is less than 95%, a dot is printed instead.
583<P>
584Option 3 in the menu controls whether the tree is printed out into
585the output file.  This is on by default, and usually you will want to
586leave it this way.  However for runs with multiple data sets such as
587bootstrapping runs, you will primarily be interested in the trees
588which are written onto the output tree file, rather than the trees
589printed on the output file.  To keep the output file from becoming too
590large, it may be wisest to use option 3 to prevent trees being
591printed onto the output file.
592<P>
593Option 4 in the menu controls whether the tree estimated by the program
594is written onto a tree file.  The default name of this output tree file
595is "outtree".  If the U option is in effect, all the user-defined
596trees are written to the output tree file.
597<P>
598Option 5 in the menu controls whether ancestral states are estimated
599at each node in the tree.  If it is in effect, a table of ancestral
600sequences is printed out (including the sequences in the tip species which
601are the input sequences).  In that table, if a site has a base which
602accounts for more than 95% of the likelihood, it is printed in capital
603letters (A rather than a).  If the best nucleotide accounts for less
604than 50% of the likelihood, the program prints out an ambiguity code
605(such as M for "A or C") for the set of nucleotides which, taken together,
606account for more half of the likelihood.  The ambiguity codes are listed
607in the sequence programs documentation file.  One limitation of the current
608version of the program is that when there are multiple HMM rates
609(option R) the reconstructed nucleotides are based on only the single
610assignment of rates to sites which accounts for the largest amount of the
611likelihood.  Thus the assessment of 95% of the likelihood, in tabulating
612the ancestral states, refers to 95% of the likelihood that is accounted
613for by that particular combination of rates.
614<P>
615<H2>PROGRAM CONSTANTS</H2>
616<P>
617The constants defined at the beginning of the program include "maxtrees",
618the maximum number of user trees that can be processed.  It is small (100)
619at present to save some further memory but the cost of increasing it
620is not very great.  Other constants
621include "maxcategories", the maximum number of site
622categories, "namelength", the length of species names in
623characters, and three others, "smoothings", "iterations", and "epsilon", that
624help "tune" the algorithm and define the compromise between execution speed and
625the quality of the branch lengths found by iteratively maximizing the
626likelihood.  Reducing iterations and smoothings, and increasing epsilon, will
627result in faster execution but a worse result.  These values
628will not usually have to be changed.
629<P>
630The program spends most of its time doing real arithmetic.
631The algorithm, with separate and independent computations
632occurring for each pattern, lends itself readily to parallel processing.
633<P>
634<H2>PAST AND FUTURE OF THE PROGRAM</H2>
635<P>
636This program, which in version 2.6 replaced the old version of DNAML,
637is not derived directly
638from it but instead was developed by modifying CONTML, with which it shares
639many of its data structures and much of its strategy.  It was speeded up
640by two major developments, the use of aliasing of nucleotide sites (version
6413.1) and pretabulation of some exponentials (added by Akiko Fuseki in version
6423.4).  In version 3.5 the Hidden Markov Model code was added and the method
643of iterating branch lengths was changed from an EM algorithm to direct
644search.  The Hidden Markov Model code slows things down, especially if
645there is autocorrelation between sites, so this version is slower than
646version 3.4.  Nevertheless we hope that the sacrifice is worth it.
647<P>
648One change that is needed in the future is to put in some way of
649allowing for base composition of nucleotide sequences in different parts
650of the phylogeny.
651<P>
652<HR>
653<P>
654<H3>TEST DATA SET</H3>
655<P>
656<TABLE><TR><TD BGCOLOR=white>
657<PRE>
658   5   13
659Alpha     AACGTGGCCAAAT
660Beta      AAGGTCGCCAAAC
661Gamma     CATTTCGTCACAA
662Delta     GGTATTTCGGCCT
663Epsilon   GGGATCTCGGCCC
664</PRE>
665</TD></TR></TABLE>
666<P>
667<HR>
668<H3>CONTENTS OF OUTPUT FILE (with all numerical options on)</H3>
669<P>
670(It was run with HMM rates having gamma-distributed rates
671approximated by 5 rate categories,
672with coefficient of variation of rates 1.0, and with patch length
673parameter = 1.5.  Two user-defined rate categories were used, one for
674the first 6 sites, the other for the last 7, with rates 1.0 : 2.0.
675Weights were used, with sites 1 and 13 given weight 0, and all others
676weight 1.)
677<P>
678<TABLE><TR><TD BGCOLOR=white>
679<PRE>
680
681Nucleic acid sequence Maximum Likelihood method, version 3.6a3
682
683 5 species,  13  sites
684
685    Site categories are:
686
687             1111112222 222
688
689
690    Sites are weighted as follows:
691
692             0111111111 111
693
694
695Name            Sequences
696----            ---------
697
698Alpha        AACGTGGCCA AAT
699Beta         AAGGTCGCCA AAC
700Gamma        CATTTCGTCA CAA
701Delta        GGTATTTCGG CCT
702Epsilon      GGGATCTCGG CCC
703
704
705
706Empirical Base Frequencies:
707
708   A       0.23333
709   C       0.30000
710   G       0.23333
711  T(U)     0.23333
712
713Transition/transversion ratio =   2.000000
714
715
716Discrete approximation to gamma distributed rates
717 Coefficient of variation of rates = 1.000000  (alpha = 1.000000)
718
719State in HMM    Rate of change    Probability
720
721        1           0.264            0.522
722        2           1.413            0.399
723        3           3.596            0.076
724        4           7.086            0.0036
725        5          12.641            0.000023
726
727Expected length of a patch of sites having the same rate =    1.500
728
729
730Site category   Rate of change
731
732        1           1.000
733        2           2.000
734
735
736
737  +Beta     
738  | 
739  |                                                         +Epsilon   
740  |  +------------------------------------------------------3 
741  1--2                                                      +--Delta     
742  |  | 
743  |  +--------Gamma     
744  | 
745  +--Alpha     
746
747
748remember: this is an unrooted tree!
749
750Ln Likelihood =   -66.19167
751
752 Between        And            Length      Approx. Confidence Limits
753 -------        ---            ------      ------- ---------- ------
754
755     1          Alpha             0.49468     (     zero,     1.23032) **
756     1          Beta              0.00006     (     zero,     0.62569)
757     1             2              0.22531     (     zero,     2.28474)
758     2             3              8.20666     (     zero,    23.52785) **
759     3          Epsilon           0.00006     (     zero,     0.65419)
760     3          Delta             0.44668     (     zero,     1.10233) **
761     2          Gamma             1.34187     (     zero,     3.46288) **
762
763     *  = significantly positive, P < 0.05
764     ** = significantly positive, P < 0.01
765
766Combination of categories that contributes the most to the likelihood:
767
768             1122121111 112
769
770Most probable category at each site if > 0.95 probability ("." otherwise)
771
772             .......... ...
773
774Probable sequences at interior nodes:
775
776  node       Reconstructed sequence (caps if > 0.95)
777
778    1        .AGGTCGCCA AAC
779 Beta        AAGGTCGCCA AAC
780    2        .AggTcGcCA aAc
781    3        .GGATCTCGG CCC
782 Epsilon     GGGATCTCGG CCC
783 Delta       GGTATTTCGG CCT
784 Gamma       CATTTCGTCA CAA
785 Alpha       AACGTGGCCA AAT
786
787</PRE>
788</TD></TR></TABLE>
789</BODY>
790</HTML>
Note: See TracBrowser for help on using the repository browser.