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

Line 67: Line 67:
 
     <a class="anchor" id="top"></a>
 
     <a class="anchor" id="top"></a>
 
         <center>
 
         <center>
             <h1><highlight class="highlight">CSI: DUNDEE</highlight></h1>
+
             <h1><highlight class="highlight">Appendix 1</highlight></h1>
             <h3><highlight class="highlight">The Forensic Toolkit</highlight></h3>
+
             <h3><highlight class="highlight">BioSpray Code</highlight></h3>
             <a href="https://2015.igem.org/Team:Dundee/intro_video" class="btn btn-primary btn-lg">Watch Our Introduction Video</a>
+
              
 
         </center>
 
         </center>
       </header></head><body><div class="content"><pre class="codeinput">
+
       </header></head>
 +
 
 +
<body><div class="content"><pre class="codeinput">
 
   <span class="comment"><h2>MATLAB code from haptosen.m file</h2>%Function to define the non-dimensionalised system of ODEs describing the</span>
 
   <span class="comment"><h2>MATLAB code from haptosen.m file</h2>%Function to define the non-dimensionalised system of ODEs describing the</span>
 
<span class="comment">%binding between Haptoglobin and Haemoglobin. u is a 4 dimensional vector</span>
 
<span class="comment">%binding between Haptoglobin and Haemoglobin. u is a 4 dimensional vector</span>

Revision as of 13:49, 9 August 2015

run_haptosen

Appendix 1

BioSpray Code

  

MATLAB code from haptosen.m file

%Function to define the non-dimensionalised system of ODEs describing the
%binding between Haptoglobin and Haemoglobin. u is a 4 dimensional vector %where; % u(1)=Hp (Haptoglobin concentration) % u(2)=alphaHemo (Free Hemoglobin) % u(3)=alphaHemo/Hapto complex (Haptoglobin + alphaHemo complex) % u(4)=Hemo/Hapto complex (Full hemo/hapto complex). % t is the time that the simulation is run over. % lambda represents the parameter in the system determined by binding rates nd initial concentration of haemoglobin. % gamma represents the parameter in the system determined by binding rates. function f = haptosen(t,u,lambda,gamma); % define the system of ODEs by setting the vector f = left hand side of the system. f = [u(3)-lambda.*u(1)*u(2); u(3)-lambda.*u(1)*u(2); -u(3)+lambda.*u(1)*u(2)-gamma.*u(3); gamma.*u(3)]; % The function is then ended. end % This function can then be called in the run_haptosen.m file by using % @haptosen command.

MATLAB code from run_haptosen.m file

File to perform sensitivity analysis for Haptoglobin and Haemoglobin
% binding model. % a is the number of values chosen for each of the ranges of parameters. % Therefore 100 different values were chosen. a=100; %Lambda1 is the range of values for the parameter Lambda, chosen with the %expected value of (100/317)*0.3878494524 as the mean value. lambda1=linspace(0,((100/317)*0.3878494524)*2,a); %Gamma1 is the range of values for the parameter Gamma, chosen with the %expected value of (83/317) as the mean value. gamma1=linspace(0,(83/317)*2,a); %T is the final time of the simulation. T=30; % Store sets an empty matrix for the final concentrations of the complex % with the varied parameter values. Store = zeros(a,a); %figure(1) calls up a new figure. figure(1) % The for loop solves the ode system defined in haptosen function using ode23 for the range of values for both % parameters. for i=1:a for j=1:a [t,u]=ode23(@haptosen,[0 T],[4.17 1 0 0],[],lambda1(a+1-i),gamma1(j)); Store(i,j) = u(end,4); % Store(i,j) = (u(3,4)-u(2,4))/(t(3)-t(2)); end end %imagesc plots the surf plot of the parameters and the complex %concentration. imagesc(Store) % xlabel and ylabel add labels to the plot. xlabel('Increasing \lambda','FontSize',15,'FontWeight','bold'); ylabel('Increasing \gamma','FontSize',15,'FontWeight','bold'); %set removes the x and y axis set(gca,'YTick',[],'XTick',[]); % The following lines add a colour bar with defined labal and text. c=colorbar('Ticks',[0,0.99],'TickLabels',{'None','High'},'FontSize',15,'FontWeight','bold'); c.Label.String = 'Complex Concentration'; %the following lines add a text arrow to allow for annotation of the graph with defined colours positions and width. ta1 = annotation('textarrow', [0.13 0.79], [0.13 0.92]); h = text(0.5,0.5,'Complex Formation'); s = h.FontSize; h.FontSize = 12; j = h.Rotation; h.Rotation=45; k = h.Position; h.Position = [0.5 0.5 0]; b = ta1.Color; d=ta1.LineWidth; ta1.Color = 'red'; ta1.LineWidth= 4;