45
MAT 4830 Mathematical Modeling 4.4 Matrix Models of Base Substitutions II http://myhome.spu.edu/lauw

MAT 4830 Mathematical Modeling 4.4 Matrix Models of Base Substitutions II

Embed Size (px)

Citation preview

MAT 4830Mathematical 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

Eigenvalues of A

Eigenvectors of A

( ) det( )P A I

zeros of ( )P

( ) 0, 0A I x x

Geometric Meaning

Consider :

( ) 0

scalar multiple of

n nA

A I x

Ax x

x

R R

Lemma

, for n nA x x n Z

Recall

Use the transition matrix, we can estimate the base distribution vectors of descendent sequences by

An example of Markov model

, 1, 2,3,...kS k kp

1k kp Mp

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 only depends on pk-1 and M 1k kp Mp

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 only depends on pk-1 and M Mathematically, it implies

1k kp Mp

1 1 2 2 0 0

1 1

|

|

k k k k k k

k k k k

P S s S s S s S s

P S s S s

Markov Matrix

All entries are non-negative. column sum = 1.

| | | |

| | | ||

| | | |

| | | |

A A A G A C AT

G A G G G C G Ti j

C A C G C C C T

T A T G T C T T

P P P P

P P P PM P

P P P P

P P P P

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.

0

1 1 1 1

4 4 4 4

T

p

Jukes-Cantor Model

Additional Assumptions• Base substitutions from one to another are

equally likely.| | | |

| | | ||

| | | |

| | | |

| , for 3

A A A G A C AT

G A G G G C G Ti j

C A C G C C C T

T A T G T C T T

i j

P P P P

P P P PM P

P P P P

P P P P

P i j

constant

Jukes-Cantor Model

| | | |

| | | ||

| | | |

| | | |

| , for 3

A A A G A C AT

G A G G G C G Ti j

C A C G C C C T

T A T G T C T T

i j

P P P P

P P P PM P

P P P P

P P P P

P i j

constant

|

|

1 / 3 / 3 / 3

/ 3 1 / 3 / 3

/ 3 / 3 1 / 3

/ 3 / 3 / 3 1

, for 3

i j

i j

M P

P i j

constant

Jukes-Cantor Model

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

Observation #1

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

|

0

1

1 / 3 / 3 / 3

/ 3 1 / 3 / 3

/ 3 / 3 1 / 3

/ 3 / 3 / 3 1

1 1 1 1

4 4 4 4

?

? for 1,2,3,...

i j

T

k

M P

p

p

p k

Observation #2

0

1

1

41 / 3 / 3 / 3 1

/ 3 1 / 3 / 3 4 ?/ 3 / 3 1 / 3 1

4/ 3 / 3 / 3 11

4

?

? for 1, 2,3,...k

Mp

p

p k

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?

| 0

1 / 3 / 3 / 3

/ 3 1 / 3 / 3 1 1 1 1

/ 3 / 3 1 / 3 4 4 4 4

/ 3 / 3 / 3 1

T

i jM P p

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?

1

100100 0

k kp Mp

p M p

Example 2100

100 0p M p

100100 0

p M p

Example 2100

100 0p M p

100100 0

p M p

1004,1 100 0( | )M "Must be" P S T S A

Example 2100

100 0p M p

100100 0

p M p

1004,1 100 0( | )M "Must be" P S T S A

100100 0

100100 0

100100 0

100100 0

[ ]

( | )

[ ]

( | )

If M P S i S j

then p M p

If p M p

then M P S i S j

Example 2100

100 0p M p

100100 0

p M p

1004,1 100 0( | )M "Must be" P S T S A

100100 0

100100 0

100100 0

100100 0

[ ]

( | )

[ ]

( | )

If M P S i S j

then p M p

If p M p

then M P S i S j

For general n, can be prove by inductive arguments.

Homework Problem 1 2

2 0p M p

22 0

p M p

24,1 2 0( | )Explain why M P S T S A

Example 2 (Book’s Solutions)

0t

tp M p

0

ttp M p

0( | ) ?tP S T S A

,

1, 2,3, 4

i

i

Find the eigenvalues and the

corresponding eigenvectors v

for i

Example 2 (Book’s Solutions)

0t

tp M p

0

ttp M p

,

1, 2,3, 4

i

i

Find the eigenvalues and the

corresponding eigenvectors v

for i

1

0

0

0

tM

Example 2 (Book’s Solutions)

0t

tp M p

,

1, 2,3, 4

i

i

Find the eigenvalues and the

corresponding eigenvectors v

for i

1

0

0

0

tM

1 2 3 4

1

0 1 1 1 1

0 4 4 4 4

0

v v v v

0

ttp M p

Example 2 (Book’s Solutions)

0t

tp M p

,

1, 2,3, 4

i

i

Find the eigenvalues and the

corresponding eigenvectors v

for i

1

0

0

0

tM

1 2 3 4

1

0 1 1 1 1

0 4 4 4 4

0

v v v v

0

ttp M p

Example 2 (Book’s Solutions)

0t

tp M p

1

0

0

0

tM

1 2 3 4

1 1 2 2 3 3 4 4

1

0 1 1 1 1

0 4 4 4 4

0

1 1 1 1

4 4 4 4

1 3 31

4 4 4

1 1 31

4 4 4

1 1 31

4 4 4

1 1 31

4 4 4

t t t t t

t t t t

t

t

t

t

M M v M v M v M v

v v v v

0

ttp M p

Example 2 (Book’s Solutions)

1 3 3 1 1 3 1 1 31 1 1

4 4 4 4 4 4 4 4 4

1 1 3 1 3 3 1 1 31 1 1

4 4 4 4 4 4 4 4 4

1 1 3 1 1 3 1 3 31 1 1

4 4 4 4 4 4 4 4 4

1 1 3 1 1 3 1 11 1 1

4 4 4 4 4 4 4 4

t t t

t t t

t

t t t

t t

M

1 1 31

4 4 4

1 1 31

4 4 4

1 1 31

4 4 4

3 1 3 31

4 4 4 4

t

t

t

t t

Our Solutions

1

21 1

1

Theorem:

Suppose is a symmetric matrix with eigenvalues and the

corresponding eigenvectors .

0

Let [ ] and

0

Then,

i

i

n

n

M

v

P v v v D

D P MP

Our Solutions

1

12

3

4

0 0 0

0 0 0

0 0 0

0 0 0

t

tt

t

t

M P P

1D P MP

Our Solutions

1 3 4 1 1 4 1 1 41 1 1

4 4 3 4 4 3 4 4 3

1 1 4 1 3 4 1 1 41 1 1

4 4 3 4 4 3 4 4 3

1 1 4 1 1 4 1 3 41 1 1

4 4 3 4 4 3 4 4 3

1 1 4 1 1 4 1 11 1 1

4 4 3 4 4 3 4 4

t t t

t t t

t

t t t

t t

M

1 1 41

4 4 3

1 1 41

4 4 3

1 1 41

4 4 3

4 1 3 41

3 4 4 3

t

t

t

t t

Maple: Vectors

Maple: Vectors

Homework Problem 2

Although the Jukes-Cantor model assumes , a Jukes-Cantor transition matrix could describe mutations even a different . Write a Maple program to investigate the behavior of .

0 0.25 0.25 0.25 0.25T

p

kp

0p

Homework Problem 2

Homework Problem 3 Read and understand the Kimura 2-

parameters 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