Team:Edinburgh/modelling(reallifemodelling)

 a:link { color: #1b4a22; text-decoration:none; } a:visited { color: #1b4a22; text-decoration:none; } a:active { color: #1b4a22; text-decoration:none; } a:hover { color: #1b4a22; text-decoration:none; } body { margin:0; padding:0; background: #868eb1; }

background: #868eb1; border-left: 0px; border-right: 0px; }
 * 1) content {

height:98px; }
 * 1) top-section {


 * 1) menubar {}

display:none; }
 * 1) contentSub {

display:none; }
 * 1) siteSub {

display:none; }
 * 1) search-controls {

.firstHeading { display:none; }

margin-top:30px; }
 * 1) search-controls {

display:none; border: 0px; background-color: #dae7b4; width:950px; }
 * 1) footer-box {

float:left; height:100%; width:0%; }
 * 1) leftspace {

float:left; width:150px; margin-top:75px; border-top:6px solid #CA9A38; border-bottom:6px solid #CA9A38; }
 * 1) mainmenu {

background-color:#dae7b4; float:left; width:150px; margin-top:320px; border-top:6px solid #CA9A38; border-bottom:6px solid #CA9A38; font-size:11px; font-family:Arial; color:#556B2F; }
 * 1) Upgradebox {

padding:5%; }
 * 1) Upgradenote {

float:left; height:100%; width:70%; }
 * 1) Edinburghcontainer {

margin-bottom:30px; margin-left:251px; text-decoration: none }
 * 1) contentmenu {

padding-top:30px; padding-right:20px; margin-bottom:2px; background-color: #e5e7e2; height:9350px; width:795px; font-size:12px; text-align:justify; }
 * 1) Edinburghcontent {

float:left; text-align:justify; }
 * 1) Edinburghcontent #left {

float:right; text-align:justify; }
 * 1) Edinburghcontent #right {

height:30px; background-color:#252833; width:815px; }
 * 1) bottombox {

font-family: sans-serif; font-size:12px; background-color:#474b5b; height:20px; width:150px; margin-top:2px; margin-bottom:2px; padding-top:5px; text-align:center; }
 * 1) menuitem {

width: 750px; }
 * 1) nav {

text-decoration:none; color:white; }
 * 1) menuitem a {

padding-top:5px; text-decoration:none; color:white; }
 * 1) bottomboxtext {

bottom:0px; height:30px; float:right; margin-top:15px; }
 * 1) bottomlinks {

float:right; margin-left:20px; }
 * 1) link {

text-decoration:none; color:#875a0c; font-size:11px; font-weight:bold; }
 * 1) link a {

Our WIKI is best viewed with (click title):

* Internet Explorer 8

* Firefox 3

* Adobe Flash Player 10

If you encounter any visual problems please upgrade your browser to the latest version in order to get the most out of our WIKI. Thank you!  Overall description   Gene regulatory network   Real life modelling   Scale Up   Results </a>  References </a> <ul id="nav" class="dropdown dropdown-horizontal"> <li>Home</a></li>

<li>Biology</a> <ul> <li>Overall Description and Design</a></li> <li>TNT-Sensing Pathway</a></li> <li>Nitrite/Nitrate-Sensing Pathway</a></li> <li>Biobrick Parts</a></li> <li>Results</a></li> <li>Problem Solving and Tips</a></li> <li>Materials and Methods</a></li> <li>References</a></li> </ul> </li>

<li>Modelling</a> <ul> <li>Overall Description</a></li> <li>Gene Regulatory Network</a></li> <li>Real Life Modelling</a></li> <li>Scale Up</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/modelling%28results%29">Results</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/modelling%28references%29">References</a></li> </ul> </li>

<li><a href="http://2009.igem.org/Team:Edinburgh/ethics%28publicperception%29" class="dir">Underlying Philosophy</a> <ul> <li><a href="http://2009.igem.org/Team:Edinburgh/ethics%28publicperception%29">Public Perception</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/ethics%28legislationissues%29">Legislation issues</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/ethics%28biosafety%29">Biosafety</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/ethics%28summary%29">DEMOCS Card Game</a></li> </ul> </li>

<li><a href="http://2009.igem.org/Team:Edinburgh/newinformatics%28introduction%29" class="dir">Informatics</a> <ul> <li><a href="http://2009.igem.org/Team:Edinburgh/newinformatics%28introduction%29">Introduction</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/newinformatics%28globetutorial%29">Globe Tutorial</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/newinformatics%28igemwikhacks%29">iGEM WIKI Hacks</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/newinformatics%28conclusions%29">Blog Entry</a></li> </ul> </li>

<li><a href="http://2009.igem.org/Team:Edinburgh/Notebook">Notebook</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/team%28teammembers%29" class="dir">Team</a> <ul> <li><a href="http://2009.igem.org/Team:Edinburgh/team%28teammembers%29">Team Members</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/team%28advisors%29">Advisors</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/team%28supervisors%29">Supervisors</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/team%28gallery%29">Gallery</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/team%28contacts%29">Contacts</a></li> <li><a href="http://2009.igem.org/Team:Edinburgh/team%28acknowledgements%29">Acknowledgements</a></li> </ul> </li> </ul> <font color="#323131" style="font-size:14px;float:left;margin-left:20px;margin-top:20px;">Modelling - Real Life Modelling

<img src="http://2009.igem.org/wiki/images/6/68/EdinburghPagemarker.jpg" style="margin-left:766px;">

<div id="abstarct" style="background-color:#e4f5ca;border:1px solid #595151;width:755px;height:130px;margin-top:10px;margin-left:20px;font-size:11px;text-align:justify;padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:5px;">  Personal note 

One of the exciting things about iGEM, is that I got the oppertunity to widen my knowledge, not just in Engineering, but also in Biology and Informatics. This project has had such an impact on me that I will actually continue my masters project on it! I will be characterising the TNT receptor that we require for our system.

<font color="green" style="float:right">Rachel

<img src="http://2009.igem.org/wiki/images/8/87/RealLifeModellingParagraph.jpg" style="margin-left:-5px;margin-top:20px;">

Since our system designed to detect landmines it was thought that we should include a visual representation of how the system would operate in real life. It is known that TNT leaks out of the landmine into the soil and we predict that the bacteria will move toward the TNT due to the chemotaxis response of the ribose binding protein which has previously computationally designed TNT receptor1

<img src="http://2009.igem.org/wiki/images/c/c7/TNTDiffucionModelling.jpg" style="margin-left:-5px;margin-top:20px;">

TNT and Nitrite diffusion has been modelled using a finite difference method which approximates the 2 dimensional time dependent diffusion equation below

<img src="http://2009.igem.org/wiki/images/9/92/Formula1.jpg">

where α is the diffusion coefficient, to a numerical solution which can be solved. By splitting the area into a grid M2 by N with a space step of h=1/M (in both the x and y directions) and time step size of k=T/N. This gives a grid of the form

<img src="http://2009.igem.org/wiki/images/9/91/Formula2.jpg">

which was set up as a matrix in the program.

An initial concentration of TNT in the field was then set to 107800µg/cm3  and the diffusion of TNT out from this site was calculated from the following equation,

<img src="http://2009.igem.org/wiki/images/3/38/Formula3.jpg">

and

<img src="http://2009.igem.org/wiki/images/8/8b/Formula4.jpg">

The diffusion coefficient for TNT is 1.18 *10-6 cm2 s-1 4 and the diffusion of Nitrite is 1.9*10-5 cm2 s-1.

This system was coded in both MATLAB and JAVA. MATLAB was used to produce graphs and JAVA was used for the chemotaxis modelling which is described below.

The TNT diffusion graph after a year is shown below

<img src="http://2009.igem.org/wiki/images/3/30/ModellingFigure1.jpg">

Figure 1 shows the diffusion of TNT over a small area, only 10m by 10m, so that the uniform distribution of the TNT concentration can be shown. However a better representation of what would happen in the field can be shown when the size of the grid is much larger, 100m by 100m as shown below

<img src="http://2009.igem.org/wiki/images/b/b2/ModellingFigure2.jpg">

It is clear from Figure 2 that TNT is only concentrated around the landmines location rather than across the whole field and hence the bacteria could be used to determine the approximate location of the landmine due to the light emit on detection of the TNT.

The bacteria also produces enzymes, nitroreducases, which breaks down TNT into various products including Nitrites. Our system is designed to emit light when these Nitrites are detected. For the model it has been assumed that a very low conversion of TNT to Nitrites will be achieved. The diffusion graph for Nitrite is very similar to that for TNT.

<img src="http://2009.igem.org/wiki/images/0/09/ChemotaxisModelling.jpg" style="margin-left:-5px;margin-top:20px;">

As previously stated, it is expected that the bacteria will move toward the landmine due to chemotaxis of the TNT receptor. This was incorporated into the model by assuming the bacteria will move toward the highest concentration of TNT, essentially swimming up the concentration gradient. This was programmed by incorporating a 3rd matrix where the grid matches up with both the TNT and the Nitrite diffusion graphs. The bacteria is then placed in the matrix using a random number generator to get its grid location and this location is set to 1 while the rest of the grid is set to zero.

The model then calculates the concentration of TNT at its grid position and its 4 surrounding grid positions. It then stores the current concentration as the maximum concentration and then compares each of the surrounding locations concentrations to this maximum. If any of the concentrations are greater than the current locations concentration then it set this concentration as the maximum and will then compare subsequent concentrations to this new maximum. It also indexes the location of the maximum concentration which is used to determine where the bacteria should move to. The moving of the bacteria is done by a series of IF statements as shown below

<div id="abstarct" style="background-color:#e4f5ca;border:1px solid #595151;width:755px;height:460px;margin-top:10px;margin-left:10px;font-size:11px;text-align:justify;padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:5px;">

if (index==1){

Bact[xbact][ybact]=1; }

if (index==2){

Bact[xbact-1][ybact]=1;

xbact=xbact-1;

}

if (index==3){

Bact[xbact+1][ybact]=1;

xbact=xbact+1;

}

if (index==4){

Bact[xbact][ybact-1]=1;

ybact=ybact-1;

}

if (index==5){

Bact[xbact][ybact+1]=1;

ybact=ybact+1;

}

Depending on the value of the index, depend on where the bacteria moves to by setting the new location in the grid for the bacteria to 1 and by reseting the location of the bacteria.

The random motion of chemotaxis has not been included in the model as over the distances that system operates it was thought that this would be unimportant and in general it would travel in a straight line.

This model is shown in an applet where the background is coloured green to represent a field, the landmine is coloured black and the bacteria is coloured yellow.

<img src="http://2009.igem.org/wiki/images/0/00/ModellingFurtherWork.jpg" style="margin-left:-5px;margin-top:20px;">

The model could be developed further by introducing more bacteria which would all move towards the highest concentration of TNT. Further to this the model could incorporate the concentration of Nitrite and dependant on the concentration of TNT and Nitrite the bacteria could be shown to represent the colour that would experienced in field, ie there would be a yellow and blue circle where the bacteria are. Further to this, the model could be linked with the gene expression modelling so that the colour of the light emitted could be dependent on the level of each protein expressed at each location.

It has also been suggested that the model could be made into a game, similar to minesweeper, where you use the movement of the bacteria to determine where the landmine is located.

<img src="http://2009.igem.org/wiki/images/6/69/MatlabCoding.jpg" style="margin-left:-5px;margin-top:20px;">

<div id="abstarct" style="background-color:#e4f5ca;border:1px solid #595151;width:755px;height:1030px;margin-top:10px;margin-left:10px;font-size:11px;text-align:justify;padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:5px;"> display ('***********************************************************')

%Finite difference model for the diffusion of TNT through soil

xsize=100;

ysize=100;

MaxSteps=8760;

TimeStep=0.01;

SpaceStep=1;

diffusivityC=1.18*(10-6)*3600/100/100;

%calculates s and s2 for TNT based on the diffusion coefficient of TNT

sC=(diffusivityC*TimeStep/SpaceStep/SpaceStep);

s2C=(1-4*sC);

diffusivityN=1.18*(10-6)*3600/100/100;

%Calculates s and s2 for Nitrites based on the diffusion coefficient of

%Nitrites

sN=(diffusivityN*TimeStep/SpaceStep/SpaceStep);

s2N=(1-4*sC);

% Sets up 2 matricies for the calculation

C=zeros (xsize,ysize);

CNew = zeros (xsize,ysize);

N= zeros (xsize,ysize);

NNew= zeros (xsize,ysize);

%Set up the concentration and position of the landmine

MineX=5;

MineY=5;

C(MineX,MineY)=107800;

N (MineX,MineY)=1;

React=0.99;

Produced=1/React;

for k=1:MaxSteps,

for i=2:xsize-1,

for j=2 :ysize-1,

%Calculates concentrations due to finite difference equation

CNew(i,j)= React*(sC*(C((i-1),j)+ C((i+1),j)+C(i,(j-1))+C(i,(j+1)))+s2C*C(i,j));

NNew(i,j)=Produced*(sN*(N((i-1),j)+ N((i+1),j)+N(i,(j-1))+N(i,(j+1)))+s2N*N(i,j));

end

end

C=CNew;

N=NNew;

display (C)

display(N) >br />

surfc (C)

refreshdata

end

<img src="http://2009.igem.org/wiki/images/4/42/ModellingJavaCoding.jpg" style="margin-left:-5px;margin-top:20px;">

<div id="abstarct" style="background-color:#e4f5ca;border:1px solid #595151;width:755px;height:4280px;margin-top:10px;margin-left:10px;font-size:11px;text-align:justify;padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:5px;">

import java.applet.*;

import java.awt.*;

import java.awt.event.*;

import java.util.Random;

import javax.swing.JOptionPane;

public class ChemotaxisModel extends Applet implements Runnable {

/**

*

*/

private static final long serialVersionUID = 1L;

int h,j,k1,score,x1,y1,xmove,ymove,cloud,xsize1,ysize1,mx,my,cx,cy, c1;

Thread t;

Graphics offscreen;

Image workspace;

Color vdkgreen;

int MineX, MineY;

String UserMineX, UserMineY;{

UserMineX=JOptionPane.showInputDialog( "Enter x-location for the landmine" );

UserMineY=JOptionPane.showInputDialog("Enter y-location for the landmine");

MineX=Integer.parseInt(UserMineX);

MineY=Integer.parseInt(UserMineY);	}

public ChemotaxisModel {}

public void init {

xsize1=getSize.width;

ysize1=getSize.height;

workspace=createImage(xsize1,ysize1);

offscreen=workspace.getGraphics;

x1=100;y1=100;xmove=0;ymove=0;

vdkgreen=new Color(0,102,0);

}

public void start {

if (t==null){

t=new Thread (this);

t.start;

}

}

public void run {}

public void stop {

if (t != null){

t.stop ;

t=null; }

}

public void paint (Graphics screen){

offscreen.setColor(vdkgreen);

offscreen.fillRect(0,0,xsize1,ysize1);

drawBacteria (offscreen);

drawLandmine (offscreen);

screen.drawImage(workspace,0,0,this);

}

public void update(Graphics screen){

paint(screen);

}

void drawBacteria (Graphics g){

int xsize, ysize, c1, c2, c3, indexx,indexy,xbact,ybact;

long c4,c5,c6,c7,c8;

double C[][],N[][],Bact[][],BactSurr[];

double NewC[][],NewN[][], NewBact[][];

double TimeStep, SpaceStep, Alpha,s, s2, k,x,maxC,max,index;

double TNTLoss,N2Prod,TotalTNT, TotalNitrite;

int MaxSteps=1000;

xsize=10;

ysize=10;

C=new double[xsize][ysize];

NewC=new double[xsize][ysize];

N=new double [xsize][ysize];

NewN=new double [xsize][ysize];

Bact=new double [xsize][ysize];

NewBact=new double [xsize][ysize];

BactSurr=new double[6];

TimeStep=0.01;

SpaceStep=1;

Alpha=0.2;

s=(Alpha*TimeStep/SpaceStep/SpaceStep);

s2=(1-4*s);

for (c1=0; c1<xsize;c1++) {

for (c2=0; c2<ysize; c2++) {

C[c1][c2]=0;

N[c1][c2]=0;

Bact [c1][c2]=0;

}

}

C[MineX][MineY]=1000;

N[MineX][MineY]=10;

k=0.06;

TNTLoss=1;

N2Prod=1/TNTLoss;

TotalTNT=0;

TotalNitrite=0;

x=0;

index=0;

indexx=0;

indexy=0;

max=0;

max=0;

Random generator = new Random;

Random generator2 = new Random;

xbact = generator.nextInt( xsize-5 )+2;

ybact = generator2.nextInt( ysize-5 )+2;

Bact[xbact][ybact]=1;

for (c3=0;c3<MaxSteps;c3++) {

for (c1=1; c1< (xsize-1); c1++) {

for (c2=1; c2< (ysize-1); c2++) {

NewC[c1][c2]=TNTLoss*(s*(C[c1-1][c2]+C[c1+1][c2]+C[c1][c2-1]+C[c1][c2+1])+s2*C[c1][c2]);

NewN[c1][c2]=N2Prod*(s*(N[c1-1][c2]+N[c1+1][c2]+N[c1][c2-1]+N[c1][c2+1])+s2*N[c1][c2]);

TotalTNT +=(C[c1][c2]);

TotalNitrite +=N[c1][c2];

}

}

System.out.println("TNT");

for (c1=1; c1< (xsize-1); c1++) {

for (c2=1; c2< (ysize-1); c2++) {

c4=Math.round(C[c1][c2]);

System.out.print(c4);

System.out.print("-");

C[c1][c2]=NewC[c1][c2];

}

System.out.println(".");

}

c6=Math.round(TotalTNT);

System.out.println("*");

System.out.println(c6);

System.out.println("*");

TotalTNT=0;

}

for (c3=94;c3<MaxSteps;c3++) {

System.out.println("Bacteria");

for (c1=1; c1< (xsize-1); c1++) {

for (c2=1; c2< (ysize-1); c2++) {

c8=Math.round(Bact[c1][c2]);

System.out.print(c8);

System.out.print("-");

Bact[c1][c2]=NewBact[c1][c2];

}

System.out.println(".");

}

BactSurr[1]=C[xbact][ybact];

BactSurr[2]=C[xbact-1][ybact];

BactSurr[3]=C[xbact+1][ybact];

BactSurr[4]=C[xbact][ybact-1];

BactSurr[5]=C[xbact][ybact+1];

System.out.println(BactSurr[1]);

System.out.println(BactSurr[2]);

System.out.println(BactSurr[3]);

System.out.println(BactSurr[4]);

System.out.println(BactSurr[5]);

max=0;

index=0;

for (c1=1; c1<6;c1++){

if (max<BactSurr[c1]){

max=BactSurr[c1];

index=c1;

System.out.println(index);

}				   }				    System.out.println(index);

if (index==1){

Bact[xbact][ybact]=1;

}

if (index==2){

Bact[xbact-1][ybact]=1;

xbact=xbact-1;

}

if (index==3){

Bact[xbact+1][ybact]=1;

xbact=xbact+1;

}

if (index==4){

Bact[xbact][ybact-1]=1;

ybact=ybact-1;

}

if (index==5){

Bact[xbact][ybact+1]=1;

ybact=ybact+1;

}

g.setColor(Color.yellow);

g.fillOval(xbact*20, ybact*20, 5, 5);

}

}

void drawLandmine (Graphics g){

g.setColor (Color.black);

g.fillOval(MineX*20,MineY*20, 10,10);

}

}

<img src="http://2009.igem.org/wiki/images/6/6a/ModellingReferences.jpg" style="margin-left:-5px;margin-top:20px;">

1Looger, L, Dwyer, M, Smith, J, Hellinga, H, “Computational design of receptor and sensor proteins with novel functions”, Nature, vol. 423, pp185-190.

2Dehghan, M, “Fully explicit finite-difference methods for two-dimensional diffusion with an integral condition”, Nonliner Analysis, vol.48, p637-650, 2002.

3B. Baez et al, “Detection of chemical signatures from TNT buried in sand at various ambient conditions: phase II” Detection and Remediation Technologies for Mines and Minelike Targets XI, SPIE International Society Optical Engineering, Orlando, FL, USA (2006) pp. 62171M..

4Valsaraj, K.T et al, “Diffusive transport of 2, 4, 6-trinitrotoluene (TNT) from contaminated soil to overlying water”, Journal of Hazardous Materials, vol.59, p1-12, 1998.

5Schramm, A et al, “Structure and Function of a Nitrifying Biofilm as Determined by In Situ Hybridization and the Use of Microelectrodes”, Applied and Environmental Microbiology, Vol.62, No.12 p4641-4647, Dec. 1996.

Edinburgh University iGEM Team 2009