Difference between revisions of "Team:Dundee/Modeling/Appendix3"

Line 130: Line 130:
 
             <div class="row">
 
             <div class="row">
 
                 <h3>Chromate Model Code</h3>
 
                 <h3>Chromate Model Code</h3>
             <p><font color="white"><!--Font colour set to white--> Lorem ipsum dolor sit amet, nostrud maiestatis quaerendum ne sed. Reque possit ne sea. Te dico labitur mediocritatem ius. Error timeam noluisse eos ad, eam ne magna meliore contentiones, nec ei volumus persecuti.
+
             <font color="white"><!--Font colour set to white--> <p>The figures shown in the <u><a href="https://2015.igem.org/Team:Dundee/Modeling/Chromate#chromate2"><!--Links to figure on another page.-->chromate detector model</a></u> were created using MATLAB. Two files were written to perform sensitivity analysis; one to set the function (chromate.m) and one to solve the function and plot the results in figures <u><a href="https://2015.igem.org/wiki/index.php?title=Team:Dundee/Modeling/Chromate#cfig3">Figure 3</a></u>, <u><a href="https://2015.igem.org/wiki/index.php?title=Team:Dundee/Modeling/Chromate#cfig4">Figure 4</a></u> and <u><a href="https://2015.igem.org/wiki/index.php?title=Team:Dundee/Modeling/Chromate#cfig5">Figure 5</a></u> (run_chromate.m). Both files are shown below, where the green is comments to aid in understanding of the scripts.</font></p>
 +
 
 +
 
 +
 
  
Dicit animal definitionem et mel, nonumy tacimates nec in. Vis mucius periculis at. At est vidit scripserit repudiandae, agam porro sea ne. Sea et stet tibique praesent, vim et legere aperiri. Quo doming vocibus eleifend no.
 
  
Cu vis partem graeci facilisis. Falli inciderint mei no. Assentior suscipiantur mea id. Vis quas electram prodesset cu, choro omnium conclusionemque an his. Vis latine equidem perfecto ad.</font></p>
 
 
<div class="content"><pre class="codeinput"><!--This marks the beginning of the input copied from matlab published html.-->
 
<div class="content"><pre class="codeinput"><!--This marks the beginning of the input copied from matlab published html.-->
 
   <span class="comment"><b><font size='6' color='green'>MATLAB code from chromate.m file</b></font></span>
 
   <span class="comment"><b><font size='6' color='green'>MATLAB code from chromate.m file</b></font></span>

Revision as of 17:02, 20 August 2015

Dry Lab

Appendix 3: Chromate Biosensor Code

Chromate Model Code

MATLAB code for chromate model.

Bone Incision Experimental Data

Raw data for the bone incision experiments.

Bone Incision Experiment Code

MATLAB code for the bone incision experiments.

Chromate Model Code

The figures shown in the chromate detector model were created using MATLAB. Two files were written to perform sensitivity analysis; one to set the function (chromate.m) and one to solve the function and plot the results in figures Figure 3, Figure 4 and Figure 5 (run_chromate.m). Both files are shown below, where the green is comments to aid in understanding of the scripts.


  MATLAB code from chromate.m file
% Function to define the system of ODEs describing the modified chromate pathway.
%% Section 1: Function to define the system of ODEs describing the modified chromate pathway.
% The vector u has seven dimensions where;
% u(1) = ChrB protein concentration,
% u(2) = ChrB dimer concentration,
% u(3) = Cv, the hexavalent chromate added to the system concentration,
% u(4) = Dimer and Cv complex concentration,
% u(5) = Pc, the closed (bound and non-functioning) promoter concentration,
% u(6) = Po. the open (unbound and functioning) promoter concentration,
% u(7) = GFP output concentration.
% Parameter t is time that the simulation runs over. 
% Parameters k1..k8 represent the kinetic rates of the system.
function f=chromate(t,u);
k1 = 1;
k2 = 1;
k3 = 1;
km3 = 1;
k4 = 1;
km4 = 1;
k5 = 1;
k6 = 1;
km6=1;
k7 = 1;
% k8 divided by 60 as in minutes not hours.
k8=(0.25/60);
% Set S1 and S2 at specific times which represent whether chromate is present or not
% S is the signal input.

S1=0;
S2=1;
if (t<500)% Where time is less than 500 seconds.
    S=S1;

else if (t>500) && (t<3100)% Where time is more than 500 seconds and less than 3100 seconds.
        S=S2;

    else if (t>3100)% Where time is more than 3100 seconds.
            S=S1;
        end
    end
end % If and else if loop sets the times when chromate is present or absent from the system.
% Define f as a vector where the input is the right hand side of the systems of ODEs representing the pathway with signal input incorporated.
f=[k1 - k2*u(1)+km3*u(2)-k3*u(1)*u(1);
    k3*u(1)*u(1)-km3*u(2)+(km4*u(4))-(k4*u(2)*u(3)*S)-k5*u(2)+(km6*u(5)*S)-k6*u(2)*u(6);
    -k4*u(2)*u(3)*S+km4*u(4);
     k4*u(2)*u(3)*S-km4*u(4);
     k6*u(6)*u(2)-km6*u(5)*S;
     -k6*u(6)*u(2)+km6*u(5)*S;
     k7*u(6)*S-k8*u(7)];
 % End function.
end
% This function can then be called using the @chromate command in run_chromate.m file.
% END OF SECTION
%
%
%% Function to define the system of ODEs describing the original chromate pathway.
% Function to define the system of ODEs describing the modified chromate pathway.
%% Section 1: Function to define the system of ODEs describing the modified chromate pathway.
% The vector u has seven dimensions where;
% u(1) = ChrB protein concentration,
% u(2) = ChrB dimer concentration,
% u(3) = Cv, the hexavalent chromate added to the system concentration,
% u(4) = Dimer and Cv complex concentration,
% u(5) = Pc, the closed (bound and non-functioning) promoter concentration,
% u(6) = Po. the open (unbound and functioning) promoter concentration,
% u(7) = GFP output concentration.
% Parameter t is time that the simulation runs over. 
% Parameters k1..k8 represent the kinetic rates of the system.
function f=chrom_wt(t1,u1);
k2 = 1;
k3 = 1;
km3 = 1;
k4 = 1;
km4 = 1;
k5 = 1;
k6 = 1;
km6=1;
k7 = 1;
% k8 divided by 60 as in minutes not hours.
k8=(0.25/60);
% Set S1 and S2 at specific times which represent whether chromate is present or not.
% S is the signal input.

S1=0;
S2=1;
if (t1<500)% Where time is less than 500 seconds.
    S=S1;

else if (t1>500) && (t1<3100)% Where time is more than 500 seconds and less than 3100 seconds.
        S=S2;

    else if (t1>3100)% Where time is more than 3100 seconds.
            S=S1;
        end
    end
end % If and else if loop sets the times when chromate is present or absent from the system.
% Define f as a vector where the input is the right hand side of the systems of ODEs representing the pathway with signal input incorporated.
f=[k7*u1(6)-k2*u1(1)+km3*u1(2)-k3*u1(1)*u1(1);
    k3*u1(1)*u1(1)-km3*u1(2)+(km4*u1(4))-(k4*u1(2)*u1(3)*S)-k5*u1(2)+(km6*u1(5)*S)-k6*u1(2)*u1(6);
    -k4*u1(2)*u1(3)*S+km4*u1(4);
     k4*u1(2)*u1(3)*S-km4*u1(4);
     k6*u1(6)*u1(2)-km6*u1(5)*S;
     -k6*u1(6)*u1(2)+km6*u1(5)*S;
     k7*u1(6)*S-k8*u1(7)];
 % End function.
end
% This function can then be called using the @chrom_wt command in run_chromate.m file
%
%
% END OF FILE




 MATLAB code from run_chromate.m file
Back to Top View Description of Model

Bone Incision Data

Lorem ipsum dolor sit amet, nostrud maiestatis quaerendum ne sed. Reque possit ne sea. Te dico labitur mediocritatem ius. Error timeam noluisse eos ad, eam ne magna meliore contentiones, nec ei volumus persecuti. Dicit animal definitionem et mel, nonumy tacimates nec in. Vis mucius periculis at. At est vidit scripserit repudiandae, agam porro sea ne. Sea et stet tibique praesent, vim et legere aperiri. Quo doming vocibus eleifend no. Cu vis partem graeci facilisis. Falli inciderint mei no. Assentior suscipiantur mea id. Vis quas electram prodesset cu, choro omnium conclusionemque an his. Vis latine equidem perfecto ad.

Bone Incision Experiment Code

code.


  MATLAB code from bone.m file


k=6.23*10^(-9);%wear coefficient
W=zeros(1,101);%zero vector for calculated volume of bone incision m^3
s=(0:0.001:0.1);%range of values for blade length m, from 0 to 10cm
p=(0:2:200);%range of values for applied force N, from 0 to 200N

for i=1:101
    for j=1:101
    W(i,j)=k*p(i)*s(j); %Archards Equation in two for loops
    %to create a matrix of possible values for volume
end
end

surf(p,s,W)%creates a surface plot, where the height and therefore colour are dependand on the matric W
grid on
title('Relationship Between Volume of Bone Incison, Force and Blade length')
zlabel('Volume of Incision/m^3')
ylabel('Blade Length/m')
xlabel('Applied Load/N')
Back to Top View Description of Experiment

To see the MATLAB code for the BioSpray section of the project or the Fingerprint Aging section of the project use the following buttons.

Appendix 2: Fingerprint Aging Appendix 1: BioSpray