30
COMPUTER MODELS IN BIOLOGY Bernie Roitberg and Greg Baker

COMPUTER MODELS IN BIOLOGY

  • Upload
    tillie

  • View
    30

  • Download
    2

Embed Size (px)

DESCRIPTION

COMPUTER MODELS IN BIOLOGY. Bernie Roitberg and Greg Baker. WHERE NUMERICAL SOLUTIONS ARE USEFUL. Problems without direct solutions. WHERE NUMERICAL SOLUTIONS ARE USEFUL. Problems without direct solutions Complex differential equations. WHERE NUMERICAL SOLUTIONS ARE USEFUL. - PowerPoint PPT Presentation

Citation preview

Page 1: COMPUTER MODELS IN BIOLOGY

COMPUTER MODELS IN BIOLOGY

Bernie Roitberg and Greg Baker

Page 2: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

Page 3: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

• Complex differential equations

Page 4: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

• Complex differential equations

• Complex fitness landscapes

Page 5: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

• Complex differential equations

• Complex fitness landscapes

• Individual-based problems

Page 6: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

• Complex differential equations

• Complex fitness landscapes

• Individual-based problems

• Stochastic problems

Page 7: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

Page 8: COMPUTER MODELS IN BIOLOGY

THE EULER EXACT r EQUATION

1= e- rx

x=0

3

! lxmx

Page 9: COMPUTER MODELS IN BIOLOGY

HOW TO SOLVE THE EULER

• Start with lnR0/G ≈ r

Page 10: COMPUTER MODELS IN BIOLOGY

HOW TO SOLVE THE EULER

• Start with lnR0/G ≈ r • Insert ESTIMATE into the Euler

equation. This will yield an underestimate or overestimate

Page 11: COMPUTER MODELS IN BIOLOGY

HOW TO SOLVE THE EULER

• Start with lnR0/G ≈ r • Inserted ESTIMATE into the Euler

equation. This will yield an underestimate or overestimate

• Try successive values that approximate lnR0/G until exact value is discovered

Page 12: COMPUTER MODELS IN BIOLOGY

SOME GUESSES

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

1 2

Guess r

Value

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1 2

Guess r

Value0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

1 2

Guess r

Value

Page 13: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

• Complex differential equations

Page 14: COMPUTER MODELS IN BIOLOGY

THE CONCEPT

• For small changes in x (e.g. time) the difference quotient y/x approximates the derivative dy/dx i.e. dy/dx = x 0 y/x

• Thus, if dy/dx = f(y) then y/x≈ f(y) for small

changes in x • Therefore y ≈ f(y) x

Page 15: COMPUTER MODELS IN BIOLOGY

THE GENERAL RULE

• For all numerical integration techniques:

y(x + x) = yx + y

Page 16: COMPUTER MODELS IN BIOLOGY

EULER SOLVES THE EXPONENTIAL

dn/dt = rNN/t ≈ rN

N ≈ rN t

N(t+t) = Nt + NRepeat until total time is reached.

Page 17: COMPUTER MODELS IN BIOLOGY

NUMERICAL EXAMPLE

• N 0+t = N0 + (N0 r T) t = 0.1• N.1 = 100 + (100 * 1.099 * 0.1) = 110.99• N.2 = 110.99 + (110.99 * 1.099 * 0.1) =123.19• N.3 = 123.19 + (123.19 * 1.099 * 0.1) =136.73.• …...• N1.0 = 283.69• Analytical solution = 300.11

Page 18: COMPUTER MODELS IN BIOLOGY

COMPARE EULER AND ANALYTICAL SOLUTION

0

50

100

150

200

250

300

350

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

T

N

0

50

100

150

200

250

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

T

N

0

100

200

300

400

500

600

700

800

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

T

N

Page 19: COMPUTER MODELS IN BIOLOGY

INSIGHTS

• The bigger the time step the greater is the error

• Errors are cumulative

• Reducing time step size to reduce error can be very expensive

Page 20: COMPUTER MODELS IN BIOLOGY

RUNGE-KUTTA

t

N

Page 21: COMPUTER MODELS IN BIOLOGY

RUNGE-KUTTA

• ∆yt = f(yt) ∆ t

• yt+ ∆ t = yt + ∆ yt

• ∆ y t+ ∆ t = f(yt+ ∆ t )

• y t+ ∆ t = yt + ((∆yt + ∆ y t+ ∆ t )/2)

Page 22: COMPUTER MODELS IN BIOLOGY

COMPARE EULER AND RUNGE-KUTTA

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

t

N

Page 23: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

• Complex differential equations

• Complex fitness landscapes

Page 24: COMPUTER MODELS IN BIOLOGY

COMPLEX FITNESS LANDSCAPES

• Employing backwards induction to solve the optimal when state dependent

• Numerical solutions for even more complex surfaces– Random search

– Constrained random search (GA’s)

Page 25: COMPUTER MODELS IN BIOLOGY

TABLE OF SOLUTIONS

Oxygen

Energy

0.1 0.2 0.3 0.4 0.4

0.1 A A A R R

0.2 A R R R D

0.3 R R D D D

0.4 R R D D D

0.5 D D D D D

Page 26: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

• Complex differential equations

• Complex fitness landscapes

• Individual-based problems

Page 27: COMPUTER MODELS IN BIOLOGY

INDIVIDUAL BASED PROBLEMS

• Simulate a population of individuals that “know” the theory but may differ according to state

Page 28: COMPUTER MODELS IN BIOLOGY

WHERE NUMERICAL SOLUTIONS ARE USEFUL

• Problems without direct solutions

• Complex differential equations

• Complex fitness landscapes

• Individual-based problems

• Stochastic problems

Page 29: COMPUTER MODELS IN BIOLOGY

STOCHASTIC PROBLEMS

• Two issues:

– Generating a probability distribution

– Drawing from a distribution

Page 30: COMPUTER MODELS IN BIOLOGY

FINAL PROBLEM

• What do you do with all those data?