usc3002 picturing the world through mathematics

28
USC3002 Picturing the World Through Mathematics Wayne Lawton Department of Mathematics S14-04-04, 65162749 [email protected] Theme for Semester I, 2008/09 : The Logic of Evolution, Mathematical Models of Adaptation from Darwin to Dawkins

Upload: topanga-fernandez

Post on 31-Dec-2015

886 views

Category:

Documents


0 download

DESCRIPTION

USC3002 Picturing the World Through Mathematics. Wayne Lawton Department of Mathematics S14-04-04, 65162749 [email protected]. Theme for Semester I, 2008/09 : The Logic of Evolution, Mathematical Models of Adaptation from Darwin to Dawkins. Reference: Evolution by Mark Ridley, Chapter 5. - PowerPoint PPT Presentation

TRANSCRIPT

USC3002 Picturing the World Through Mathematics

Wayne LawtonDepartment of Mathematics

S14-04-04, 65162749 [email protected]

Theme for Semester I, 2008/09 : The Logic of Evolution, Mathematical Models of Adaptation from Darwin to Dawkins

Natural SelectionReference: Evolution by Mark Ridley, Chapter 5

p. 104 simplest model

Genotype Chance of Survival

Y

s1HG

11

is the selection coefficient]1,0[sThe chance of survival is relative to the maximal chance of survival among all genotypes. Notice that here it depends on the phenotype

Phenotype

seeds yellowseeds yellow

seedsgreen

Natural SelectionProblem: what will the genotype frequencies be after natural selection followed by random mating ?

Genotype Y H G

2nd Ad. Freq.

Define HGHY PPgPPy 21

21 ,

1st Ad. Freq. YP HP GP

Baby Freq.

)1/( 22

'

sgy

PY

)1/(2 2

'

sgyg

PH

)1/()1( 22

'

sgsg

PG

2y yg22g

Define )1/( 2'21'' sgyPPy HY

''21'' 1 yPPg HG

Natural SelectionRemark: since

the change in gene frequency to the next generation

the genotype frequencies of the 2nd Adult population are NOT in Hardy-Weinberg equilibrium

Let

2222'22' )1/()1/( sgyysgyPY

Haldane (1924) produced this model for selection p. 107

)1/( 22' sgsygyyy denote

Since )/( 2'gyys the selection coefficient can

be computed from the 2nd generation gene frequencies

MATLAB Program for Table 5.4, p. 107function g = tablepage107(s,ngens,g0)

% function g = tablepage107(s,ngens,g0)

%

% Wayne Lawton, 21 August 2007

% computes gene frequencies in Table 5.4 Evolution by Ridley

%

% Outputs

% g = array of length ngens

% g(k) = gene frequency of recessive gene after k generations

% Inputs

% s = selection coefficient

% ngens = number of generations

% g0 = initial gene frequency

%

gt = g0;

for n = 1:ngens

g(n) = gt*(1-s*gt)/(1-s*gt^2);

gt = g(n);

end

Tabular Output

0.9900 0.9900

0.5608 0.9736

0.1931 0.9338

0.1053 0.8513

0.0710 0.7214

0.0532 0.5747

0.0424 0.4478

0.0352 0.3524

0.0301 0.2838

0.0262 0.2343

0.0233 0.1979

0

100

200

300

400

500

600

700

800

900

1000

generation

g - gene

frequencies

s=0.05 s=0.01

Plot

Plot

Plot

Plot

Differential Equation Approximation

for

consists of solving the initial value problem:

(frequency of gene g in zero-generation)

)1/()1( 22' sgggsggg

followed by the approximation

The error is small if

0),1)(~/()(~))(~1()(~

22 ttgstgtgstdt

gd

)0()0(~ gg

,...3,2,1),(~)( nngng

)(~t

dt

gd is small

Qualitative Observations

1. If

therefore

2. For small s,

then

2)(~))(~1()(~

tgtgstdt

gd

1)0(~)(~ gtg )1/())(~1()(~

stgstdt

gd

If s > 0,

))1/(exp())0(~1(1)(~ sstgtg

0)1)(~/()(~))(~1()(~

22 tgstgtgstdt

gd

therefore )(~ tg

decays fastest at27

4)(

~ st

dt

gd

32)(~ tg where

3. If 0)0(~)(~ gtg then2)(~)(

~tgst

dt

gd

therefore ))0(~1/()0(~)(~ tgsgtg

Numerical Solution AlgorithmChoose

Set

Set

While

)(~

)(~)(~ tdt

gdttgttg

)0()0(~ gg 0,0 tT

0t

Tt

)1)(~/()(~))(~1( 22 tgstgtgsa

ttt

MATLAB Code for Differential Equationfunction [t, g] = tablepage107_approx(s,g0,T,deltat)

% function [t, g] = tablepage107_approx(s,g0,T,deltat)

% Wayne Lawton, 22 August 2007

% numerical solution of differential equation

% for gene frequencies

% Outputs

% t = array of times

% g = solution array (as a function of t)

% Inputs

% s = selection coefficient

% g0 = initial gene frequency

% T = approx last time

% deltat = time increment

N = round(T/deltat);

gg = g0;

for n = 1:N

t(n) = n*deltat;

a = s*(1-gg)*gg^2/(s*gg^2-1);

gg = gg + deltat*a;

g(n) = gg;

end

Numerical Solution Comparison1.0,05.0 ts

Comparison Error1.0,05.0 ts

Exact Solution for tFirst rewrite the differential equation in the form

http://www4.ncsu.edu/unity/lockers/users/f/felder/public/kenny/papers/partial.html

Then use the method of partial fractions

dtgdggsgs ~]~)~1(/)1~[( 22

ttg

g

dtg

gds

g

gds

g

gds

0

)(~

)0(~2

111

~

~

~

~

1~

~)1(

tg

s

tg

s

tg

gs

g

tgs

)0(~)(~)(~)0(~

ln1)0(~1)(~

ln)1(11

11

Exact Solution for s

tg

s

tg

s

tg

gs

g

tgs

)0(~)(~)(~)0(~

ln1)0(~1)(~

ln)1(11

11

)0(~1

)(~1

)(~)0(~

ln1)0(~1)(~

ln1)0(~1)(~

ln1

gtgtg

g

g

tg

g

tgts

implies that s can be solved for by

Comparison With Sol. of Diff. Eqn.

3 Components Sol. of Diff. Eqn.

Inverses of the 3 Components

MATLAB Code for Selection Coefficientfunction s = sexact(t,gt,g0)

% function s = sexact(t,gt,g0)

% Wayne Lawton, 24 August 2007

% exact solution for s

% Outputs

% s = selection coefficient

% Inputs

% t time of evolution

% g0 = gene frequency at time 0

% g = gene frequency at t

num = log((gt-1)/(g0-1)) + log(g0/gt) + 1/gt - 1/g0;

den = t + log((gt-1)/(g0-1));

s = num/den;

Peppered Moth Estimation page 110>> g0 = 1-1/100000

g0 = 0.99999000000000

>> gt = 1 - 0.8

gt = 0.20000000000000

>> t = 50

t = 50

>> s = sexact(t,gt,g0)

s = 0.27572621892750

Question: Why does this differ from the book’s estimate s = 0.33 ?

Peppered Moth Estimation page 110>> gbook = tablepage107(0.33,50,1-1/100000);

>> gmine = tablepage107(0.2757,50,1-1/100000);

>> plot(1:50,gbook,1:50,gmine)

>> grid

>> plot(1:50,gbook)

>> plot(1:50,gbook,1:50,gmine)

>> grid

>> ylabel(‘blue=book, green = mine')

>> xlabel('number of generations')

Peppered Moth Simulation

Assigned ReadingChapter 25. Evolution: The Process in Schaum’s Outlines in Biology

Chapter 5. The Theory of Natural Selection in Mark Ridley’s Evolution. In particular study: (i) the peppered moth (Biston betularia) studies of the decrease in the recessive peppered moth allele, (ii) pesticide resistence, (iii) equilibrium for recurrent disadvantageous dominant mutation, (iv) heterozygous advantage and sickle cell (1st study of natural selection in humans), (v) freq. dependent fitness, (vi) Wahlund effect, (vii) effects of migration and gene flow

Homework 2. Due Monday 1.09.2008

Do problems 1-6 on page 136 in Ridley (the mean fitness in questions 2, 3 is defined on p105)

Homework 3. Due Monday 8.09.2008

Do problems 7-10 on page 136 in Ridley (the mean fitness in questions 2, 3 is defined on p105)Question 11. Assume that for a two allele locus that genotype AA has fitness 1-s, genotype Aa has fitness 1, and genotype aa has fitness 1-t and that random mating occurs. Let p = baby freq. of gene A and q = baby freq. of gene a. Derive formuli for the next baby freq. p’ and q’.

Question 12. Assume that in a two allele locus all genotypes have fitness = 1 but that each genotye mates only with the same genotype. Derive equations for the evolution of gene frequencies.