Phylogene)c ¡Trees
¡
COMPSCI ¡260 ¡– ¡Spring ¡2016 ¡
Phylogene)c Trees COMPSCI 260 Spring 2016 Phylogene)cs - - PowerPoint PPT Presentation
Phylogene)c Trees COMPSCI 260 Spring 2016 Phylogene)cs Phylogene)cs is the study of evolu)onary rela)onships among organisms or genes In general,
¡
COMPSCI ¡260 ¡– ¡Spring ¡2016 ¡
– reconstruct ¡evolu)onary ¡)es ¡ ¡ between ¡species ¡ – es)mate ¡the ¡)me ¡of ¡divergence ¡ ¡ between ¡species ¡since ¡they ¡ ¡ last ¡shared ¡a ¡common ¡ancestor ¡
each ¡a ¡name ¡composed ¡of ¡two ¡parts, ¡both ¡of ¡which ¡use ¡La)n ¡gramma)cal ¡ forms, ¡although ¡they ¡can ¡be ¡based ¡on ¡words ¡from ¡other ¡languages ¡
belongs; ¡the ¡second ¡part ¡iden)fies ¡the ¡species ¡within ¡the ¡genus. ¡ ¡
human chimp mouse rat Homo sapiens Mus musculus Ratus norvegicus Pan troglodytes
neighbors) ¡
– Leaves: ¡current ¡species ¡ – Internal ¡nodes: ¡(hypothe)cal) ¡ ancestral ¡species ¡
– Amount ¡of ¡change ¡(muta)on ¡ rate) ¡or ¡ – Evolu)onary ¡)me ¡
human chimp mouse rat human chimp mouse rat chicken
neighbors) ¡
– Leaves: ¡current ¡species ¡ – Internal ¡nodes: ¡(hypothe)cal) ¡ ancestral ¡species ¡
– Amount ¡of ¡change ¡(muta)on ¡ rate) ¡or ¡ – Evolu)onary ¡)me ¡
human chimp mouse rat chicken human chimp mouse rat chicken time today
features ¡(e.g., ¡beak ¡shapes, ¡presence ¡of ¡feathers, ¡number ¡of ¡legs, ¡ etc). ¡ ¡
protein ¡sequences ¡
– Each ¡character ¡has ¡a ¡finite ¡number ¡of ¡states. ¡For ¡example, ¡discrete ¡ characters ¡include ¡the ¡number ¡of ¡legs ¡of ¡an ¡organism, ¡or ¡a ¡column ¡in ¡ an ¡alignment ¡of ¡DNA ¡sequences. ¡ ¡
– These ¡data ¡encode ¡the ¡distances ¡between ¡objects ¡and ¡are ¡usually ¡ derived ¡from ¡sequence ¡data. ¡For ¡example, ¡we ¡could ¡hypothe)cally ¡say ¡ distance(man,mouse) ¡= ¡500 ¡and ¡distance(man,chimp) ¡= ¡100. ¡ ¡
different ¡phylogene)c ¡trees ¡(because ¡different ¡genes/proteins ¡may ¡ evolve ¡at ¡different ¡rates) ¡
broad ¡correspondence ¡between ¡lengths ¡of ¡branches ¡and ¡ evolu)onary ¡)me ¡
Which nodes are connected? 2 3 4 1 6 5 2 3 4 1 6 5
+ edge lengths
sequences ¡in ¡a ¡phylogene)c ¡tree ¡have ¡descended ¡from ¡an ¡ancestral ¡ gene ¡A ¡in ¡an ¡ancestral ¡species ¡
common ¡ancestor ¡is ¡through ¡a ¡duplica)on ¡event ¡in ¡the ¡same ¡species ¡
Gene A Species 1 Gene A Species 2 Gene A Species 3 Gene A1 Gene A2 Gene A
Paralogs ¡ Orthologs ¡ We ¡need ¡to ¡make ¡sure ¡we ¡are ¡using ¡orthologs ¡when ¡building ¡ ¡ phylogene)c ¡trees!!! ¡
globin ¡are ¡paralogs ¡or ¡orthologs? ¡ ¡
globin ¡are ¡homologs ¡or ¡orthologs? ¡
– Evolu)onary ¡distances ¡are ¡computed ¡for ¡all ¡leaf ¡nodes, ¡ and ¡these ¡are ¡used ¡to ¡construct ¡trees ¡
– The ¡tree ¡is ¡chosen ¡to ¡minimize ¡the ¡number ¡of ¡changes ¡ required ¡to ¡explain ¡the ¡data ¡ ¡
– Under ¡a ¡model ¡of ¡sequence ¡evolu)on, ¡we ¡search ¡for ¡the ¡ tree ¡which ¡gives ¡the ¡highest ¡likelihood ¡of ¡the ¡data ¡
human chimp mouse rat chicken Gene A
any ¡2 ¡leaf ¡nodes ¡(i.e., ¡any ¡2 ¡sequences) ¡
– Align ¡the ¡2 ¡sequences ¡and ¡take ¡the ¡frac)on ¡of ¡nucleo)des/amino ¡ acids ¡that ¡are ¡different ¡ – Use ¡models ¡of ¡residue/nucleo)de ¡subs)tu)on ¡(for ¡example, ¡the ¡ Jukes-‑Cantor ¡model ¡for ¡DNA ¡sequences) ¡ Assume ¡we ¡have ¡5 ¡sequences. ¡ ¡ We ¡need ¡to ¡define ¡a ¡metric: ¡ d =
1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡ 1 ¡ 0 ¡ * ¡ 2 ¡ * ¡ 0 ¡ 3 ¡ 0 ¡ 4 ¡ 0 ¡ 5 ¡ 0 ¡
averages ¡[the ¡name ¡is ¡actually ¡more ¡complicated ¡than ¡the ¡method] ¡
2 3 1 4 5
???
2 3 1 4 5
UPGMA
6 7 8 9 2 3 1 4 5 6 7 8 9
averages ¡[the ¡name ¡is ¡actually ¡more ¡complicated ¡than ¡the ¡method] ¡
2 3 1 4 5 6 7 8 9
i∈ Cp, j∈ Cq
(average ¡linkage ¡clustering) ¡
– For ¡each ¡sequence ¡i, ¡create ¡cluster ¡Ci ¡ – For ¡each ¡sequence ¡i, ¡create ¡a ¡leaf ¡node ¡at ¡height ¡0 ¡
– Find ¡i,j such ¡that ¡dij is ¡minimal ¡ – Define ¡new ¡cluster ¡Ck = Ci U Cj ¡and ¡compute ¡dkl for ¡all ¡other ¡clusters ¡l – Create ¡node ¡k ¡(parent ¡of ¡i and ¡j) ¡at ¡height ¡dij/2 ¡ – Remove ¡clusters ¡i and ¡j
– When ¡only ¡2 ¡clusters ¡remain ¡ – Create ¡root ¡at ¡height ¡dij/2 ¡ i j k
x∈ Ck ,y∈ Cl
Compu)ng ¡the ¡distance ¡between ¡two ¡clusters: ¡ A ¡more ¡efficient ¡way ¡to ¡compute ¡the ¡distance: ¡ dkl =
Ck = Ci U Cj How ¡many ¡pairs? ¡ Time ¡complexity: ¡ ¡ Naïve ¡implementa)on: ¡n ¡itera)ons, ¡O(n2) ¡)me ¡for ¡each ¡itera)on ¡(to ¡find ¡ ¡ a ¡closest ¡pair) ¡=> ¡O(n3) ¡total. ¡ Op)mal ¡implementa)on: ¡O(n2) ¡ ¡ ¡ ¡
2 3 1 4 5 6 7 8 9 2 3 1 4 5 6 7 8 9
d12 2 d45 2 d37 2 d68 2
the ¡rates ¡of ¡evolu)on ¡are ¡the ¡same ¡among ¡different ¡lineages) ¡
4 2 3 1 UPGMA 3 1 4 2
4 2 3 1
NO
Pairs ¡of ¡distances ¡
YES ¡ Is ¡this ¡tree ¡addi)ve? ¡
4 2 3 1
Joining ¡algorithm ¡(NJ) ¡to ¡build ¡an ¡unrooted ¡phylogene)c ¡tree ¡
– Find ¡two ¡neighbors ¡i ¡and ¡j – Join ¡them ¡and ¡create ¡a ¡new ¡node ¡k – Recompute ¡distances: ¡ – Remove ¡nodes ¡i ¡and ¡j ¡ – Un)l ¡only ¡two ¡nodes ¡remain ¡
1 2 4 3 i j m k
1 3 4 2
edges ¡
i + rj)
i =
k∈L
where ¡L ¡= ¡the ¡set ¡of ¡leaves ¡
distance ¡to ¡all ¡other ¡nodes ¡ ¡
1 2
0.1
3 4
0.4 0.4 0.1 0.1
i, j dij
i, j Dij
i + rj)
i =
k∈L
– L= the set of leaf nodes (the set of all sequences)
– Choose i,j in L such that Dij is minimal – Define new node k – Recompute distances to all other nodes m: – Add node k to the tree – Add edges to i and j with lengths – Remove i and j from L; add k to L
– When |L|=2; add edge (i,j) with length dij
i − rj)
i j m k
the ¡correct ¡unrooted ¡tree ¡
1 2 4 3 1 2 4 3 1 2 4 3 1 2 4 3
∀i, j,k,l one ¡can ¡shuffle ¡them ¡to ¡achieve ¡ dij + dkl = dik + d jl ≥ dil + d jk
– NJ ¡on ¡a ¡set ¡of ¡n ¡sequences ¡requires ¡O(n) ¡itera)ons ¡ – At ¡each ¡step ¡one ¡has ¡to ¡build ¡and ¡search ¡a ¡D ¡matrix ¡ – Ini)ally ¡the ¡D ¡matrix ¡is ¡size ¡n ¡x ¡n, ¡then ¡at ¡the ¡next ¡step ¡it ¡is ¡ (n-‑1)x(n-‑1), ¡etc. ¡ ¡ – This ¡leads ¡to ¡an ¡algorithm ¡with ¡a ¡)me ¡complexity ¡of ¡O(n3) ¡
– At ¡each ¡step, ¡NJ ¡greedily ¡joins ¡that ¡pair ¡of ¡sequences ¡that ¡will ¡ give ¡the ¡greatest ¡decrease ¡in ¡the ¡es)mated ¡tree ¡length ¡
bootstrapping ¡(compared ¡to ¡maximum ¡parsimony ¡or ¡maximum ¡ likelihood ¡approaches, ¡which ¡may ¡be ¡computa)onally ¡prohibi)ve) ¡
UPGMA ¡ algorithm ¡ Neighbor ¡Joining ¡ algorithm ¡
Pairwise ¡distance ¡metric ¡(d) ¡ between ¡sequences ¡must ¡be: ¡ ¡
ultrametric ¡ addi/ve ¡
The ¡tree ¡will ¡be: ¡
rooted ¡ unrooted ¡ If ¡d ¡is ¡ultrametric, ¡why ¡don’t ¡we ¡build ¡a ¡NJ ¡tree? ¡
distance ¡d) ¡is: ¡
2 3 4 1 0.2 0.2 0.2 0.1 0.3 0.3 1 ¡ 2 ¡ 3 ¡ 4 ¡ 1 ¡ 0 ¡ 0.4 ¡ 0.8 ¡ 0.8 ¡ 2 ¡ 0 ¡ 0.8 ¡ 0.8 ¡ 3 ¡ 0 ¡ 0.6 ¡ 4 ¡ 0 ¡ d =
We can root an unrooted tree by finding an outgroup
– L= the set of leaf nodes (the set of all sequences)
– Choose i,j in L such that Dij is minimal – Define new node k – Recompute distances to all other nodes m: – Add node k to the tree – Add edges to i and j with lengths – Remove i and j from L; add k to L
– When |L|=2; add edge (i,j) with length dij
i − rj)
i j m k
distance ¡d) ¡is: ¡
2 3 4 1 0.2 0.2 0.2 0.1 0.3 0.3 1 ¡ 2 ¡ 3 ¡ 4 ¡ 1 ¡ 0 ¡ 0.4 ¡ 0.8 ¡ 0.8 ¡ 2 ¡ 0 ¡ 0.8 ¡ 0.8 ¡ 3 ¡ 0 ¡ 0.6 ¡ 4 ¡ 0 ¡ d =
We can root an unrooted tree by finding an outgroup
– Evolu)onary ¡distances ¡are ¡computed ¡for ¡all ¡leaf ¡nodes, ¡ and ¡these ¡are ¡used ¡to ¡construct ¡trees ¡ – UPGMA, ¡NJ ¡
– The ¡tree ¡is ¡chosen ¡to ¡minimize ¡the ¡number ¡of ¡changes ¡ required ¡to ¡explain ¡the ¡data ¡ ¡
– Under ¡a ¡model ¡of ¡sequence ¡evolu)on, ¡we ¡search ¡for ¡the ¡ tree ¡which ¡gives ¡the ¡highest ¡likelihood ¡of ¡the ¡data ¡
sta)s)cs ¡or ¡parameters ¡when ¡the ¡distribu)on ¡is ¡difficult ¡to ¡ derive ¡analy)cally ¡ ¡
sequences, ¡and ¡create ¡many ¡new ¡alignments ¡(with ¡ replacement) ¡
(out ¡of ¡all ¡the ¡trees ¡that ¡were ¡built) ¡
Es)mate ¡the ¡confidence ¡of ¡the ¡ two ¡internal ¡branches ¡ Of ¡the ¡100 ¡generated ¡trees, ¡we ¡see: ¡
41 ¡ 100 ¡
minimal number of substitutions
parsimonious?
AAG AAA GGA AGA AAG AAA GGA AGA AGA AAA AAA 1 1 1 AAG AGA AAA GGA AAA AAA AAA 1 2 1
necessary to search through all topologies (or use a more efficient strategy) to identify the “best” tree
maximum ¡likelihood ¡(ML) ¡
the ¡Jukes ¡and ¡Cantor ¡model ¡for ¡DNA ¡sequences), ¡pick ¡the ¡tree ¡that ¡ has ¡the ¡highest ¡probability ¡of ¡genera)ng ¡the ¡observed ¡data ¡ ¡
find ¡the ¡tree ¡T ¡that ¡maximizes ¡the ¡likelihood ¡P(D|T,M) ¡ ¡
parsimony ¡or ¡distance-‑based ¡methods ¡
are ¡considered ¡to ¡be ¡the ¡best ¡for ¡reconstruc)ng ¡phylogene)c ¡trees ¡