Difference between revisions of "Team:USTC/Software"

Line 1: Line 1:
 
{{USTC}}
 
{{USTC}}
 
<html>
 
<html>
 +
<div class="Nav2nd row white z-depth-1">
 +
    <div class="Nav1th col s2 blue darken-3" >
 +
        <a class="dropdown-button btn white-text" data-beloworigin="true"data-hover="true" href="#!" data-activates="Nav-dropdown" >Software<i class="material-icons">arrow_drop_down</i></a>
 +
      </div>
  
<h2>Software</h2>
+
    <div class="col s10" style="z-index:2;">
 
+
      <ul class="tabs tabs-wrapper transparent">
 
+
        <li class="tab col s2">
<div class="highlightBox">
+
          <a href="#Overview" class="blue-text active waves-effect waves-light">Overview</a>
<h4>Note</h4>
+
        </li>
<p>In order to be considered for the <a href="https://2015.igem.org/Judging/Awards#SpecialPrizes">Best Software Tool award</a>, you must fill out this page.</p>
+
        <li class="tab col s2">
 +
          <a href="#fringes-analysis" class="blue-text active waves-effect waves-light">Fringes Analysis</a>
 +
        </li>
 +
        <li class="tab col s2">
 +
          <a href="#adhesion-dynamics" class="blue-text active waves-effect waves-light">Adhesion Dynamics</a>
 +
        </li>
 +
        <li class="tab col s2">
 +
          <a href="#rose-dynamics" class="blue-text active waves-effect waves-light">ROSE Dynamics</a>
 +
        </li>
 +
      </ul>
 +
    </div>
 
</div>
 
</div>
  
 +
<ul id='Nav-dropdown' class='dropdown-content'>
 +
  <li><a href="https://2015.igem.org/Team:USTC" class="waves-effect waves-light">Home</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Description" class="waves-effect waves-light">Project</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Modeling" class="waves-effect waves-light">Modeling</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Results" class="waves-effect waves-light">Results</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Achievements" class="waves-effect waves-light">Achivements</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Measurement" class="waves-effect waves-light">Measurement</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Software" class="waves-effect waves-light">Software</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Parts" class="waves-effect waves-light">Parts</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Tutorials" class="waves-effect waves-light">Tutorials</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Notebook" class="waves-effect waves-light">NoteBook</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Safety" class="waves-effect waves-light">Safety</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Practices" class="waves-effect waves-light">Policy&Practices</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Team" class="waves-effect waves-light">Team</a></li>
 +
  <li><a href="https://2015.igem.org/Team:USTC/Attributions" class="waves-effect waves-light">Attributions</a></li>
 +
</ul>
  
<p>Regardless of the topic, iGEM projects often create or adapt computational tools to move the project forward. Because they are born out of a direct practical need, these software tools (or new computational methods) can be surprisingly useful for other teams. Without necessarily being big or complex, they can make the crucial difference to a project's success. This award tries to find and honour such "nuggets" of computational work.</p>
+
<div class="row">
 +
  <div class="col offset-m1 offset-l2 s12 m10 l8">
  
<p>
+
    <div id="Overview" class="row">
If you are working on software as your main project, please join the software track. If you are creating software as an addition to your main project, please apply for this award.
+
      <div class="card hoverable">
</p>
+
        <div class="col s12 m9">
 
+
          <div class="card-content">
<p>
+
<p>In this section, we will introduce all the software program we used when processing our modeling and experimental data. Through our modeling, many complicated processdures are simply omitted by our convenient programs.</p>
Here are a few examples from previous teams:
+
<p>In general, our software programs are used in several sections,</p>
</p>
+
 
<ul>
 
<ul>
<li><a href="https://2013.igem.org/Team:TU-Munich/Results/Software">TU Munich 2013</a></li>
+
    <li><strong>Fringes Analysis</strong>, analysis of interference pattern.</li>
<li><a href="https://2014.igem.org/Team:Heidelberg/Software">Heidelberg 2014</a></li>
+
    <li><strong>Adhesion Dynamics</strong>, a series of programs relating to bacteria adhesion dynamics.</li>
<li><a href="https://2014.igem.org/Team:Aachen/Project/Measurement_Device#Software">Aachen 2014</a></li>
+
    <li><strong>Rose Prediction</strong>, which calculate the advantages of our ROSE improvement.</li>
 
</ul>
 
</ul>
 +
<p>All software of our project, you can download them at <a href="https://github.com/Cintau/2015USTCiGEM" target="_blank">Github:2015USTCiGEM</a>. All codes are based on </p>
 +
          </div>
 +
        </div>
 +
      </div>
 +
    </div>
  
</div>
+
    <div id="fringes-analysis" class="row">
 +
      <div class="card hoverable">
 +
        <div class="col s12 m9">
 +
          <div class="card-content">
 +
<h4 id="Fringes-Pattern-Simulation-Film-I" class="scrollspy">Fringes Pattern Simulation-Film I</h4>
 +
<p>This program is used to simulate fringes pattern deliverd by film I.</p>
 +
<p>Code:</p>
 +
<pre><code>function drawndh(r,h,t,n) %r is radius of film,h is the distance of deformation,t is the drift angle of film,n is pixel number
 +
wl=6.5e-7; %wave length
 +
R=r.^2/(2*h);
 +
[x,y]=meshgrid(linspace(-0.004,0.004,n),linspace(-0.004,0.004,n));
 +
r2=x.^2+y.^2;
 +
delta=pi*r2/(R*wl)-2*pi*y*sin(t)/wl;
 +
I=abs(sin(delta).^2);
 +
imshow(I);
 +
end
 +
</code></pre><p>Demo<br><img src="https://static.igem.org/mediawiki/2015/c/cd/0.02-5e-6-5e-4.jpg" alt="Figure 1: Film II deformation simulation result"></p>
 +
<p>After the formation of demo, we are able to recongize the real situation in our pre-experiment.</p>
 +
<div class="divider"></div>
  
 +
<h4 id="Fringes-Pattern-Simulation-Film-II" class="scrollspy">Fringes Pattern Simulation-Film II</h4>
 +
<p>This program is used to simulate fringes pattern deliverd by film II.</p>
 +
<p>Code</p>
 +
<pre><code>function drawfr(a,b,h,n)%a is the angle between film and x axis, b is the angle between film and y axis, h is the distance of film deformation, n is the pixel number
 +
[X,Y]=meshgrid(linspace(-0.003,0.003,n),linspace(-0.003,0.003,n));
 +
wl=6.5e-7;
 +
L=2*(X.*tan(0.01)+Y.*tan(0.01));
 +
delta=2*pi*L/wl;
 +
I=1+cos(delta);
 +
imshow(I)
 +
end
 +
</code></pre><p>Demo<br><img src="https://static.igem.org/mediawiki/2015/f/f8/20150917061.jpg" alt="Figure 2 :Film II deformation simulation result"></p>
 +
<div class="divider"></div>
 +
 +
<h4 id="Film I Fringes Analysis" class="scrollspy">Film I Fringes Analysis</h4>
 +
<p>Using this code, we are able to capture some important parameters in Film I.</p>
 +
<p>Code</p>
 +
<pre><code>function ms3=solvendh(X,nx,ny,n,dx,dy)%nx is the number of fringes on x axis,ny is the number of fringes on y axis,n is the number of fringes on diag,dx is the x length of CCD,dx is the x length of CCD.
 +
x=X(1);
 +
y=X(2);
 +
z=X(3);
 +
l=1.2e-4;
 +
ms3(1)=(2*(z+nx)*l)^0.5-(2*z*l)^0.5-((x+dx)^2+y^2)^0.5+(x^2+y^2)^0.5;
 +
ms3(2)=(2*(z+ny)*l)^0.5-(2*z*l)^0.5-(x^2+(y+dy)^2)^0.5+(x^2+y^2)^0.5;
 +
ms3(3)=(2*(z+n)*l)^0.5-(2*z*l)^0.5-((x+dx)^2+(y+dy)^2)^0.5+(x^2+y^2)^0.5;
 +
</code></pre><p>Demo<br><img src="https://static.igem.org/mediawiki/2015/0/0d/20150919071.png" alt="Figure 3 : Film I Fringes analysis running result"></p>
 +
<div class="divider"></div>
 +
 +
<h4 id="Film-II-Fringes-Analysis-Fringes-number-analysis" class="scrollspy">Film II Fringes Analysis-Fringes number analysis</h4>
 +
<p>This is the final program used to get our NDM calibration. Based on this software program, we are able to count the number of bright fringes. As a matter of fact, the variation of bright fringes is the key breakthrough to antibiotic analysis.</p>
 +
<p>Code</p>
 +
<pre><code>function seeim(i)
 +
name=num2str(i);
 +
I=imread(name,'pnm');
 +
G=rgb2gray(I);
 +
imshow(G);
 +
</code></pre><p>Demo<br><img src="https://static.igem.org/mediawiki/2015/2/2d/20150919072.png" alt="Figure 4: Checking figure program"></p>
 +
<pre><code>function A=getfr(i)
 +
name=num2str(i);
 +
I=imread(name,'pnm');
 +
G=rgb2gray(I);
 +
G1=medfilt2(G);
 +
[x,y]=size(G1);
 +
r=zeros(x,1);
 +
for m=1:20
 +
    p=G1(:,x-m+1);
 +
    p=double(p);
 +
    r=r+p;
 +
end
 +
[a,b]=size(r);
 +
for m=1:b-1
 +
    r(m,1)=(r(m-1,1)+r(m,1)+r(m+1,1));
 +
end
 +
A=r;
 +
</code></pre><pre><code>function M=getfrs(i)
 +
A=getfr(i);
 +
t=1:480;
 +
[pksa,locsa]=findpeaks(A,'minpeakdistance',3);plot(t,A,'b',locsa,pksa,'bo');
 +
[a,k]=size(pksa);
 +
M=a;
 +
</code></pre><p>Running result<br>ans =<br>    78</p>
 +
<p><img src="https://static.igem.org/mediawiki/2015/c/c1/20150919073.png" alt="Figure 5: Fringes counting program running result"></p>
 +
<p>To get a series of results, this program is required.</p>
 +
<pre><code>function N=getpkss(i,j)
 +
B=zeros(j-i+1,1);
 +
for m=i:j
 +
    A=getfr(m);
 +
    [pksa,locsa]=findpeaks(A,'minpeakdistance',3);
 +
    [a,k]=size(pksa);
 +
    B(m-i+1,1)=a;
 +
end
 +
N=B;
 +
</code></pre><p>Demo</p>
 +
<p>ans =</p>
 +
<pre><code>78
 +
80
 +
77
 +
76
 +
75
 +
79
 +
81
 +
80
 +
75
 +
80
 +
82
 +
82
 +
81
 +
78
 +
79
 +
82
 +
81
 +
81
 +
83
 +
81
 +
79
 +
</code></pre>
 +
 +
          </div>
 +
        </div>
 +
        <div class="col hide-on-small-only m3">
 +
          <div class="toc-wrapper pinned">
 +
            <ul class="section table-of-contents">
 +
              <li>
 +
                <a href="#Fringes-Pattern-Simulation-Film-I">Fringes Pattern Simulation-Film I</a>
 +
              </li>
 +
              <li>
 +
                <a href="#Fringes-Pattern-Simulation-Film-II">Fringes Pattern Simulation-Film II</a>
 +
              </li>
 +
              <li>
 +
                <a href="#Film-I-Fringes-Analysis">Film I Fringes Analysis</a>
 +
              </li>
 +
              <li>
 +
                <a href="#Film-II-Fringes-Analysis-Fringes-number-analysis">Film II Fringes Analysis-Fringes number analysis</a>
 +
              </li>
 +
            </ul>
 +
          </div>
 +
        </div>
 +
      </div>
 +
    </div>
 +
 +
    <div id="adhesion-dynamics" class="row">
 +
      <div class="card hoverable">
 +
        <div class="col s12 m9">
 +
          <div class="card-content">
 +
<p>During analysis of ahdesion assay results, we are quite annoyed about counting total bacteria number and moving bacteria number, which is really important for mechanism analysis and results determination. Consequently, this part explains how we efficiently accomplished these tough work based on our software.</p>
 +
<h4 id="Bacteria-counting-program" class="scrollspy">Bacteria counting program</h4>
 +
<p>This program is used to count the total number of bacteria.</p>
 +
<p>Code</p>
 +
<pre><code>function a=shujun(i)
 +
name=num2str(i);
 +
I=imread(name,'jpg');
 +
L=graythresh(I);%get the self-adapting threshold
 +
G=im2bw(I,0.3);%image binaryzation with special threshold
 +
W1=~G;
 +
W2=bwmorph(W1,'majority',20);%mathematical morphology operations
 +
W3=medfilt2(W2,[10,10]);%filtering
 +
W4=bwareaopen(W3,40);%delete small area to reduce error noises
 +
[labeled,num]=bwlabel(W4,4);%counting number of objects
 +
a=num;
 +
end
 +
</code></pre><p>Demo</p>
 +
<p>input image:<br><img src="https://static.igem.org/mediawiki/2015/0/0e/20150919074.jpg" alt="Figure 6: Adhesion Assay image"><br>output result<br>ans =<br>    865</p>
 +
<pre><code>function A=mulshu(m)
 +
A=zeros(m,1);
 +
for i=1:m
 +
    A(i,1)=shujun(i);
 +
end
 +
</code></pre>
 +
<div class="divider"></div>
 +
 +
<h4 id="Moving-Bacteria-Counting-Program" class="scrollspy">Moving Bacteria Counting Program</h4>
 +
<p>This program is used to count the total number of moving bacteria. Along with bacterial counting program, we finally got the mechanism of polylysine interaction.</p>
 +
<p>Code</p>
 +
<pre><code>function b=act(m,n)
 +
s1=num2str(m);
 +
s2=num2str(n);
 +
I1=imread(s1,'jpg');
 +
I2=imread(s2,'jpg');
 +
G=I1-I2;
 +
b=shujun(G);
 +
end
 +
</code></pre><pre><code>function A=mulact(m)
 +
A=zeros(m,1);
 +
for i=1:m
 +
    name1=num2str(i);
 +
    name2=num2str(i+1);
 +
    I1=imread(name1,'jpg');
 +
    I2=imread(name2,'jpg');
 +
    c=act(I1,I2);
 +
    A(i,1)=c;
 +
end
 +
</code></pre><p>Demo</p>
 +
<p>ans =<br>  405 </p>
 +
<div class="divider"></div>
 +
 +
<h4 id="Bacteria-total-number-time-curve" class="scrollspy">Bacteria total number-time curve</h4>
 +
<p>Coding</p>
 +
<pre><code>function drawBT1(Ka,Kd,C,Vz,sigma0)%Ka is the adhesive rate of bacteria, Kd is the drop rate of bacteria, C is the density of bacteria solution,Vz is the velocity of bacteria,sigma0 is the maximum density of baacteria on surface
 +
t=linspace(0,100,101);
 +
K=Ka*C*Vz/(Kd*sigma0+Ka*C*Vz);
 +
sigma=K*sigma0*(1-exp(-Ka*C*Vz*t/(K*sigma0));
 +
plot(t,sigma)
 +
end
 +
</code></pre><p>Running result<br><img src="https://static.igem.org/mediawiki/2015/9/99/20150901024.png" alt="Figure 7: Movement number simulation result"></p>
 +
<div class="divider"></div>
 +
 +
<h4 id="Bacteria-movement-number-Time-curve" class="scrollspy">Bacteria movement number-Time curve</h4>
 +
<p>Coding</p>
 +
<pre><code>function drawBMT(c,b,m0,k)
 +
t=linspace(0,100,101);
 +
M=c*(1-exp(-b*t))*m0.*exp(-k*t);
 +
plot(t,M)
 +
xlabel('Time(s)');
 +
ylabel('Movement bacteria number');
 +
title('PAO1-PLL-0 Movement number-time');
 +
end
 +
</code></pre><p>Running result<br><img src="https://static.igem.org/mediawiki/2015/8/88/20150907052.png" alt="Figure8:Bacteria movement number-Time simulation result"></p>
 +
          </div>
 +
        </div>
 +
        <div class="col hide-on-small-only m3">
 +
          <div class="toc-wrapper pinned">
 +
            <ul class="section table-of-contents">
 +
              <li>
 +
                <a href="#Bacteria-counting-program">Bacteria Counting Program</a>
 +
              </li>
 +
              <li>
 +
                <a href="#Moving-Bacteria-Counting-Program">Moving Bacteria Counting Program</a>
 +
              </li>
 +
              <li>
 +
                <a href="#Bacteria-total-number-time-curve">Bacteria Total Number-Time Curve</a>
 +
              </li>
 +
              <li>
 +
                <a href="#Bacteria-movement-number-Time-curve">Bacteria Movement Number-Time Curve</a>
 +
              </li>
 +
            </ul>
 +
          </div>
 +
        </div>
 +
      </div>
 +
    </div>
 +
 +
    <div id="rose-dynamics" class="row">
 +
      <div class="card hoverable">
 +
        <div class="col s12 m9">
 +
          <div class="card-content">
 +
<p>This program is used to predict the advantages of ROSE construction. We successfully demonstrate our ROSE will be able to amplify fluorescence siganl.</p>
 +
<p>Code</p>
 +
<pre><code>clear all
 +
R=R,k=k,k1=k1,k2=k2,k3=k3,k4=k4,k5=k5,k6=k6,k7=k7,k0=k0; %define the constant
 +
t=linspace(0,10); %detecting time range
 +
F=k1*S;
 +
A=k*dsolve('Dx=k2*F','x(0)=0','t');
 +
RA=k3*R*A;
 +
X=k4*RA;
 +
Cl=dsolve('Dx=k5*X','x(0)=0','t');
 +
lambda=1-k6*cl;
 +
t0=fzero(lambda,t); %find the zero point of lambda
 +
if lambda&gt;=0
 +
    G=dsolve('Dx=k7*lambda','x(0)=0','t');
 +
else
 +
    Gm=G(t0);
 +
end
 +
%finish the equation solving step
 +
plot(G,t); %print the G-t picture
 +
hold on
 +
plot(k0*t,t); %print the traditional strategy result in the same image
 +
</code></pre><p>Demo</p>
 +
<p><img src="https://static.igem.org/mediawiki/2015/1/1b/20150906Circuit.jpg" alt="Figure 9: ROSE Dynamics simulation result" data-image-src="https://static.igem.org/mediawiki/2015/1/1b/20150906Circuit.jpg"></p>
 +
          </div>
 +
        </div>
 +
      </div>
 +
    </div>
 +
 +
  </div>
 +
</div>
 
</html>
 
</html>
 
{{USTC/footer}}
 
{{USTC/footer}}

Revision as of 22:13, 18 September 2015

In this section, we will introduce all the software program we used when processing our modeling and experimental data. Through our modeling, many complicated processdures are simply omitted by our convenient programs.

In general, our software programs are used in several sections,

  • Fringes Analysis, analysis of interference pattern.
  • Adhesion Dynamics, a series of programs relating to bacteria adhesion dynamics.
  • Rose Prediction, which calculate the advantages of our ROSE improvement.

All software of our project, you can download them at Github:2015USTCiGEM. All codes are based on

Fringes Pattern Simulation-Film I

This program is used to simulate fringes pattern deliverd by film I.

Code:

function drawndh(r,h,t,n) %r is radius of film,h is the distance of deformation,t is the drift angle of film,n is pixel number
wl=6.5e-7; %wave length
R=r.^2/(2*h);
[x,y]=meshgrid(linspace(-0.004,0.004,n),linspace(-0.004,0.004,n));
r2=x.^2+y.^2;
delta=pi*r2/(R*wl)-2*pi*y*sin(t)/wl;
I=abs(sin(delta).^2);
imshow(I);
end

Demo
Figure 1: Film II deformation simulation result

After the formation of demo, we are able to recongize the real situation in our pre-experiment.

Fringes Pattern Simulation-Film II

This program is used to simulate fringes pattern deliverd by film II.

Code

function drawfr(a,b,h,n)%a is the angle between film and x axis, b is the angle between film and y axis, h is the distance of film deformation, n is the pixel number
[X,Y]=meshgrid(linspace(-0.003,0.003,n),linspace(-0.003,0.003,n));
wl=6.5e-7;
L=2*(X.*tan(0.01)+Y.*tan(0.01));
delta=2*pi*L/wl;
I=1+cos(delta);
imshow(I)
end

Demo
Figure 2 :Film II deformation simulation result

Film I Fringes Analysis

Using this code, we are able to capture some important parameters in Film I.

Code

function ms3=solvendh(X,nx,ny,n,dx,dy)%nx is the number of fringes on x axis,ny is the number of fringes on y axis,n is the number of fringes on diag,dx is the x length of CCD,dx is the x length of CCD.
x=X(1);
y=X(2);
z=X(3);
l=1.2e-4;
ms3(1)=(2*(z+nx)*l)^0.5-(2*z*l)^0.5-((x+dx)^2+y^2)^0.5+(x^2+y^2)^0.5;
ms3(2)=(2*(z+ny)*l)^0.5-(2*z*l)^0.5-(x^2+(y+dy)^2)^0.5+(x^2+y^2)^0.5;
ms3(3)=(2*(z+n)*l)^0.5-(2*z*l)^0.5-((x+dx)^2+(y+dy)^2)^0.5+(x^2+y^2)^0.5;

Demo
Figure 3 : Film I Fringes analysis running result

Film II Fringes Analysis-Fringes number analysis

This is the final program used to get our NDM calibration. Based on this software program, we are able to count the number of bright fringes. As a matter of fact, the variation of bright fringes is the key breakthrough to antibiotic analysis.

Code

function seeim(i)
name=num2str(i);
I=imread(name,'pnm');
G=rgb2gray(I);
imshow(G);

Demo
Figure 4: Checking figure program

function A=getfr(i)
name=num2str(i);
I=imread(name,'pnm');
G=rgb2gray(I);
G1=medfilt2(G);
[x,y]=size(G1);
r=zeros(x,1);
for m=1:20
    p=G1(:,x-m+1);
    p=double(p);
    r=r+p;
end
[a,b]=size(r);
for m=1:b-1
    r(m,1)=(r(m-1,1)+r(m,1)+r(m+1,1));
end
A=r;
function M=getfrs(i)
A=getfr(i);
t=1:480;
[pksa,locsa]=findpeaks(A,'minpeakdistance',3);plot(t,A,'b',locsa,pksa,'bo');
[a,k]=size(pksa);
M=a;

Running result
ans =
78

Figure 5: Fringes counting program running result

To get a series of results, this program is required.

function N=getpkss(i,j)
B=zeros(j-i+1,1);
for m=i:j
    A=getfr(m);
    [pksa,locsa]=findpeaks(A,'minpeakdistance',3);
    [a,k]=size(pksa);
    B(m-i+1,1)=a;
end
N=B;

Demo

ans =

78
80
77
76
75
79
81
80
75
80
82
82
81
78
79
82
81
81
83
81
79

During analysis of ahdesion assay results, we are quite annoyed about counting total bacteria number and moving bacteria number, which is really important for mechanism analysis and results determination. Consequently, this part explains how we efficiently accomplished these tough work based on our software.

Bacteria counting program

This program is used to count the total number of bacteria.

Code

function a=shujun(i)
name=num2str(i);
I=imread(name,'jpg');
L=graythresh(I);%get the self-adapting threshold
G=im2bw(I,0.3);%image binaryzation with special threshold
W1=~G;
W2=bwmorph(W1,'majority',20);%mathematical morphology operations
W3=medfilt2(W2,[10,10]);%filtering
W4=bwareaopen(W3,40);%delete small area to reduce error noises
[labeled,num]=bwlabel(W4,4);%counting number of objects
a=num;
end

Demo

input image:
Figure 6: Adhesion Assay image
output result
ans =
865

function A=mulshu(m)
A=zeros(m,1);
for i=1:m
    A(i,1)=shujun(i);
end

Moving Bacteria Counting Program

This program is used to count the total number of moving bacteria. Along with bacterial counting program, we finally got the mechanism of polylysine interaction.

Code

function b=act(m,n)
s1=num2str(m);
s2=num2str(n);
I1=imread(s1,'jpg');
I2=imread(s2,'jpg');
G=I1-I2;
b=shujun(G);
end
function A=mulact(m)
A=zeros(m,1);
for i=1:m
    name1=num2str(i);
    name2=num2str(i+1);
    I1=imread(name1,'jpg');
    I2=imread(name2,'jpg');
    c=act(I1,I2);
    A(i,1)=c;
end

Demo

ans =
405

Bacteria total number-time curve

Coding

function drawBT1(Ka,Kd,C,Vz,sigma0)%Ka is the adhesive rate of bacteria, Kd is the drop rate of bacteria, C is the density of bacteria solution,Vz is the velocity of bacteria,sigma0 is the maximum density of baacteria on surface
t=linspace(0,100,101);
K=Ka*C*Vz/(Kd*sigma0+Ka*C*Vz);
sigma=K*sigma0*(1-exp(-Ka*C*Vz*t/(K*sigma0));
plot(t,sigma)
end

Running result
Figure 7: Movement number simulation result

Bacteria movement number-Time curve

Coding

function drawBMT(c,b,m0,k)
t=linspace(0,100,101);
M=c*(1-exp(-b*t))*m0.*exp(-k*t);
plot(t,M)
xlabel('Time(s)');
ylabel('Movement bacteria number');
title('PAO1-PLL-0 Movement number-time');
end

Running result
Figure8:Bacteria movement number-Time simulation result

This program is used to predict the advantages of ROSE construction. We successfully demonstrate our ROSE will be able to amplify fluorescence siganl.

Code

clear all
R=R,k=k,k1=k1,k2=k2,k3=k3,k4=k4,k5=k5,k6=k6,k7=k7,k0=k0; %define the constant
t=linspace(0,10); %detecting time range
F=k1*S;
A=k*dsolve('Dx=k2*F','x(0)=0','t');
RA=k3*R*A;
X=k4*RA;
Cl=dsolve('Dx=k5*X','x(0)=0','t');
lambda=1-k6*cl;
t0=fzero(lambda,t); %find the zero point of lambda
if lambda>=0
    G=dsolve('Dx=k7*lambda','x(0)=0','t');
else
    Gm=G(t0);
end
%finish the equation solving step
plot(G,t); %print the G-t picture
hold on
plot(k0*t,t); %print the traditional strategy result in the same image

Demo

Figure 9: ROSE Dynamics simulation result

Contact Us

University of Science and Technology of China, No.96, JinZhai Road Baohe District,Hefei,Anhui, 230026,P.R.China.

Links