IGEM:IMPERIAL/2008/Modelling/Tutorial1: Difference between revisions
mNo edit summary |
|||
Line 175: | Line 175: | ||
Simulation for the random walk of bacteria using a random model | Simulation for the random walk of bacteria using a random model | ||
>> | >> |
Revision as of 02:57, 1 August 2008
Introduction
There are 3 types of data:
- Synthetic Data
The OECD defines synthetic data as: "An approach to confidentiality where instead of disseminating real data, synthetic data that have been generated from one or more population models are released." [1]
Simply put, synthetic data is realistic data with well understood characteristics, generated by the user. The process of generating synthetic data may be based on well studied models. Uses of synthetic data include evaluating new research ideas and testing the performance of systems. The user is also able to cover more data space through generation of synthetic data, an advantage over real data which the user does not have control of.
- Phantom Data
Phantom data is data obtained from a phantom model which is a realistic system being generated by the user. This type of data is often found when the real system is difficult to obtain but can be modeled. For example, a human skull phantom can be used to obtain EEG phantom data [2], or a heart phantom can be used to obtain imaging phantom data [3].
- Real Data
Real data, is of course data obtained from a real-life sample set. Real data can be classified into discrete and continuous data. Discrete data can follow a binomial, poisson or a uniform distribution, whereas continuous data follow a uniform distribution, and in most cases, a normal distribution.
Little research: what do these terms mean? When and why are they used? Etc… In our case we can only rely on synthetic data to conduct our pre-experimental analyses and design our experiments. [ Discuss this statement ]
Model Construction
From your bibliographical research, do a list of the relevant properties of the movement of b-subtilis and turn them into an adequate model (or even better a family of models). To help you, here is a possible model. [Discuss its relevance to the problem]
Running Phase:
Bacterium moves at constant velocity v in direction θ for a period of time t.
- v drawn from Gaussian of mean v0 and standard deviation σ1.
- t drawn from Gaussian of mean t0 and standard deviation σ2.
- Simulations: v0=10μm/s ; t0=1s. Take σ1=v0/10 σ2=t0/10
- Plot the distributions of v and t
Rotating Phase: Bacterium stop for a period of time Ts and rotates by an angle α.
- Ts drawn from Gaussian of mean Tr and standard deviation σr.
- α drawn from Von Mises of mean α 0 and parameter β.
- Simulations: α 0 =0 ; Ts =0.1s. Take β = 1 σs= Ts/10
- Plot the distributions of α and Ts
%Model Construction of Bacteria Motility
%Gaussian distribution of velocity v=[1:0.01:20]; %Range of velocities v_avg=10; %Average velocity v0 v_dev=v_avg/10; %Standard Deviation sigma-1 y1=normpdf(v,v_avg,v_dev); %Generation of PDF of velocities subplot(2,2,1); plot(v,y1); title('PDF of Bacteria "Run" Velocity') xlabel('Velocity'); ylabel('Probability Density');
%Gaussian distribution of run-time t=[0:0.001:2]; %Range of run duration t_avg=1; %Average run duration t_dev=t_avg/10; %Standard Deviation sigma-2 y2=normpdf(t,t_avg,t_dev); %Generation of PDF of run duration subplot(2,2,2); plot(t,y2); title('PDF of Bacteria "Run" Duration') xlabel('Time'); ylabel('Probability Density');
% Distribution of angles x=[-pi:0.01:pi]; %Range of angle theta x_avg=0; %Average turn angle k=1; %Beta factor b=besselj(0,k); %Generates a Bessel function of first kind and order 0 y3=(1/(2*pi*b))*exp(k*cos(x-x_avg)); %Generates the Von Mises distribution subplot(2,2,3); plot(x,y3); Title('PDF of Tumbling Angle'); xlabel('Tumbling Angle'); ylabel('Probability Density');
% Distribution of tumbling-time ts=[0:0.001:0.2]; %Range of tumbling duration ts_avg=0.1; %Average tumbling duration ts_dev=ts_avg/10; %Standard Deviation sigma-s y4=normpdf(ts,ts_avg,ts_dev); %Gernation of PDF of tumbling duration subplot(2,2,4); plot(ts,y4); title('PDF of Bacteria "Tumbling" Duration') xlabel('Time'); ylabel('Probability Density');
Simulations
We can imagine that we will be able to shoot short movies of bacteria (a few) moving in a medium of our choice – that is within our control. [Discuss]
Furthermore thanks to right software the position of a few bacteria ca be tracked with time. [ Discuss this statement and elaborate ]
Suitable software might include ImageJ [4]
Conclusion: Data = Position of bacteria with time. [Discuss]
Our time interval between observations will be constant and dependent on frame rate, surely?
Generation of Realistic Synthetic Data
Thanks to the model you have just built:
- Simulate the run of a handful of bacteria over 5 minutes.
- If possible create a little movie (for Jamboree presentation)
- Store these data – they will be precious for the data analysis phase that will be developed in the next tutorial.
>> clear all; %Generation of bacteria run data theta=zeros(300,1); %Declares 300x1 matrice for turn angle theta=randraw('vonmises',[0,1],300); %Generates tumbling angle x=zeros(300,1); y=zeros(300,1); for n=1:300 plot(x,y,'b.-'); v_run(n)=normrnd(10,1); %Generates run speed t_run(n)=normrnd(1,0.1); %Generates run duration t_tumb(n)=normrnd(0.1,0.01); %Generates tumbling duration M(n)=getframe; if n==1; beta(n)=0; %Initialise cummulative angle to 0 x(n)=0; %Initialise origin to (x,y)=(0,0) y(n)=0; else beta(n)=beta(n-1)+theta(n-1); %Generates cummulative turn angle x(n)=x(n-1)+v_run(n)*cos(beta(n))*t_run(n); %Displacement=Velocity*Time y(n)=y(n-1)+v_run(n)*sin(beta(n))*t_run(n); end; end; movie2avi(M,'Motility.avi'); figure subplot(2,3,1); hist(v_run,300); %Plots histogram of run velocity Title('PDF of Run Velocities'); xlabel('Velocity / (um/s)'); ylabel('Frequency'); subplot(2,3,2); hist(t_run,300); %Plots histogram of run duration Title('PDF of Run Duration'); xlabel('Time / s'); ylabel('Frequency'); subplot(2,3,3); hist(theta,300); %Plots histogram of turn angle Title('PDF of Tumbling Angle'); xlabel('Tumbling Angle'); ylabel('Frequency'); subplot(2,3,4); hist(t_tumb,300); %Plots histogram of tumbling duration Title('PDF of Run Duration'); xlabel('Time / s'); ylabel('Frequency'); subplot(2,3,5); plot(x,y); %Plots 2D displacement Title('Movement Trace by Single Bacteria'); xlabel('x-displacement / um'); ylabel('y-displacement / um'); %Calculate statistical data from synthetic data generated v_run_mu=mean(v_run) %Calculate mean run velocity t_run_mu=mean(t_run) %Calculate mean run duration t_tumb_mu=mean(t_tumb) %Calculate mean tumbling time theta_mu=mean(theta) %Calculate mean turn angle v_run_sigma=std(v_run) %Calculate run velocity standard deviation t_run_sigma=std(t_run) %Calculate run duration standard deviation t_tumb_sigma=std(t_tumb) %Calculate tumbling duration standard deviation theta_sigma=std(theta) %Calculate turn angle standard deviation >>
Generation of Unrealistic Synthetic Data Build another model with a running phase and a rotating phase. However this time the velocity, time and angle distributions will be purposely unrealistic
- Simulate the run of a handful of bacteria over 5 minutes.
- Create a little movie (for Jamboree presentation)
- Store these data – they will also be precious for the data analysis phase that will be developed in the next tutorial.
Simulation for the random walk of bacteria using a random model
>>
clear all; a=0; % minimum velocity in µm/s b=70; % maximum velocity in µm/s c=0; % minimum angle in rad d=2pi; % maximum angle in rad e=0; % minimum run time in s f=1; % maximum run time in s g=0; % minimum tumble time in s h=0.1; % maximum tumble time in s
n=1:300; %time in sec for n=1:300
if n==1; v(n)=0; theta(n)=0; else v_run(n)= a + (b-a) * rand(size(n)); % random velocity theta(n) = c + (d-c) * rand(size(n)); % random thumble angle t_run(n)=e + (f-e) * rand(size(n)); % run time t_tumble(n)=g + (h-g) * rand(size(n)); % tumble time end;
end;
for n=1:300
if n==1; beta(n)=0; %Initialise cummulative angle to 0 x(n)=0; %Initialise origin to (x,y)=(0,0) y(n)=0; else beta(n)=beta(n-1)+theta(n-1); %Generates cummulative turn angle x(n)=x(n-1)+v_run(n)*cos(beta(n))*t_run(n); %Displacement=Velocity*Time y(n)=y(n-1)+v_run(n)*sin(beta(n))*t_run(n); end;
end plot(x,y); xlabel('distance in µm'); ylabel('distance in µm'); title('Random walk');
>>
Qualitative Description of the motion of bacteria
In my opinion, one of the greatest challenges of Synthetic Biology will be the jump from the kind of qualitative description of experimental results to qualitative results. This can be done for a biobrick – an in general for simple biological phenomena. Whether this can be done in general is unclear…
To finish this tutorial, it is worth looking at the advantages of a quantitative description. To do this, Let us try to find out when a qualitative description is enough and when it needs complementing. Synthetic data are ideal to conduct this kind of study since we control everything in the study and know the underlying truth.
- Give a qualitative description of the motions generated by both models
- Make parameters of your ‘wrong’ model vary to the point when it becomes hard to tell the motion generated by your ‘realistic’ model from the motion generated by the other model
- Discuss
NB: In the second and third tutorials we will see that obtaining a quantitative description is not that easy and often a certain amount of uncertainty remains at the end of the analysis.
References
-
Definition of Synthetic Data [1]
- Leahy RM, Mosher JC, Spencer ME, Huang MX, and Lewine JD. A study of dipole localization accuracy for MEG and EEG using a human skull phantom. Electroencephalogr Clin Neurophysiol. 1998 Aug;107(2):159-73. DOI:10.1016/s0013-4694(98)00057-1 |
-
Normal and Pathological NCAT Image and Phantom Data Based on Physiologically Realistic Left Ventricle Finite-Element Models Alexander I. Veress, W. Paul Segars, Member, IEEE, Jeffrey A. Weiss, Benjamin M. W. Tsui, Fellow, IEEE, and Grant T. Gullberg, Fellow, IEEE[1]
-
ImageJ [1]