. Computational Genomics 5a Distance Based Trees Reconstruction (cont.) Sections 7.1, 7.2, in Durbin et al. Chapter 17 in Gusfield (updated April 12, 2009)

Slides:



Advertisements
Similar presentations
Intro to Phylogenetic Trees Computational Genomics Lecture 4b
Advertisements

. Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield , Setubal&Meidanis 6.1.
. Class 9: Phylogenetic Trees. The Tree of Life Evolution u Many theories of evolution u Basic idea: l speciation events lead to creation of different.
Phylogenetic Trees Lecture 12
. Intro to Phylogenetic Trees Lecture 5 Sections 7.1, 7.2, in Durbin et al. Chapter 17 in Gusfield Slides by Shlomo Moran. Slight modifications by Benny.
. Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield , Setubal&Meidanis 6.1.
פרויקט בתכנות מחקר השוואתי בשחזור עצי אבולוציה: אלגוריתמים קיימים מול תכנות בשלמים אביב 2013 מרצה: שלמה מורן מנחה חיצוני: יוסי שילוח Website:
Phylogenetics - Distance-Based Methods CIS 667 March 11, 2204.
Phylogenetic reconstruction
Phylogenetic trees Sushmita Roy BMI/CS 576 Sep 23 rd, 2014.
The Saitou&Nei Neighbor Joining Algorithm ©Shlomo Moran & Ilan Gronau.
Molecular Evolution Revised 29/12/06
. Computational Genomics 5a Distance Based Trees Reconstruction (cont.) Modified by Benny Chor, from slides by Shlomo Moran and Ydo Wexler (IIT)
. Phylogeny II : Parsimony, ML, SEMPHY. Phylogenetic Tree u Topology: bifurcating Leaves - 1…N Internal nodes N+1…2N-2 leaf branch internal node.
Combining genes in phylogeny And How to test phylogeny methods … Tal Pupko Department of Cell Research and Immunology, George S. Wise Faculty of Life Sciences,
. Phylogenetic Trees Lecture 11 Sections 7.1, 7.2, in Durbin et al.
Bioinformatics Algorithms and Data Structures
. Advanced programming Algorithms for reconstructing phylogenetic trees spring 2006 Lecturer: Shlomo Moran, Taub 639, tel 4363 TA: Ilan Gronau,
. Distance-Based Phylogenetic Reconstruction ( part II ) Tutorial #11 © Ilan Gronau.
The Tree of Life From Ernst Haeckel, 1891.
. Phylogenetic Trees Lecture 1 Credits: N. Friedman, D. Geiger, S. Moran,
Multiple sequence alignment
. Class 9: Phylogenetic Trees. The Tree of Life D’après Ernst Haeckel, 1891.
. Comput. Genomics, Lecture 5b Character Based Methods for Reconstructing Phylogenetic Trees: Maximum Parsimony Based on presentations by Dan Geiger, Shlomo.
Distance-Based Phylogenetic Reconstruction Tutorial #8 © Ilan Gronau, edited by Itai Sharon.
Building Phylogenies Distance-Based Methods. Methods Distance-based Parsimony Maximum likelihood.
. Phylogenetic Trees (2) Lecture 12 Based on: Durbin et al Section 7.3, 7.8, Gusfield: Algorithms on Strings, Trees, and Sequences Section 17.
. Class 9: Phylogenetic Trees. The Tree of Life D’après Ernst Haeckel, 1891.
Phylogenetic Trees Lecture 2
. Phylogenetic Trees (2) Lecture 12 Based on: Durbin et al Section 7.3, 7.8, Gusfield: Algorithms on Strings, Trees, and Sequences Section 17.
. Phylogenetic Trees Lecture 11 Sections 7.1, 7.2, in Durbin et al.
Phylogenetic trees Sushmita Roy BMI/CS 576
. Phylogenetic Trees Lecture 11 Sections 7.1, 7.2, in Durbin et al.
9/1/ Ultrametric phylogenies By Sivan Yogev Based on Chapter 11 from “Inferring Phylogenies” by J. Felsenstein.
Multiple Sequence Alignment CSC391/691 Bioinformatics Spring 2004 Fetrow/Burg/Miller (Slides by J. Burg)
Phylogenetics Alexei Drummond. CS Friday quiz: How many rooted binary trees having 20 labeled terminal nodes are there? (A) (B)
1 Generalized Tree Alignment: The Deferred Path Heuristic Stinus Lindgreen
Phylogentic Tree Evolution Evolution of organisms is driven by Diversity  Different individuals carry different variants of.
Phylogenetic Analysis. General comments on phylogenetics Phylogenetics is the branch of biology that deals with evolutionary relatedness Uses some measure.
BINF6201/8201 Molecular phylogenetic methods
Bioinformatics 2011 Molecular Evolution Revised 29/12/06.
The Neighbor Joining Tree-Reconstruction Technique Lecture 13 ©Shlomo Moran & Ilan Gronau.
OUTLINE Phylogeny UPGMA Neighbor Joining Method Phylogeny Understanding life through time, over long periods of past time, the connections between all.
Phylogenetic Trees Tutorial 5. Agenda How to construct a tree using Neighbor Joining algorithm Phylogeny.fr tool Cool story of the day: Horizontal gene.
Introduction to Phylogenetic Trees
Building phylogenetic trees. Contents Phylogeny Phylogenetic trees How to make a phylogenetic tree from pairwise distances  UPGMA method (+ an example)
Introduction to Phylogenetics
CSCE555 Bioinformatics Lecture 12 Phylogenetics I Meeting: MW 4:00PM-5:15PM SWGN2A21 Instructor: Dr. Jianjun Hu Course page:
Calculating branch lengths from distances. ABC A B C----- a b c.
394C, Spring 2013 Sept 4, 2013 Tandy Warnow. DNA Sequence Evolution AAGACTT TGGACTTAAGGCCT -3 mil yrs -2 mil yrs -1 mil yrs today AGGGCATTAGCCCTAGCACTT.
Ch.6 Phylogenetic Trees 2 Contents Phylogenetic Trees Character State Matrix Perfect Phylogeny Binary Character States Two Characters Distance Matrix.
Phylogeny Ch. 7 & 8.
Phylogenetic trees Sushmita Roy BMI/CS 576 Sep 23 rd, 2014.
Tutorial 5 Phylogenetic Trees.
598AGB Basics Tandy Warnow. DNA Sequence Evolution AAGACTT TGGACTTAAGGCCT -3 mil yrs -2 mil yrs -1 mil yrs today AGGGCATTAGCCCTAGCACTT AAGGCCTTGGACTT.
Part 9 Phylogenetic Trees
Distance-Based Approaches to Inferring Phylogenetic Trees BMI/CS 576 Colin Dewey Fall 2010.
Distance-based methods for phylogenetic tree reconstruction Colin Dewey BMI/CS 576 Fall 2015.
Fitch-Margoliash Algorithm 1.From the distance matrix find the closest pair, e.g., A & B 2.Treat the rest of the sequences as a single composite sequence.
CSCE555 Bioinformatics Lecture 13 Phylogenetics II Meeting: MW 4:00PM-5:15PM SWGN2A21 Instructor: Dr. Jianjun Hu Course page:
Phylogenetic basis of systematics
394C, Spring 2012 Jan 23, 2012 Tandy Warnow.
dij(T) - the length of a path between leaves i and j
Multiple Alignment and Phylogenetic Trees
The Tree of Life From Ernst Haeckel, 1891.
Phylogenetic Trees.
CS 581 Tandy Warnow.
Phylogeny.
Computational Genomics Lecture #3a
Presentation transcript:

. Computational Genomics 5a Distance Based Trees Reconstruction (cont.) Sections 7.1, 7.2, in Durbin et al. Chapter 17 in Gusfield (updated April 12, 2009) Slides by Shlomo Moran and Ydo Wexler (IIT), modified by Benny Chor

2 Evolution Evolution of new organisms is driven by u Diversity l Different individuals carry different variants of the same basic blue print u Mutations l The DNA sequence can be changed due to single base changes, deletion/insertion of DNA segments, etc. u Selection bias

3 The Tree of Life Source: Alberts et al

4 D’après Ernst Haeckel, 1891 Tree of life- a better picture

5 Primate evolution A phylogeny is a tree that describes the sequence of speciation events that lead to the forming of a set of current day species; also called a phylogenetic tree.

6 Historical Note u Until mid 1950’s phylogenies were constructed by experts based on their opinion (subjective criteria) u Since then, focus on objective criteria for constructing phylogenetic trees l Thousands of articles in the last decades u Important for many aspects of biology l Classification l Understanding biological mechanisms

7 Morphological vs. Molecular u Classical phylogenetic analysis: morphological features: number of legs, lengths of legs, etc. u Modern biological methods allow to use molecular features l Gene sequences l Protein sequences u Analysis based on homologous sequences (e.g., globins) in different species

8 Topology based on Morphology Archonta Glires Ungulata Carnivora Insectivora Xenarthra (Based on Mc Kenna and Bell, 1997)

9 RatQEPGGLVVPPTDA RabbitQEPGGMVVPPTDA GorillaQEPGGLVVPPTDA CatREPGGLVVPPTEG From Sequences to a Phylogenetic Tree Different genes/proteins may lead to different phylogenetic trees

10 RatQEPGGLVVPPTDA RabbitQEPGGMVVPPTDA GorillaQEPGGLVVPPTDA CatREPGGLVVPPTEG From sequences to a phylogenetic tree There are many possible types of sequences to use (e.g. mitochondrial vs. nuclear proteins).

11 Perissodactyla Carnivora Cetartiodactyla Rodentia 1 Hedgehogs Rodentia 2 Primates Chiroptera Moles+Shrews Afrotheria Xenarthra Lagomorpha + Scandentia Topology 1, based on Mitochondrial DNA (Based on Pupko et al.,)

12 Cetartiodactyla Afrotheria Chiroptera Eulipotyphla Glires Xenarthra Carnivora Perissodactyla Scandentia+ Dermoptera Pholidota Primate (tree by Madsenl) (Based on Pupko et al. slide) Topology 2,based on Nuclear DNA

13 Theory of Evolution u Basic idea l speciation events lead to creation of different species. l Speciation caused by physical separation into groups where different genetic variants become dominant u Any two species share a (possibly distant) common ancestor

14 Phylogenenetic trees u Leafs - current day species u Nodes - hypothetical most recent common ancestors u Edges length - “time” from one speciation to the next AardvarkBisonChimpDogElephant

15 Types of Trees A natural model to consider is that of rooted trees Common Ancestor

16 Types of trees Unrooted tree represents the same phylogeny without the root node Depending on the model, data from current day species often does not distinguish between different placements of the root.

17 Rooted versus unrooted trees Tree a a b Tree b c Tree c Represents all three rooted trees

18 Number of Different Trees on n Leaves For n=4, there are 3 different unrooted trees For n=5, there are 3*5=15 different unrooted trees For n=6, there are 3*5*7=15 different unrooted trees For n, there are n!! = 3*5*…*(2n-5)=(2n-5)!/[2 n-3 *(n-3)!] different unrooted trees on n labeled leaves. There are 3*5*…*(2n-3)=(2n-3)!/[2 n-2 *(n-2)!] different rooted trees on n labeled leaves (same as number of unrooted trees on n+1 labeled leaves. In both cases, number is too large to go over all of them!

19 Positioning Roots in Unrooted Trees u We can estimate the position of the root by introducing an outgroup: l a set of species that are definitely distant from all the species of interest AardvarkBisonChimpDogElephant Falcon Proposed root

20 Phylogenetic Trees - Methods There are several methods with which we construct trees and estimate how good a tree describes the data (and thus the evolution process) Distance based methods Parsimony character based methods Likelihood Whole genome/proteome methods

21 Methods u Distance-based l Input is a matrix of distances between species. l Can be fraction of residue they disagree on, or alignment score between them, etc. u Character-based l Input is a multiple sequence alignment. Sequences consist of characters (e.g., residues) that are examined separately. u Genome/Proteome –based l Input is whole genome or proteome sequences. l No MSA or obvious distance definition.

22 Tree Construction: Different Outcomes u Distance Based- Output is a weighted tree that realizes the distances between the objects (or gets close to it). u Character Based – Output is a tree that optimizes an objective function based on all characters in input sequences (major methods are parsimony and likelihood). We start with distance based methods, and consider the following question: Given a set of species (leaves in a supposed tree), and distances between them – construct a phylogeny which best “fits” the distances.

23 Exact solution: Additive sets Given a set M of L objects with an L×L distance matrix: u d(i,i)=0, and for i≠j, d(i,j)>0 u d(i,j)=d(j,i). u For all i,j,k it holds that d(i,k) ≤ d(i,j)+d(j,k). Can we construct a weighted tree which realizes these distances? We should first clarify what realizes means.

24 Additive sets (cont) We say that the set of distances M on L objects is additive if there is a tree T, L of its nodes correspond to the L objects, with positive weights on the edges, such that for all i,j, d(i,j) = d T (i,j), the length of the path from i to j in T. Note: Sometimes the tree is required to be binary, and then the edge weights are required to be just non-negative.

25 Three objects sets is always additive: For L=3: There is always a (unique) tree with one internal node. a b c i j k m Thus 3 equations in 3 unknowns: a,b,c

26 How about four objects? L=4: Not all sets with 4 objects are additive: e.g., there is no tree which realizes the distances below. ijkl i 0222 j 022 k 03 l 0

27 The Four Points Condition Theorem: A set M of L objects is additive iff any subset of four objects can be labeled i,j,k,l so that: d(i,k) + d(j,l) = d(i,l) +d(k,j) ≥ d(i,j) + d(k,l) We call (i,j),(k,l) the “split” of {i,j,k,l}. i k l j Proof: Additivity  4 Points Condition: By the figure (and maybe the board...)

28 Additive Distances We say that a distance metric D on L objects is additive if there is an unrooted binary tree on L leaves, with positive edge weights, that realizes the distance D. Namely for all i,j, D(i,j)=D T (i,j)

29 Characterizing Additive Distances Thm: Any additive distance is fully characterized by the four point condition: Any 4 points can be renamed such that

30 Trees from Additive Distances: Algorithm Verify that the distance matrix constitutes an additive metric Choose a pair of objects, which results in the first path in the tree. Choose a third object and establish the linear equations to let the object branch off the path. Choose a pair of leaves in the tree constructed so far and compute the point a newly chosen object is inserted at. 1. If the new path branches off an existing branch in the tree: Do the insertion step once more, replacing one of the two original leaves by another leaf along the branching path. 2. Once the new path branches off an edge in the tree, this insertion is finished. ABCDE A02747 B0747 C076 D07 E0 A C 7

31 Verify that the distance matrix constitutes an additive metric Choose a pair of objects, which results in the first path in the tree. Choose a third object and establish the linear equations to let the object branch off the path. Choose a pair of leaves in the tree constructed so far and compute the point a newly chosen object is inserted at. 1. If the new path branches off an existing branch in the tree: Do the insertion step once more, replacing one of the two original leaves by another leaf along the branching path. 2. Once the new path branches off an edge in the tree: This insertion is finished. ABCDE A02747 B0747 C076 D07 E0 A C 6 B 1 1 X Trees from Additive Distances: Algorithm

32 Verify that the distance matrix constitutes an additive metric Choose a pair of objects, which results in the first path in the tree. Choose a third object and establish the linear equations to let the object branch off the path. Choose a pair of leaves in the tree constructed so far and compute the point a newly chosen object is inserted at. 1. If the new path branches off an existing branch in the tree: Do the insertion step once more, replacing one of the two original leaves by another leaf along the branching path. 2. Once the new path branches off an edge in the tree: This insertion is finished. ABCDE A02747 B0747 C076 D07 E0 d(A,B)=d(A,X)+d(X,B) d(A,C)=d(A,X)+d(X,C) d(B,C)=d(B,X)+d(X,C) Trees from Additive Distances: Algorithm

33 Verify that the distance matrix constitutes an additive metric Choose a pair of objects, which results in the first path in the tree. Choose a third object and establish the linear equations to let the object branch off the path. Choose a pair of leaves in the tree constructed so far and compute the point a newly chosen object is inserted at. 1. If the new path branches off an existing branch in the tree: Do the insertion step once more, replacing one of the two original leaves by another leaf along the branching path. 2. Once the new path branches off an edge in the tree: This insertion is finished. ABCDE A02747 B0747 C076 D07 E0 A C 6 B 1 1 X Trees from Additive Distances: Algorithm

34 Verify that the distance matrix constitutes an additive metric Choose a pair of objects, which results in the first path in the tree. Choose a third object and establish the linear equations to let the object branch off the path. Choose a pair of leaves in the tree constructed so far and compute the point a newly chosen object is inserted at. 1. If the new path branches off an existing branch in the tree: Do the insertion step once more, replacing one of the two original leaves by another leaf along the branching path. 2. Once the new path branches off an edge in the tree: This insertion is finished. ABCDE A02747 B0747 C076 D07 E0 A C 1 B D Trees from Additive Distances: Algorithm (we now add E on the A-to-D path)

35 Verify that the distance matrix constitutes an additive metric Choose a pair of objects, which results in the first path in the tree. Choose a third object and establish the linear equations to let the object branch off the path. Choose a pair of leaves in the tree constructed so far and compute the point a newly chosen object is inserted at. 1. If the new path branches off an existing branch in the tree: Do the insertion step once more, replacing one of the two original leaves by another leaf along the branching path. 2. Once the new path branches off an edge in the tree: This insertion is finished. ABCDE A02747 B0747 C076 D07 E0 A C 1 B D E 5 NO! Trees from Additive Distances: Algorithm

36 Verify that the distance matrix constitutes an additive metric Choose a pair of objects, which results in the first path in the tree. Choose a third object and establish the linear equations to let the object branch off the path. Choose a pair of leaves in the tree constructed so far and compute the point a newly chosen object is inserted at. 1. If the new path branches off an existing branch in the tree: Do the insertion step once more, replacing one of the two original leaves by another leaf along the branching path. 2. Once the new path branches off an edge in the tree: This insertion is finished. ABCDE A02747 B0747 C076 D07 E0 A C 1 B D E 3 3 Trees from Additive Distances: Algorithm

37 Verify that the distance matrix constitutes an additive metric Choose a pair of objects, which results in the first path in the tree. Choose a third object and establish the linear equations to let the object branch off the path. Choose a pair of leaves in the tree constructed so far and compute the point a newly chosen object is inserted at. 1. If the new path branches off an existing branch in the tree: Do the insertion step once more, replacing one of the two original leaves by another leaf along the branching path. 2. Once the new path branches off an edge in the tree: This insertion is finished. ABCDE A02747 B0747 C076 D07 E0 A C 1 B D E 3 3 is this necessary? Trees from Additive Distances: Algorithm

38 Reconstructing a Tree from an Additive Distance ABCDE A02747 B0747 C076 D07 E0 A C 1 B D E 3 3 By algorithm, given a distance matrix constituting an additive metric, the topology of the corresponding additive tree is unique. Q.: Given an additive metric on n leaves, what is the run time of the algorithm? A.: Number of phases is n. Work per phase is O(n). So total is O(n 2 ).

39 Approximating Additive Metrices In practice, the distance matrix between molecular sequences will not be additive. In such case we want to find a tree T whose distance matrix is “close” to the given one. The methods for exact tree reconstruction provide an inventory for heuristics for tree construction based on approximating additive metrics. Heuristics give exact results when operating on additive metrics, but the performance of solutions gets unclear when non additive metrics are handled.

40 Neighbor Finding How can we find from distances alone a pair of sisters (neighboring leaves)? Important observation: Closest nodes are not necessarily neighboring leaves. A B C D Next, we show a way to find neighbors from distances. The method is simple, but unfortunately not very intuitive 

41 Neighbour Joining Algorithm: Outline Identify a pair of leaves u,v as neighbors. Combine u,v into a new node, w. Update the distance matrix: Calculate w’s distance from any other node x of the tree using Notice that all 3 quantities on rhs are known. When only 3 nodes are left – compute 3 distances & finish.

42 Neighbour Joining Algorithm Identify a pair of neighbors i,j among n leaves. Combine i,j into a new node u. Update the distance matrix. When only 3 nodes are left – finish. Let r i be the sum of distances from i to every other node The measure between i and j we use in the algorithm is im jn kl

43 Neighbour Joining Algorithm Let r i be the sum of distances from i to all other nodes The measure between i and j we use in the algorithm is im jn kl

44 Neighbor Finding: Seitou & Nei method Theorem (Saitou&Nei) Assume D is additive, and all tree edge weights are positive. If X D (i,j) is minimal (among all pairs of leaves), then i and j are sister taxa in the tree. i j kl m T1T1 T2T2 The proof is rather involved, and will be skipped (no tears, pls).skipped

45 Complexity of Neighbor Joining Algorithm Naive Implementation: Initialization: θ(L 2 ) to compute the X D (i,j)’s. Each Iteration: u O(L) to update {X D (i,k):i  L} for the new node k. u O(L 2 ) to find the minimal X D (i,j). Total of O(L 3 ). u This can be improved using better data structures (e.g. heap) i j k m

46 Reconstructing Trees from Additive Matrices ABCDE A02747 B0747 C076 D07 E0 A C 1 B D E 3 3 Q: Do we have to test additivity before running NJ? A: By Seito-Nei, if matrix is additive, NJ will construct the correct tree. Algorithm does not care about awareness and need not know anything about the matrix!

47 Running NJ: Example on 4 Leaves ABCD A0236 B2035 C3306 D6560 U B A Remark: The X D values imply that the distances are not additive (why?).

48 Updated Distance Matrix, Choosing A,B as Neighbors UCD U024.5 C206 D 60 U B A V D Notice that now we have only one Choice: The neighbors are U and D. d(U,x)=[d(A,x)+d(B,x)-d(A,B)]/2

49 Final Distance Matrix VC V05.6 C 0 U B A V D C Remark: Resulting tree is unrooted.

50 Reconstructing Trees from non Additive Matrices Q: What if the distance matrix is not additive? A: We could still run NJ (like we just did)! Q: But can anything be said about the resulting tree? A: Not really. Resulting tree topology could even vary according to way ties are resolved on the way. Remark: This indeed was the case with last example.

51 Distance Matrix Example

52 Unrooted Tree - NJ Root (arbitrary)

53 Output - NJ Tree Branch length is proportional to distance

54 N-J Method produces an Unrooted, Additive tree

55 Almost Additive Matrix A distance matrix d’ is “almost additive” if there exists an additive matrix D such that Thm (Atteson): If d’ is almost additive with respect to a tree T, then the output of NJ is a tree T’ with the same topology as T