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

Line 1: Line 1:
 
<html><head>
 
<html><head>
 
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <!--
+
   <header>
This HTML was auto-generated from MATLAB code.
+
To make changes, update the MATLAB code and republish this document.
+
      --><title>run_haptosen</title><meta name="generator" content="MATLAB 8.5"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2015-08-09"><meta name="DC.source" content="run_haptosen.m"><style type="text/css">
+
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
+
 
+
html { min-height:100%; margin-bottom:1px; }
+
html body { height:100%; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#000; line-height:140%; background:#fff none; overflow-y:scroll; }
+
html body td { vertical-align:top; text-align:left; }
+
 
+
h1 { padding:0px; margin:0px 0px 25px; font-family:Arial, Helvetica, sans-serif; font-size:1.5em; color:#d55000; line-height:100%; font-weight:normal; }
+
h2 { padding:0px; margin:0px 0px 8px; font-family:Arial, Helvetica, sans-serif; font-size:1.2em; color:#000; font-weight:bold; line-height:140%; border-bottom:1px solid #d6d4d4; display:block; }
+
h3 { padding:0px; margin:0px 0px 5px; font-family:Arial, Helvetica, sans-serif; font-size:1.1em; color:#000; font-weight:bold; line-height:140%; }
+
 
+
a { color:#005fce; text-decoration:none; }
+
a:hover { color:#005fce; text-decoration:underline; }
+
a:visited { color:#004aa0; text-decoration:none; }
+
 
+
p { padding:0px; margin:0px 0px 20px; }
+
img { padding:0px; margin:0px 0px 20px; border:none; }
+
p img, pre img, tt img, li img, h1 img, h2 img { margin-bottom:0px; }
+
 
+
ul { padding:0px; margin:0px 0px 20px 23px; list-style:square; }
+
ul li { padding:0px; margin:0px 0px 7px 0px; }
+
ul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; }
+
ul li ol li { list-style:decimal; }
+
ol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; }
+
ol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; }
+
ol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; }
+
ol li ol li { list-style-type:lower-alpha; }
+
ol li ul { padding-top:7px; }
+
ol li ul li { list-style:square; }
+
 
+
.content { font-size:1.2em; line-height:140%; padding: 20px; }
+
 
+
pre, code { font-size:12px; }
+
tt { font-size: 1.2em; }
+
pre { margin:0px 0px 20px; }
+
pre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; }
+
pre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; }
+
pre.error { color:red; }
+
 
+
@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } }
+
 
+
span.keyword { color:#0000FF }
+
span.comment { color:#228B22 }
+
span.string { color:#A020F0 }
+
span.untermstring { color:#B20000 }
+
span.syscmd { color:#B28C00 }
+
 
+
.footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; }
+
.footer p { margin:0px; }
+
.footer a { color:#878787; }
+
.footer a:hover { color:#878787; text-decoration:underline; }
+
.footer a:visited { color:#878787; }
+
 
+
table th { padding:7px 5px; text-align:left; vertical-align:middle; border: 1px solid #d6d4d4; font-weight:bold; }
+
table td { padding:7px 5px; text-align:left; vertical-align:top; border:1px solid #d6d4d4; }
+
 
+
 
+
 
+
 
+
 
+
   </style> <header>
+
 
     <a class="anchor" id="top"></a>
 
     <a class="anchor" id="top"></a>
 
         <center>
 
         <center>

Revision as of 13:51, 9 August 2015

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;