Transcript 4.4 II

MAT 4830
Mathematical Modeling
4.4
Matrix Models of Base
Substitutions II
http://myhome.spu.edu/lauw
Markov Models



Review of Eigenvalues and Eigenvectors
An example a Markov model.
Specific Markov models for base
substitution:
• Jukes-Cantor Model
• Kimura Models (Read)
Recall

Characteristic polynomial of A

Eigenvalues of A

Eigenvectors of A
Recall

Characteristic polynomial of A
P( )  det( A   I )

Eigenvalues of A
zeros of P( )

Eigenvectors of A
( A   I ) x  0, x  0
Geometric Meaning
Consider A : R  R
n
n
( A  I )x  0
Ax   x
 scalar multiple of x
Lemma
A x   x , for n  Z
n
n

Recall

Use the transition matrix, we can
estimate the base distribution vectors pk
of descendent sequences Sk , k  1, 2,3,...
by
pk  Mpk 1

An example of Markov model
Markov Models Assumption

What happens to the system over a given
time step depends only on the state of the
system and the transition matrix
Markov Models Assumption
What happens to the system over a given
time step depends only on the state of the
system and the transition matrix
 In our case, pk  Mpk 1
pk only depends on pk-1 and M

Markov Models Assumption
What happens to the system over a given
time step depends only on the state of the
system and the transition matrix
 In our case, pk  Mpk 1
pk only depends on pk-1 and M
 Mathematically, it implies

P  Sk  sk | Sk 1  sk 1  Sk  2  sk  2 
 P  Sk  sk | Sk 1  sk 1 
 S0  s0 
Markov Matrix


All entries are non-negative.
column sum = 1.
 PA| A
P
G| A
M   Pi| j   
 PC| A

 PT | A
PA|G
PA|C
PG|G
PG|C
PC|G
PC|C
PT |G
PT |C
PA|T 
PG|T 
PC|T 

PT |T 
Markov Matrix : Theorems

Read the two theorems on p.142
Jukes-Cantor Model
Jukes-Cantor Model

Additional Assumptions
• All bases occurs with equal prob. in S0.
1
p0  
4
1
4
1
4
1
4 
T
Jukes-Cantor Model

Additional Assumptions
• Base substitutions from one to another are
equally likely.
 PA| A
P
G| A
M   Pi| j   
 PC| A

 PT | A
Pi| j  constant 

3
PA|G
PA|C
PG|G
PC|G
PG|C
PC|C
PT |G
PT |C
, for i  j
PA|T 
PG|T 
PC |T 

PT |T 
Jukes-Cantor Model
 PA| A
P
G| A
M   Pi| j   
 PC| A

 PT | A
Pi| j  constant 

3
PA|G
PA|C
PG|G
PC|G
PG|C
PC|C
PT |G
PT |C
, for i  j
PA|T 
PG|T 
PC |T 

PT |T 
Jukes-Cantor Model
1  
 / 3
M   Pi| j   
 / 3

 / 3
Pi| j  constant 

3
 /3
1
 /3
 /3
 /3
 /3
1
 /3
, for i  j
 / 3
 / 3 
 / 3

1 
Observation #1
1    prob. of no base sub. in a site for 1 time step
  prob. of having base sub. in a site for 1 time step
 rate of base sub.  sub. per site per time step 
Mutation Rate




Mutation rates are difficult to find.
Mutation rate may not be constant.
If constant, there is said to be a
molecular clock
More formally, a molecular clock
hypothesis states that mutations occur at
a constant rate throughout the
evolutionary tree.
Observation #2
1  
 / 3
M   Pi| j   
 / 3

 / 3
 /3
1
 /3
 /3
1
p0  
4
T
1
4
1
4
1
4 
p1  ?
pk  ? for k  1, 2,3,...
 /3
 /3
1
 /3
 / 3
 / 3 
 / 3

1 
Observation #2
1  
 / 3
Mp0  
 / 3

 / 3
 /3
1
 /3
 /3
 /3
 /3
1
 /3
p1  ?
pk  ? for k  1, 2,3,...
1
4
 / 3  1 
 

 / 3  4 
?


 / 3  1 

1   4 
1
 
4
Observation #2


The proportion of the bases stay
constant (equilibrium)
What is the relation between p0 and M?
Example 1

What proportion of the sites will have A
in the ancestral sequence and a T in the
descendent one time step later?
1  
 / 3
M   Pi| j   
 / 3

 / 3
 /3
1
 /3
 /3
 /3
 /3
1
 /3
 / 3
 / 3 
 / 3

1 
1
p0  
4
1
4
1
4
1
4 
T
Example 2

What is the prob. that a base A in the
ancestral seq. will have mutated to
become a base T in the descendent seq.
100 time steps later?
Example 2

What is the prob. that a base A in the
ancestral seq. will have mutated to
become a base T in the descendent seq.
100 time steps later?
pk  Mpk 1
p100  M 100 p0
Example 2
p100  M 100 p0
 
 
 
 
  
 
p100
  
  
  

  
M 100


 

 

p0
Example 2
p100  M 100 p0
  
  
 
  
  
  
p100
   
   
 
   
  
   
M 100
p0
100
M4,1
"Must be" P(S100  T | S0  A)
Example 2
p100  M 100 p0
  
  
 
  
  
  
p100
   
   
 
   
  
   
M 100
p0
100
M4,1
"Must be" P(S100  T | S0  A)
[]
If M 100   P ( S100  i | S0  j ) 
then p100  M 100 p0
[ ]
If p100  M 100 p0
then M 100   P ( S100  i | S 0  j ) 
Example 2
p100  M 100 p0
  
  
 
  
  
  
p100
[]
   
   
 
   
  
   
M 100
p0
100
M4,1
"Must be" P(S100  T | S0  A)
If M 100   P ( S100  i | S0  j ) 
then p100  M 100 p0
[ ]
If p100  M 100 p0
then M 100   P ( S100  i | S 0  j ) 
For general n, can be prove by inductive arguments.
Homework Problem 1
p2  M 2 p0
    
    
 
    
  
    
p2
M2







 

 

p0
2
Explain why M4,1
 P(S2  T | S0  A)
Example 2 (Book’s Solutions)
pt  M t p0
  
  
 
  
  
  
pt
   
   
 
   
  
   
Mt
p0
P(St  T | S0  A)  ?
Find the eigenvalues i and the
corresponding eigenvectors vi ,
for i  1, 2,3, 4
Example 2 (Book’s Solutions)
pt  M t p0
  
  
 
  
  
  
pt
1 
 
t 0 
M
0 
 
0 
Find the eigenvalues i and the
  

  

  

  


 

 

Mt
p0
corresponding eigenvectors vi ,
for i  1, 2,3, 4
Example 2 (Book’s Solutions)
pt  M t p0
  
  
 
  
  
  
pt
1 
 
t 0 
M
0 
 
0 
Find the eigenvalues i and the
  

  

  

  


 

 

Mt
p0
corresponding eigenvectors vi ,
for i  1, 2,3, 4
1 
0
  1v 1v 1v 1v
0 4 1 4 2 4 3 4 4
 
0
Example 2 (Book’s Solutions)
pt  M t p0
  
  
 
  
  
  
pt
1 
 
t 0 
M
0 
 
0 
Find the eigenvalues i and the
  

  

  

  


 

 

Mt
p0
corresponding eigenvectors vi ,
for i  1, 2,3, 4
1 
0
  1v 1v 1v 1v
0 4 1 4 2 4 3 4 4
 
0
Example 2 (Book’s Solutions)
pt  M t p0
  
  
 
  
  
  
pt
1 
 
t 0 
M
0 
 
0 
  

  

  

  


 

 

Mt
p0
1 
 
1
1
1
1
t 0 
 M t v1  M t v2  M t v3  M t v4
M
0  4
4
4
4
 
0 
1
1
1
1
 1t v1  2t v2  3t v3  4t v4
4
4
4
4
 1 3  3 t 
  1    
4 4  4  
t
1 1
3


  1    
4 4  4  

t
3
1
1
  1    
 4 4  4  


t
1 1  3  
  1    
4 4  4  
Example 2 (Book’s Solutions)
 1 3  3 t
  1   
4 4  4 
t
1 1
3


  1   
4 4  4 
Mt  
t
 1  1 1  3  
 4 4  4 

 1 1  3 t
  1   
4 4  4 
1 1 3 
 1   
4 4 4 
t
1 1 3 
 1   
4 4 4 
t
1 3 3 
 1   
4 4 4 
t
1 1 3 
 1   
4 4 4 
t
1 1 3 
 1   
4 4 4 
t
1 3 3 
 1   
4 4 4 
t
1 1 3 
 1   
4 4 4 
t
1 1 3 
 1   
4 4 4 
t
t
1 1 3  
 1    
4 4 4  
t
1 1  3  
 1   
4 4 4  
t
1 1 3  
 1   
4 4 4  

t
1 3 3  
 1    
4 4 4  
Our Solutions
Theorem:
Suppose M is a symmetric matrix with eigenvalues i and the
corresponding eigenvectors vi .
Let P  [v1 v1
1

2

vn ] and D 


0
Then, D  P 1MP
0




n 
Our Solutions
 1t

0
t

M P
0

 0
0
2t
0
0
0
0
3t
0
0

0  1
P

0
t
4 
D  P1MP
Our Solutions
 1 3  4 t
  1   
4 4  3 
t
1 1
4


  1   
4 4  3 
Mt  
t
 1  1 1  4  
 4 4  3 

 1 1  4 t
  1   
4 4  3 
1 1 4 
 1   
4 4 3 
t
1 1 4 
 1   
4 4 3 
t
1 3 4 
 1   
4 4 3 
t
1 1 4 
 1   
4 4 3 
t
1 1 4 
 1   
4 4 3 
t
1 3 4 
 1   
4 4 3 
t
1 1 4 
 1   
4 4 3 
t
1 1 4 
 1   
4 4 3 
t
t
1 1 4  
 1    
4 4 3  
t
1 1  4  
 1   
4 4 3  
t
1 1 4  
 1   
4 4 3  

t
1 3 4  
 1    
4 4 3  
Maple: Vectors
Maple: Vectors
Homework Problem 2

Although the Jukes-Cantor model
T
p

0.25
0.25
0.25
0.25
 ,a
assumes 0 
Jukes-Cantor transition matrix could
describe mutations even a different p0 .
Write a Maple program to investigate the
behavior of pk .
Homework Problem 2
Homework Problem 3



Read and understand the Kimura 2parameters model.
Read the Maple Help to learn how to find
eigenvalues and eigenvectors.
Suppose M is the transition matrix
corresponding to the Kimura 2-parameters
model. Find a formula for Mt by doing
experiments with Maple. Explain carefully your
methodology and give evidences.
Next


Download HW from course website
Read 4.5