Phylogenies Phylogenies describe history Phylogenies describe - - PowerPoint PPT Presentation

phylogenies phylogenies describe history phylogenies
SMART_READER_LITE
LIVE PREVIEW

Phylogenies Phylogenies describe history Phylogenies describe - - PowerPoint PPT Presentation

Phylogenies Phylogenies describe history Phylogenies describe history Haeckel. 1879. Phylogenies describe history Pace. 1997. Science. Phylogenies are the result of branching processes Timeseries and phylogeny are dual outcomes of an


slide-1
SLIDE 1

Phylogenies

slide-2
SLIDE 2

Phylogenies describe history

slide-3
SLIDE 3

Phylogenies describe history

  • Haeckel. 1879.
slide-4
SLIDE 4

Phylogenies describe history

  • Pace. 1997. Science.
slide-5
SLIDE 5

Phylogenies are the result of branching processes

slide-6
SLIDE 6

Timeseries and phylogeny are dual

  • utcomes of an infectious process
slide-7
SLIDE 7

Time Epidemic process

slide-8
SLIDE 8

Epidemic process Time Count

slide-9
SLIDE 9

Time Count

Can ask for the probability of observing this timeseries given epidemiological parameters β and γ.

Epidemic process

slide-10
SLIDE 10

Time Epidemic process

slide-11
SLIDE 11

Time Epidemic process

Sample some individuals

slide-12
SLIDE 12

Epidemic branching process Time

slide-13
SLIDE 13

Epidemic branching process Time

slide-14
SLIDE 14

Epidemic branching process Time

Can ask for the probability of observing this tree given epidemiological parameters β and γ.

slide-15
SLIDE 15

The coalescent

Assume equilibrium number of infecteds. Call this equilibrium N.

slide-16
SLIDE 16

The coalescent

Sample some individuals

slide-17
SLIDE 17

The coalescent

Each generation, there is a small chance for coalescence for each pair

Pr(coal|i = 2) = 1 N

slide-18
SLIDE 18

The coalescent

Probability of coalescence scales quadratically with lineage count

Pr(coal) = ✓i 2 ◆ 1 N = i(i − 1) 2N

slide-19
SLIDE 19

The coalescent

slide-20
SLIDE 20

The coalescent

slide-21
SLIDE 21

The coalescent

slide-22
SLIDE 22

The coalescent T3 T2

Ti ∼ Exponential ✓ 2N i(i − 1) ◆

slide-23
SLIDE 23

Demo

slide-24
SLIDE 24

5k 10k 5k 10k

  • 5k

5k 10k

  • 5k

5k 10k

  • 15k
  • 10k
  • 5k

5k 10k

  • 20k
  • 15k
  • 10k
  • 5k

5k 10k

N = 500 N = 1000 N = 2000 N = 5000 N = 10000 N = 20000

Population size affects tree shape

The rate of coalescence decreases linearly with the population size N.

slide-25
SLIDE 25

Changing population size

Constant size Growing population

slide-26
SLIDE 26

Changing population size

Constant size Growing population

slide-27
SLIDE 27

Generally, we want to know: Bayes rule:

p(model|data)

Often referred to as:

posterior ∝ likelihood × prior

Given a phylogeny, how can we learn about the evolutionary process that underlies it?

p(model|data) ∝ p(data|model) p(model)

slide-28
SLIDE 28

In this case, we have:

p(λ|τ) ∝ p(τ|λ) p(λ) λ – coalescent model

– phylogeny

τ

However, we don’t observe the tree directly:

p(τ, µ|D) ∝ p(D|τ, µ) p(τ) p(µ)

– sequence data

D µ – mutation model

We integrate over uncertainty:

p(λ|D) ∝ Z p(D|τ, µ) p(τ|λ) p(λ) p(µ) dτ dµ

slide-29
SLIDE 29

BEAST: Bayesian Evolutionary Analysis by Sampling Trees

slide-30
SLIDE 30

Integration through Markov chain Monte Carlo

  • 12
  • 10
  • 8
  • 6
  • 4
  • 2

2

  • 3
  • 2
  • 1

1 2 3 x1 x2

slide-31
SLIDE 31

Integration through Markov chain Monte Carlo

  • 12
  • 10
  • 8
  • 6
  • 4
  • 2

2

  • 3
  • 2
  • 1

1 2 3 x1 x2

slide-32
SLIDE 32

Metropolis-Hastings algorithm

Acceptance probability: p (θ*) p (θ) If new state is more likely, always accept. If new state is less likely, accept with probability proportional to ratio of new state to old state. p(x) = 0.2 Starting from state θ propose a new state θ*. For the following, this proposal must to symmetric, i.e. Q(θ➝ θ*) = Q(θ*➝ θ) min 1,

( )

Simple example: p(y) = 0.8 A(x➝y) = 0.8/0.2 = 1 A(y➝x) = 0.2/0.8 = 0.25 Mass moving from x to y: p(x) A(x➝y) = 0.2╳1 = 0.2 Mass moving from y to x: p(y) A(y➝x) = 0.8╳0.25 = 0.2

slide-33
SLIDE 33

BEAST will produce samples from:

λ – coalescent model

– phylogeny

τ µ – mutation model

slide-34
SLIDE 34

Use a ‘skyline’ demographic model N1 N2 N3 N4

slide-35
SLIDE 35

Use a ‘skyline’ demographic model N1 N2 N3 N4

slide-36
SLIDE 36

Practical part 1

slide-37
SLIDE 37

Estimating R0 from timeseries data

50 100 150 200 250 300 350 0.1 1 10 100 1000 Days Individuals

r = 0.20 per day for 1918 influenza

r(0) = β − γ

We know the approximate recovery rate We can solve for β and hence R0

γ ≈ 0.25 β = r + γ ≈ 0.45 R0 = β γ ≈ 0.45 0.25 ≈ 1.8

slide-38
SLIDE 38

Growth rate of pandemic H1N1

Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê

Mar Apr May 1 10 100 1000 Laboratory confirmed cases

r = 0.11 per day β = 0.11 + 0.33 = 0.44 per day R0 = 0.44 / 0.33 = 1.33

slide-39
SLIDE 39

Generation time τ of infection

At the beginning of the epidemic, new infections emerge at rate β.

50 100 150 200 250 300 350 0.1 1 10 100 1000 Days Individuals

Final susceptible fraction:

τ = 1 2βS(0) = 1 2 × 0.36 = 1.39 S(∞) = e−R0(1−S(∞))

At the end of the epidemic: τ =

1 2βS(∞) = 1 2 × 0.36 × 0.84 = 1.65

0.0 0.2 0.4 0.6 0.8 1.0 0.007 0.008 0.009 0.010 Time Τ

slide-40
SLIDE 40

Ne = 7.2 years Ne = 1050 infections (duration of infection of 5 days) N = 70 million infections (prevalence) Off by a factor of 6,700 Ne = 124.6 years Ne = 8270 infections (duration of infection of 11 days) N = 0.9 million infections (prevalence) Off by a factor of 110

Effective population sizes of flu vs measles

1970 1980 1990 2000 2010 1950 1960 1970 1980 1990 2000 2010

Influenza A (H3N2) Measles

slide-41
SLIDE 41

Practical part 2

slide-42
SLIDE 42

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Time Probability in state X

Continuous time Markov chains (CTMCs)

A B A μAB B μBA B B A A A μAB = 3 μBA = 1

pt→∞(A) = µBA µAB + µBA pt→∞(B) = µAB µAB + µBA

q(B) = 0.75 q(A) = 0.25

slide-43
SLIDE 43

A B A 0.59 0.41 B 0.14 0.86 A B A

CTMCs on trees

Transition matrix with

μAB = 3 μBA = 1 t = 0.2

slide-44
SLIDE 44

A B A

Integrate over internal states

Transition matrix with

μAB = 3 μBA = 1 t = 0.2 A B A 0.25 0.75 0.14 0.14 0.41 0.59 0.59 0.59 0.59 0.41 A B A A B A 0.25 0.75 0.59 0.41 0.86 0.14 0.86 0.86 0.14 0.14 A B A 0.59 0.41 B 0.14 0.86

slide-45
SLIDE 45

A B A

Integrate over internal states

Transition matrix with

μAB = 3 μBA = 1 t = 0.2 A B A 0.25 0.75 0.14 0.14 0.41 0.59 0.59 0.59 0.59 0.41 Pr = 0.0211 A B A A B A 0.25 0.75 0.59 0.41 0.86 0.14 0.86 0.86 0.14 0.14 Pr = 0.0036 Pr = 0.0073 Pr = 0.0109

slide-46
SLIDE 46

Integrate over internal states

49% 8% 17% 25% = 0.0211 + 0.0073 + 0.0036 + 0.0109 = 0.0429

p(D|τ, µ)

A B A A B A A B A A B A

slide-47
SLIDE 47

Practical part 3