Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 3: Markov models of sequence evolution Alexei Drummond.

Similar presentations


Presentation on theme: "Lecture 3: Markov models of sequence evolution Alexei Drummond."— Presentation transcript:

1 Lecture 3: Markov models of sequence evolution Alexei Drummond

2 CS369 20072 Friday quiz: How many bacterial cells are there in an average adult human? A)10 12 (1 trillion) B)10 13 (10 trillion) C)10 14 (100 trillion) D)10 15 (1000 trillion) Hint: There are about 10 14 human cells in the average adult human.

3 CS369 20073 Modeling genetic change Given two or more aligned nucleotide or amino acid sequences, usually the first goal is to calculate some measure of sequence similarity (or conversely distance) The simplest way to estimate genetic distances is the p- distance (number of differences between two sequences divided by the sequence length) –The p-distance is the hamming distance normalized by the length of the sequence. Therefore it is the proportion of positions at which the sequences differ. –The p-distance can also be consider the probability that the two sequences differ at a random position (site).

4 CS369 20074 AACCTGTGCA AATCTGTGTA * * ATCCTGGGTT * * ** Seq1AATCTGTGTA seq2ATCCTGGGTT ** * * Modeling genetic change

5 CS369 20075 proportion of # nt between two sequences Seq1AATCTGTGTA seq2ATCCTGGGTT ** * * p-distance=0.4 Usually underestimate the true distance: genetic (or evolutionary) distance d P-distance

6 CS369 20076 AACCTGTGCA T A A C AACCAGTGAA * * AACCTGTGCA T G A C ACCCGGTGAA * * Multiple, parallel, and back-substitutions

7 CS369 20077 Relationship between p (observed) distance and d (genetic) distance

8 CS369 20078 Transition probabilities Definition: Let P xy (t) be the probability that a nucleotide x evolves to a nucleotide y in time t. If x = y then this evolutionary pathway could involve 0, 2, 3 or more substitutions. If x  y the the pathway could involve 1, 2, 3 or more substitutions. P(t) is then a square transition probability matrix of size 4 by 4.

9 CS369 20079 At any given site in a sequence the rate of change from base i to base j is independent from the base that occupied that site prior i G A G P GG (t) P GA (t) t i = A, C, G, T P GG (t) and P GA (t) Independent from i Markov property Modeling nucleotide substitutions as a time- homogeneous time-continuous stationary Markov process (1)

10 CS369 200710 Homogeneity –Substitution rates do not change over time Stationarity –The relative frequencies of A, C, G, and T (  A,  C,  G,  T ) are at equilibrium, i.e. remain constant. Modeling nt substitutions as a time-homogeneous time-continuous stationary Markov process (2)

11 CS369 200711 Models of DNA Substitution 1. Base frequencies are equal and all substitutions are equally likely (Jukes-Cantor) 2. Base frequencies are equal but transitions and transversions occur at different rates (Kimura 2 parameter) 3. Unequal base frequencies and transitions and transversions occur at different rates (Hasegawa-Kishino-Yano) 4. Unequal base frequencies and all substitution types occur at different rates (General Reversible Model) Simplest Most complex

12 CS369 200712  i frequency of nt i a, b, c, etc.relative rate parameters non-diagonal entries:rate flow from nucleotide i to nucleotide j diagonal entries:total rate flow that leaves nucleotide i (rate at which nt i disappear per site per sequence). scale factor so total output per unit time = 1.0 ACGT The Q-matrix (instantaneous rate matrix)

13 CS369 200713 ACGT The Q-matrix A C G T

14 CS369 200714 Substitutions from nucleotide i to nucleotide j have the same rate of substitutions from nucleotide j to nucleotide i. In general: f = 1 and a, b, c, d, e are estimated from the data via maximum likelihood ACGT General Time Reversible (GTR) Models

15 CS369 200715 Time-reversibility xy z x y equivalent

16 CS369 200716 Q-matrix for the Jukes and Cantor (JC) model

17 CS369 200717 Q-matrix for the Jukes and Cantor (JC) model

18 CS369 200718  = rate per unit time of nucleotide i (i =A, C, G, T) replacement during evolution: nt substitutions per sequence per site per unit time  t = nt substitutions per site between two sequences that are separated by time t = d Evolutionary meaning of the Q-matrix for the JC model

19 CS369 200719 Estimating transition probabilities As soon as the Q matrix, and thus the evolutionary model, is specified, it is possible to calculate the probabilities of change from any base to any other during the evolutionary time t, P(t), by computing the matrix exponential

20 CS369 200720 By computing P(t)=exp(Qt) with Q according to the JC model P i=j (t) = probability of nt i to end up with the same character after time t P i  j (t) = probability of nt i ending up as a different character after time t Jukes and Cantor (JC) model solution

21 CS369 200721 The total probability of two sequences sharing the same nucleotide at a position is P i=j (t) and therefore the probability of the two sequences being different, p = 1 - P i=i (t) = P i  j (t) p = 3/4 (1 - exp(-4/3  t)) An estimator of p is the observed proportion of different sites between two sequences ( p-distance). Estimating the genetic distances(1)

22 CS369 200722 Solving for  t we get  t = - 3/4 ln (1- 4/3 p). Substituting  t with d we finally obtain the Jukes-Cantor correction formula for the genetic distance d between two sequences: d = - 3/4 ln (1- 4/3 p) It can also be demonstrated that the variance V(d) will be given by V(d) = 9p(1-p)/(3-4p) 2 Estimating the genetic distances(2)

23 CS369 200723 Seq1AATCTGTGTA seq2ATCCTGGGTT ** * * p-distance =0.4 d (JC model) = - 3/4 ln [1- 4/3 (0.4)] = 0.5716 Calculating JC distance

24 CS369 200724 AACCTGTGCA AATCTGTGTA * * ATCCTGGGTT * * ** p-distance =0.4 d (JC model) = - 3/4 ln [1- 4/3 (0.4)] = 0.5716 Calculating JC distance

25 CS369 200725 Q-matrix for the F81 model

26 CS369 200726 p = observed distance When  A =  T =  C =  G =0.25, = 3/4, and the formula becomes equivalent to the one obtained for the JC model F81 model correction formula

27 CS369 200727 Transversions Transitions Q-matrix for the Kimura-2p (K80) model

28 CS369 200728  A = 39.0%  C = 16.6%  G = 22.8%  T = 21.6% Average Ti/Tv=2.6 Average SEQUENCE COMPOSITION (HIV-O/HIV-M full pol) 5% chi-square test p-value SE8538a passed 97.80% 97TZ02a passed 94.59% BOLO122b passed 99.94% CAM1b passed 96.73% NY5CGb passed 97.64% 98IN022c passed 99.44% 94IN112c passed 98.68% 93IN101c passed 99.61% VI850f passed 97.09% X138g passed 86.61% SE6165g passed 95.73% VI991h passed 98.23% SE9173j passed 96.17% SE92809j passed 96.50% MP535k passed 69.92% 92UG001d passed 86.20% HIVO passed 77.48% Nucleotide frequencies in HIV/SIV are at equilibrium: pol gene

29 CS369 200729  A = 34.5%  C = 17.4%  G = 23.4%  T = 24.7% Average Ti/Tv=1.5 Average SEQUENCE COMPOSITION (SIV/HIV full envelope) 5% chi-square test p-value MVP5180 passed 14.60% SIVcpzUS passed 48.09% SIVcpzGAB passed 51.77% 92UG037a passed 84.58% 92UG975g passed 99.73% 92RU131g passed 97.45% 93IN905c passed 77.15% 92BRO25c passed 59.51% 92UG021d passed 94.89% 92UG024d passed 92.60% BSSG3b passed 97.86% SFMHS20b passed 92.40% 91TH652b passed 92.86% MBC18R01b passed 99.59% Nucleotide frequencies in HIV/SIV are at equilibrium: env gene

30 CS369 200730 Q-matrix for the F84 model (very similar to the HKY85 model) (Transversions) (Transitions)

31 CS369 200731 Average Ti/Tv=1.5 Transitions Transversions ACGT A C G T From To 346.2 697.4 290.3 241.9 123 320.8 515.4 126.6 117.1 215.6 371 144.6 Average frequency of changes between states SIV/HIV-1 envelope Nucleotide substitution patterns in HIV/SIV

32 CS369 200732 More complex models… More complex models, like Tamura-Nei (TN93), or the general time reversible (GTR) model usually requires numerical algorithms in order to calculate d. Several software packages exist that can estimate genetic distances between nucleotide sequences according to different evolutionary models –MEGA3, –PAUP*, –PHYLIP, –TREE-PUZZLE, –DAMBE, –Geneious 2.5.4

33 CS369 200733 HIV-1B vs HIV-O/SIVcpz/HIV-1C full envelope HIV-O SIVcpz HIV-1C p-distance JC69 K80 Tajima-Nei 0.391 (.008) 0.552 (.018) 0.560 (.019) 0.572 (.019) 0.266 (.009) 0.337 (.009) 0.340 (.010) 0.427 (.013) 0.163 (.008) 0.184 (.008) 0.187 (.008) 0.189 (.008) Estimating HIV genetic distances: env gene

34 CS369 200734 HIV-1B vs HIV-O/HIV-1C full pol HIV-O HIV-1C p-distance JC69 K80 Tajima-Nei 0.257 (.007) 0.315 (.010) 0.318 (.011) 0.324 (.011) 0.103 (.005) 0.111 (.005) 0.113 (.006) 0.114 (.006) Estimating HIV genetic distances: pol gene

35 CS369 200735 When divergence is low p and d are linearly related

36 CS369 200736 Conclusions The genetic distance between two sequences can be estimated using a Markov model of DNA substitution. Different models will estimate different genetic distances We have focused on DNA models, but it is possible to consider models for proteins and models that take into account codons and the genetic code. Markov model approaches to estimating genetic distance do not deal with indels, and presuppose an alignment These models assume that all positions in a DNA sequence mutate at the same rate. We will talk about how to relax this assumption in later lectures.


Download ppt "Lecture 3: Markov models of sequence evolution Alexei Drummond."

Similar presentations


Ads by Google