JAL-1645 formatting tree distance docs
[jalview.git] / help / html / calculations / tree.html
1 <html>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4  * Copyright (C) $$Year-Rel$$ The Jalview Authors
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *  
13  * Jalview is distributed in the hope that it will be useful, but 
14  * WITHOUT ANY WARRANTY; without even the implied warranty 
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
16  * PURPOSE.  See the GNU General Public License for more details.
17  * 
18  * You should have received a copy of the GNU General Public License
19  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
20  * The Jalview Authors are detailed in the 'AUTHORS' file.
21  -->
22 <head><title>Tree Calculation</title></head>
23 <body>
24 <p><strong>Calculation of trees from alignments</strong></p>
25 <p>Trees are calculated on either the complete alignment, or just the
26 currently selected group of sequences, using the functions in the
27 <strong>Calculate&#8594;Calculate tree</strong> submenu. 
28 Once calculated, trees are displayed in a new <a 
29 href="../calculations/treeviewer.html">tree viewing window</a>. There are
30 four different calculations, using one of two distance measures and
31 constructing the tree from one of two algorithms :
32 </p>
33 <p><strong>Distance Measures</strong></p>
34 <p>Trees are calculated on the basis of a measure of similarity
35 between each pair of sequences in the alignment :
36         
37   
38   <ul>
39     <li><strong>PID</strong><br>The percentage identity
40       between the two sequences at each aligned position.
41       <ul>
42         <li>PID = Number of equivalent aligned non-gap symbols *
43           100 / Smallest number of non-gap positions in either of both
44           sequences<br> <em>This is essentially the 'number of
45             identical bases (or residues) per 100 base pairs (or
46             residues)'.</em>
47         </li>
48       </ul>
49     <li><strong>BLOSUM62, PAM250, DNA</strong><br/>These
50       options use one of the available substitution matrices to compute
51       a sum of scores for the residue pairs at each aligned position.
52       <ul><li>For details about each model, see the 
53       <a href="scorematrices.html">list of built-in score matrices</a>.
54         </li>
55         </ul></li>
56     <li><strong>Sequence Feature Similarity</strong><br>Trees
57       are constructed from a distance matrix formed from Jaccard
58       distances between sequence features observed at each column of the
59       alignment.
60       <ul>
61         <li>Similarity at column <em>i</em> = (Total number of
62           features displayed - Sum of number of features in common at <em>i</em>)
63           <br />Similarities are summed over all columns and divided by
64           the number of columns. <br />Since the total number of
65           feature types is constant over all columns of the alignment,
66           we do not scale the matrix, so tree distances can be
67           interpreted as the average number of features that differ over
68           all sites in the aligned region.
69         </li>
70
71       </ul> Distances are computed based on the currently displayed feature
72       types. Sequences with similar distributions of features of the
73       same type will be grouped together in trees computed with this
74       metric. <em>This measure was introduced in Jalview 2.9</em></li>
75   </ul>
76         <p><strong>Tree Construction Methods</strong></p>
77 <p>Jalview currently supports two kinds of agglomerative clustering
78 methods. These are not intended to substitute for rigorous
79 phylogenetic tree construction, and may fail on very large alignments.
80 <ul>
81 <li><strong>UPGMA tree</strong><br>
82   UPGMA stands for Unweighted Pair-Group Method using Arithmetic
83   averages. Clusters are iteratively formed and extended by finding a
84   non-member sequence with the lowest average dissimilarity over the
85   cluster members.
86 <p></p>
87 </li>
88 <li><strong>Neighbour Joining tree</strong><br>
89   First described in 1987 by Saitou and Nei, this method applies a
90   greedy algorithm to find the tree with the shortest branch
91   lengths.<br>
92   This method, as implemented in Jalview, is considerably more
93   expensive than UPGMA.
94 </li>
95 </ul>
96 <p>A newly calculated tree will be displayed in a new <a
97 href="../calculations/treeviewer.html">tree viewing window</a>. In
98 addition, a new entry with the same tree viewer window name will be added in the Sort
99 menu so that the alignment can be reordered to reflect the ordering of
100 the leafs of the tree. If the tree was calculated on a selected region
101 of the alignment, then the title of the tree view will reflect this.</p>
102
103 <p><strong>External Sources for Phylogenetic Trees</strong></p>
104   <p>A number of programs exist for the reliable construction of
105   phylogenetic trees, which can cope with large numbers of sequences,
106   use better distance methods and can perform bootstrapping. Jalview
107   can read <a
108   href="http://evolution.genetics.washington.edu/phylip/newick_doc.html">Newick</a>
109   format tree files using the 'Load Associated Tree' entry of the
110   alignment's File menu. Sequences in the alignment will be
111   automatically associated to nodes in the tree, by matching Sequence
112   IDs to the tree's leaf names.
113   </p>
114
115
116 </body>
117 </html>