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

Line 1: Line 1:
 
<html>
 
<html>
  
 +
<head>
 +
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 +
  <!--
 +
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>
 +
<script>
 +
$('.chevron_toggleable').on('click', function() {
 +
    $(this).toggleClass('glyphicon-chevron-down glyphicon-chevron-up');
 +
});
 +
</script>
 +
<script type="text/javascript">
 +
  $(document).ready(function(){
 +
  $('a[href^="#"]').on('click',function (e) {
 +
      e.preventDefault();
 +
 +
      var target = this.hash,
 +
      $target = $(target);
 +
 +
      $('html, body').stop().animate({
 +
          'scrollTop': $target.offset().top
 +
      }, 900, 'swing', function () {
 +
          window.location.hash = target;
 +
      });
 +
  });
 +
});
 +
</script>
 +
 +
 +
 +
 +
 +
 +
   
 +
 +
 +
</head>
 +
 +
<body>
 +
<meta name="viewport" content="width=device-width, initial-scale=1.0">
 +
 +
 +
<a class="anchor" id="overview"></a>
 +
    <section id="overview">
 +
      <div class="row3">
 +
        <div class="row">
 +
          <div class="">
 +
              <img src="img/igem-sponsor.png" align="right" width="50%" height="auto" class="img-mockup">
 +
              </div>
 +
          <div class="col-lg-12 feature" style="">
 +
            <div class="row">
 +
               
 +
            <p><font color="white"> Lorem Ipsum</font></p>
 +
              </div> 
 +
   
 +
              </div>
 +
            </div>
 +
           
 +
 +
      </div>
 +
    </section>
 +
 +
 +
 +
 +
<a class="anchor" id="Blood_code"></a>
 +
    <section id="Blood_code">
 +
      <div class="row3">
 +
        <div class="row">
 +
       
 +
          <div class="col-lg-12 feature" style="">
 +
            <div class="row">
 +
               
 +
           
 +
              </div> 
 +
   
 +
              </div>
 +
            </div>
 +
           
 +
 +
      </div>
 +
    </section>
 +
<a href="https://2015.igem.org/Team:Dundee/Modeling/Appendix3"  class="btn btn-primary btn-lg pull-right" role="button">Appendix 3: Chromate Detector</a> 
 +
<a href="https://2015.igem.org/Team:Dundee/Modeling/Appendix2"  class="btn btn-primary btn-lg pull-right" role="button">Appendix 2: Fingerprint Aging </a> 
 +
 +
 +
 +
<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">%binding between Haptoglobin and Haemoglobin. u is a 4 dimensional vector</span>
 +
<span class="comment">%where;</span>
 +
<span class="comment">% u(1)=Hp (Haptoglobin concentration)</span>
 +
<span class="comment">% u(2)=alphaHemo (Free Hemoglobin)</span>
 +
<span class="comment">% u(3)=alphaHemo/Hapto complex (Haptoglobin + alphaHemo complex)</span>
 +
<span class="comment">% u(4)=Hemo/Hapto complex (Full hemo/hapto complex).</span>
 +
<span class="comment">% t is the time that the simulation is run over.</span>
 +
<span class="comment">% lambda represents the parameter in the system determined by binding rates nd initial concentration of haemoglobin.</span>
 +
<span class="comment">% gamma represents the parameter in the system determined by binding rates.</span>
 +
<span class="keyword">function</span> f = haptosen(t,u,lambda,gamma);
 +
<span class="comment">% define the system of ODEs by setting the vector f = left hand side of the system.</span>
 +
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)];
 +
<span class="comment">% The function is then ended.</span>
 +
 +
<span class="keyword">end</span>
 +
<span class="comment">% This function can then be called in the run_haptosen.m file by using</span>
 +
<span class="comment">% @haptosen command.</span>
 +
 +
 +
 +
 +
 +
  <span class="comment"> <h2>MATLAB code from run_haptosen.m file</h2>File to perform sensitivity analysis for Haptoglobin and Haemoglobin</span>
 +
<span class="comment">% binding model.</span>
 +
<span class="comment">% a is the number of values chosen for each of the ranges of parameters.</span>
 +
<span class="comment">% Therefore 100 different values were chosen.</span>
 +
a=100;
 +
<span class="comment">%Lambda1 is the range of values for the parameter Lambda, chosen with the</span>
 +
<span class="comment">%expected value of (100/317)*0.3878494524 as the mean value.</span>
 +
lambda1=linspace(0,((100/317)*0.3878494524)*2,a);
 +
<span class="comment">%Gamma1 is the range of values for the parameter Gamma, chosen with the</span>
 +
<span class="comment">%expected value of (83/317) as the mean value.</span>
 +
gamma1=linspace(0,(83/317)*2,a);
 +
<span class="comment">%T is the final time of the simulation.</span>
 +
T=30;
 +
<span class="comment">% Store sets an empty matrix for the final concentrations of the complex</span>
 +
<span class="comment">% with the varied parameter values.</span>
 +
Store = zeros(a,a);
 +
<span class="comment">%figure(1) calls up a new figure.</span>
 +
figure(1)
 +
<span class="comment">% The for loop solves the ode system defined in haptosen function using ode23 for the range of values for both</span>
 +
<span class="comment">% parameters.</span>
 +
<span class="keyword">for</span> i=1:a
 +
    <span class="keyword">for</span> 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);
 +
<span class="comment">%        Store(i,j) = (u(3,4)-u(2,4))/(t(3)-t(2));</span>
 +
    <span class="keyword">end</span>
 +
<span class="keyword">end</span>
 +
<span class="comment">%imagesc plots the surf plot of the parameters and the complex</span>
 +
<span class="comment">%concentration.</span>
 +
imagesc(Store)
 +
<span class="comment">% xlabel and ylabel add labels to the plot.</span>
 +
xlabel(<span class="string">'Increasing \lambda'</span>,<span class="string">'FontSize'</span>,15,<span class="string">'FontWeight'</span>,<span class="string">'bold'</span>);
 +
ylabel(<span class="string">'Increasing \gamma'</span>,<span class="string">'FontSize'</span>,15,<span class="string">'FontWeight'</span>,<span class="string">'bold'</span>);
 +
<span class="comment">%set removes the x and y axis</span>
 +
set(gca,<span class="string">'YTick'</span>,[],<span class="string">'XTick'</span>,[]);
 +
<span class="comment">% The following lines add a colour bar with defined labal and text.</span>
 +
c=colorbar(<span class="string">'Ticks'</span>,[0,0.99],<span class="string">'TickLabels'</span>,{<span class="string">'None'</span>,<span class="string">'High'</span>},<span class="string">'FontSize'</span>,15,<span class="string">'FontWeight'</span>,<span class="string">'bold'</span>);
 +
c.Label.String = <span class="string">'Complex Concentration'</span>;
 +
<span class="comment">%the following lines add a text arrow to allow for annotation of the graph with defined colours positions and width.</span>
 +
ta1 = annotation(<span class="string">'textarrow'</span>, [0.13 0.79], [0.13 0.92]);
 +
h = text(0.5,0.5,<span class="string">'Complex Formation'</span>);
 +
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 = <span class="string">'red'</span>;
 +
ta1.LineWidth= 4;
 +
</pre><!--##### SOURCE BEGIN #####
 +
%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.
 +
##### SOURCE END #####
 +
##### SOURCE BEGIN #####
 +
% 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;
 +
 +
 +
##### SOURCE END #####
 +
--></body></html>
  
 
<script>
 
<script>
Line 55: Line 358:
 
                  
 
                  
 
             <p><font color="white"> Lorem Ipsum</font></p>
 
             <p><font color="white"> Lorem Ipsum</font></p>
 +
              </div> 
 +
   
 +
              </div>
 +
            </div>
 +
           
 +
 +
      </div>
 +
    </section>
 +
 +
 +
 +
 +
<a class="anchor" id="Blood_code"></a>
 +
    <section id="Blood_code">
 +
      <div class="row3">
 +
        <div class="row">
 +
       
 +
          <div class="col-lg-12 feature" style="">
 +
            <div class="row">
 +
               
 +
           
 
               </div>   
 
               </div>   
 
      
 
      

Revision as of 13:45, 9 August 2015

run_haptosen

Lorem Ipsum

Appendix 3: Chromate Detector Appendix 2: Fingerprint Aging
  

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;

<script> $('.chevron_toggleable').on('click', function() {

   $(this).toggleClass('glyphicon-chevron-down glyphicon-chevron-up');

}); </script> <script type="text/javascript">

 $(document).ready(function(){
 $('a[href^="#"]').on('click',function (e) {
     e.preventDefault();
     var target = this.hash,
     $target = $(target);
     $('html, body').stop().animate({
         'scrollTop': $target.offset().top
     }, 900, 'swing', function () {
         window.location.hash = target;
     });
 });

}); </script>


<body>


<meta name="viewport" content="width=device-width, initial-scale=1.0">



   <header>
   <a class="anchor" id="top"></a>

<highlight class="highlight">Dry Lab</highlight>

<highlight class="highlight">Appendix 1: BioSpray Code</highlight>

     </header>


<a class="anchor" id="overview"></a>

    <section id="overview">
             <img src="img/igem-sponsor.png" align="right" width="50%" height="auto" class="img-mockup">

Lorem Ipsum


   </section>



<a class="anchor" id="Blood_code"></a>

    <section id="Blood_code">



   </section>

<a href="https://2015.igem.org/Team:Dundee/Modeling/Appendix3" class="btn btn-primary btn-lg pull-right" role="button">Appendix 3: Chromate Detector</a> <a href="https://2015.igem.org/Team:Dundee/Modeling/Appendix2" class="btn btn-primary btn-lg pull-right" role="button">Appendix 2: Fingerprint Aging </a>




 </body>


</html>