Mathematical Modeling

From 2006.igem.org

(Difference between revisions)
Jump to: navigation, search
Line 34: Line 34:
-
====[[input.m]]====
+
====[[input_signal.m]]====
The input signal is defined. You can choose between different input signals. The default input signal is a sinusoidal oscillation with 'breaks' (sections where the input remains zero between the sinusoidal peaks).
The input signal is defined. You can choose between different input signals. The default input signal is a sinusoidal oscillation with 'breaks' (sections where the input remains zero between the sinusoidal peaks).
-
 
====[[jury.m]]====
====[[jury.m]]====

Revision as of 12:08, 9 September 2005

Contents

Matlab Code

Simulation for people who don't know how to handle Matlab

  1. If you don't have Matlab on your computer, install it (unfortunately, it's payware).
  2. Save all the *.m files (Matlab-files) from the wiki to your computer. Links to the *.m files can be found below.
  3. Open Matlab.
  4. Set the 'Current Directory' path (above the Matlab terminal) to the folder where you stored the *.m files.
  5. In the file 'maincounter.m', set the parameters you want to simulate.
  6. In the Matlab terminal, type 'maincounter' in the command line.
  7. The computation takes about 2 seconds. Matlab then draws a plot where you can see the impact your chosen parameters have on the concentractions.


How does the simulation work?

maincounter.m

The main program is maincounter.m. First, the parameters are defined. Secondly, Matlab solves the differential equation (which are defined in ode_counter.m) using ode15s. Thirdly, a plot containing the input signal and all four concentrations is created. Last, Matlab calls the function jury.m which tells us whether the concentrations oscillates (which of course is what we want).


ode_counter.m

Here, the differential equations are defined. These are in words: The variation of a protein's concentration is equal to the product of activation and repression (because zincfingers act as roadblocks) minus a fixed part of the concentration itself (degradation).


act.m

Here, the equation we use for activation is defined.


rep.m

Here, the equation we use for reprimation is defined.


input_signal.m

The input signal is defined. You can choose between different input signals. The default input signal is a sinusoidal oscillation with 'breaks' (sections where the input remains zero between the sinusoidal peaks).

jury.m

Here, the function test_oscillation.m is called for every one of the four concentrations. jury.m returns one if any of the test_oscillation.m calls returned one (i.e. it suffices if one concentration is properly oscillating, because we can then choose that one to be the 'counting' concentration).


test_oscillation.m

Although the code looks quite complicating, what it does is pretty simple: It looks if the peaks (which of course have to occur with half the frequency of the input signal) are at least twice as big than the biggest point between the peaks (caused by noise).


What if I want to automatically test several sets of parameters?

You have set all parameters and done a simulation run. The result is negative (i.e. the concentrations don't oscillate correctly). You think you know which parameter you have to change to achieve a positive result, but you don't know how much you need to change it. There are two ways of finding that out:

  1. Change the parameter of interest by hand and do a simulation run. Look at the plot, and write down if that specific value works. Change the parameter again, do another simulation run, etc. If you want to test a large range of values (e.g. K from 1 to 1000 with stepsize 5), this approach is way too onerous (200 iterations). Instead, try the following:
  2. Use the function K_kd_iterate.m.


K_kd_iterate.m

Until now, only an iteration of K (zincfinger affinity) and kd (zincfinger degradation rate) has been implemented.

It works as follows: Create a vector with the values to be tested (of K and kd, respectively). Note that a higher K means a higher affinity (see the repression equation rep.m for details).

K_kd_iterate.m calls maincounter_iterate.m for every possible combination of K and kd. Be careful not to chose too large vectors. If you try 20 values for K and 20 values for kd, the computation takes a little more than ten (!) minutes.


maincounter_iterate.m

maincounter_iterate.m is the same as maincounter.m, only adapted to be used by K_kd_iterate.m (i.e. you can't set the parameters K and kd anymore).

Personal tools
Past/present/future years