Difference between revisions of "Team:HZAU-China/Model"

Line 78: Line 78:
  
 
<video src="https://static.igem.org/mediawiki/2016/e/e2/T--HZAU-China--model-movie1.mp4" controls="controls"></video>
 
<video src="https://static.igem.org/mediawiki/2016/e/e2/T--HZAU-China--model-movie1.mp4" controls="controls"></video>
<p style="text-align:center">Movie2</p>
+
<p style="text-align:center">(Movie1)</p>
  
 
<h3>Multiply and motility dynamic model under the condition of restricted area</h3>
 
<h3>Multiply and motility dynamic model under the condition of restricted area</h3>
Line 87: Line 87:
  
 
<img src="https://static.igem.org/mediawiki/2016/c/c7/T--HZAU-China--model-pikaqiu.jpg"/>
 
<img src="https://static.igem.org/mediawiki/2016/c/c7/T--HZAU-China--model-pikaqiu.jpg"/>
<p style="text-align:center">Figure2</p>
+
<p style="text-align:center">(Figure2)</p>
 
<p>The black part in Figure2 means that the parameter \(k\) is normal value. That is \(k=k_normal=200~1000\mu m^2/s\). And the white part in Figure2 means that the parameter \(k\) is a small value which will be set to \(0\). But \(k\) is a matrix in \(S11\), and it can be solved out using Figure2. </p>
 
<p>The black part in Figure2 means that the parameter \(k\) is normal value. That is \(k=k_normal=200~1000\mu m^2/s\). And the white part in Figure2 means that the parameter \(k\) is a small value which will be set to \(0\). But \(k\) is a matrix in \(S11\), and it can be solved out using Figure2. </p>
 
<p style="text-align:center">$$k = img*k_normal/255$$</p>
 
<p style="text-align:center">$$k = img*k_normal/255$$</p>
Line 93: Line 93:
  
 
<video src="https://static.igem.org/mediawiki/2016/a/a2/T--HZAU-China--model-movie2.mp4" controls="controls"></video>
 
<video src="https://static.igem.org/mediawiki/2016/a/a2/T--HZAU-China--model-movie2.mp4" controls="controls"></video>
<p style="text-align:center">Movie2</p>
+
<p style="text-align:center">(Movie2)</p>
 
<p>From Movie2 we can see that a specific pattern is basically formed. But such a pattern formation is just equivalent to using mould. In this project, the pattern formation will be adjusted by computer in real time.</p>
 
<p>From Movie2 we can see that a specific pattern is basically formed. But such a pattern formation is just equivalent to using mould. In this project, the pattern formation will be adjusted by computer in real time.</p>
  
Line 110: Line 110:
 
<p>\(S14~S20\) is using opencv language. \(S14\) is transforming the matrix of colony to image. \(S15\) is image binaryzation. \(S16\) is finding the edge of image. \(S17\) is comparing the image above-mentioned with target image. \(S18\) is expansion the edge. \(S19\) is to present the overflow of the edge. \(S20\) will transform the result of \(S19\) to light message. Under the aforementioned initial conditions and boundary conditions, using python program to solve these equations. We can get it.</p>
 
<p>\(S14~S20\) is using opencv language. \(S14\) is transforming the matrix of colony to image. \(S15\) is image binaryzation. \(S16\) is finding the edge of image. \(S17\) is comparing the image above-mentioned with target image. \(S18\) is expansion the edge. \(S19\) is to present the overflow of the edge. \(S20\) will transform the result of \(S19\) to light message. Under the aforementioned initial conditions and boundary conditions, using python program to solve these equations. We can get it.</p>
 
<video src="https://static.igem.org/mediawiki/2016/e/e5/T--HZAU-China--model-movie3.mp4" controls="controls"></video>
 
<video src="https://static.igem.org/mediawiki/2016/e/e5/T--HZAU-China--model-movie3.mp4" controls="controls"></video>
<p style="text-align:center">Movie3</p>
+
<p style="text-align:center">(Movie3)</p>
  
  

Revision as of 13:38, 13 October 2016

The density distributions of bacteria in culture medium depends on two factors: motility and multiply of bacteria. For convenience, we will discuss these two factors separately.

motility dynamic model

In this project, we are trying to control the motility of bacteria by control the light matrix to make a colony with a specific shape. That the light matrix can affect the motility of bacteria is by influencing the expression of a protein related with motility and this protein is chez in this project. There are two forms of bacterial motility: tumbling and swimming. By tumbling, bacteria can change its swimming direction but not position. But by swimming, bacteria will forward to change its position. In fact, the rate of tumbling and swimming is different from bacteria to bacteria. At the micro level, the angle of tumbling is random, so we have no idea the movement direction of bacteria in any time. But in the view of macroscopic, the probability of all directions are equal. This property is similar to the diffusion of chemical. So, the swimming of bacteria can be seen as the diffusion of bacteria and the rate of diffusion is related to expression of chez.

Due to the multiply of bacteria makes little difference to the diffusion, so we don’t consider the multiply of bacteria provisionally.

(Figure1. Simple graph about diffusion of bacteria.)

In Figure 1, the simple square represent the area of bacterial in coordinate \((x,y)\) approximatively. The number of bacteria in this area is \(S(x,y,t)\) at time t. So, we have:

\(S(x,y,t)=\rho(x,y,t)*\Delta x\Delta y\)   \(S1\)

In equation \(S1\), \(\rho(x,y,t)\) represent density of bacteria in that area. \(\Delta x\) and \(\Delta y\) are the smallest increment in the \(x\) and \(y\) axis respectively. After taken the derivative of S1, we have:

\(\frac {\partial S(x,y,t)}{\partial t}=\frac {\partial\rho(x,y,t)*\Delta x\Delta y}{\partial t}\)   \(S2\)

The left part of \(S2\) represent the change rate of \(S(x,y,t)\). Under the premise of ignore the multiply of bacteria, the change rate depends on the rate of diffusion of bacteria. As shown in Figure 1, bacteria can move along the \(x\) axis and \(y\) axis. Limit that along the \(x\) and \(y\) axis is the positive. So:

\(\frac {\partial\rho (x,y,t)\Delta x\Delta y}{\partial t}=\phi_x(x,y,t)\Delta y- \phi_x(x+\Delta x,y,t)\Delta y+\phi_y(x,y,t)\Delta x-\phi_y(x,y+\Delta y,t)\Delta x\)   \(S3\)

In equation \(S3\), \(\phi_x\) and \(\phi_y\) represent the diffusion of bacteria in \(x\) and \(y\) axis respectively. Dividing \(\Delta x*\Delta y\) on both sides of \(S3\), and we can get:

\(\frac {\partial\rho(x,y,t)}{\partial t}=\frac {\phi_x(x,y,t)-\phi_x(x+\Delta x,y,t)}{\Delta x}+\frac {\phi_y(x,y,t)-\phi_y(x,y+\Delta y,t)}{\Delta y}\)   \(S4\)

In fact, \(S4\) is not a strict equation because \(\Delta x\) and \(\Delta y\) are not minimum value. But if let \(\Delta x\) and \(\Delta y\) take a limit to 0, \(S4\) will be an equation. So we have:

\(\frac {\partial\rho(x,y,t)}{\partial t}=\lim_{\Delta x\rightarrow 0}\frac {\phi_x(x,y,t)-\phi_x(x+\Delta x,y,t)}{\Delta x}+\lim_{\Delta x\rightarrow 0}\frac {\phi_y(x,y,t)-\phi_y(x,y+\Delta y,t)}{\Delta y}\)   \(S5\)

This equation is equivalent to:

\(\frac{\partial \rho}{\partial t}=-(\frac{\partial\phi_x}{\partial x}+\frac{\partial\phi_y}{\partial y})\)   \(S6\)

Here, we omit the coordinates. In this equation, \(\phi_x\) and \(\phi_y\) is difficult to be known by us. In fact, the rate of diffusion in \(x\) and \(y\) axis is same. From the assumption of Fourier Heat Equation:

1. If the temperature is constant within an area, there is no flow of heart.

2. If the temperature difference exists in adjacent area, heart will flow from areas high to low.

3. For the same kind of material, the bigger the temperature difference of two adjacent area, the faster flow between them.

Similarly, the three characters are suitable in bacteria colony:

1. If the density of bacteria is constant in an area, the move of bacteria will not lead to the change of density.

2. If the density difference exists in adjacent area, bacteria will swim from high density to low density area on the macro.

3. The bigger the density of two adjacent area, the faster diffusion between them.

So, the rate of diffusion is related with the difference of density:

\(\phi_x = -k\frac{\partial\rho}{\partial x}\)   \(S7\)

\(\phi_y = -k\frac{\partial\rho}{\partial y}\)   \(S8\)

Combining \(S7\) and \(S8\) with \(S6\), we can get:

\(\frac{\partial\rho}{\partial t} = k(\frac{\partial^2\rho}{\partial x^2}+\frac{\partial^2\rho}{\partial y^2})\)   \(S9\)

Multiply model

There is a famous model about the growth states of bacteria under the condition of limited space and nutrients called logistic growth model:

\(\frac{d\rho}{dt} = \gamma\rho(1-\frac{\rho}{\rho_s})\)   \(S10\)

In \(S10\), \(\rho\) represent the density of bacteria, and \(\gamma\) is growth rate constant, and \(\rho_s\) is saturated density.

Multiply and motility dynamic model of bacterial

Combining \(S9\) with \(S10\), we have:

\(\frac{\partial\rho}{\partial t}=k(\frac{\partial^2\rho}{\partial x^2}+\frac{\partial^2\rho}{\partial y^2})+\gamma\rho(1-\frac{\rho}{\rho_s})\)   \(S11\)

Reference Chenli liu et al, we have several parameter values,

$$k=200~1000\mu m^2/s$$ $$\gamma = 3.89e-4s^{-1}$$ $$\rho_s = 1500cell/\mu m^2$$

We will use finite element method to solve this PDE. Defining initial conditions are,

$$\rho=matrix.zeros(200,200)$$ $$\rho[100,100]=100$$

\(matrix.zeros(200, 200)\) means a zero matrix with \(200*200\), and the value of the index \([100, 100]\) of this matrix is \(100\). And the boundary conditions are,

$$\rho[0:,]=0$$ $$\rho[100:,0]=0$$ $$\rho[0,0:]=0$$ $$\rho[0,100:]=0$$

Writhing solve program with python and numpy to solve \(S11\), and the result was showed by mayavi, then we can get a video that can be seen in Movie1.

(Movie1)

Multiply and motility dynamic model under the condition of restricted area

In Movie1, we can see that colony will be a roundness eventually. If we add a restrictive condition about the area that bacteria can move, then what the colony will become? The way to add area limit is using light to control the motility of bacterias. So we will give green light in a specific area and the remainder will be given red light. And bacterias can move only in this green light area. In S11, Bacterial motility is mirrored by parameter k. So the model will be the following equations.

\(\frac{\partial\rho}{\partial t}=k(\frac{\partial^2\rho}{\partial x^2}+\frac{\partial^2\rho}{\partial y^2})+\gamma\rho(1-\frac{\rho}{\rho_s})\)   \(S11\)

\(k=f(x,y)\)   \(S12\)

\(k\) in \(S11\) means the diffusion rate of colony. \(f(x,y)\) is area limit function, and it’s an image matrix. In this project, we choose Pikachu who is a famous role in a hot AR game Pokimon Go. See this picture in Figure2.

(Figure2)

The black part in Figure2 means that the parameter \(k\) is normal value. That is \(k=k_normal=200~1000\mu m^2/s\). And the white part in Figure2 means that the parameter \(k\) is a small value which will be set to \(0\). But \(k\) is a matrix in \(S11\), and it can be solved out using Figure2.

$$k = img*k_normal/255$$

Under the aforementioned initial conditions and boundary conditions, using python program to solve these equations.

(Movie2)

From Movie2 we can see that a specific pattern is basically formed. But such a pattern formation is just equivalent to using mould. In this project, the pattern formation will be adjusted by computer in real time.

Multiply and motility dynamic model with dynamic regulation

Area limit is static regulation, but dynamic regulation is more suitable in our expectation. In dynamic regulation, we will compare the shape of colony with target picture in real time, and the result of comparing will be converted to light matrix to be irradiate on colony. So, the dynamic model will like the following context.

\(\frac{\partial\rho}{\partial t}=k(\frac{\partial^2\rho}{\partial x^2}+\frac{\partial^2\rho}{\partial y^2})+\gamma\rho(1-\frac{\rho}{\rho_s})\)   \(S11\)

\(k=f(t,\rho,img)\)   \(S13\)

Unlike \(S12\), there are two additional parameters in \(S13\). The two additional parameters are time \(t\) and density \(\rho\) respectively. That means parameter \(k\) will be change in the process of adjustment. And \(S13\) can be interpreted as,

\(\rho_1=\rho*\frac{255}{max(\rho)}\)   \(S14\)

\(\rho_2=threshold(\rho_1,THRES_BINARY_INV)\)   \(S15\)

\(edges=Canny(\rho_2)\)   \(S16\)

\(edges_2=bitwise_and(edges, mask=img)\)   \(S17\)

\(k_1=dilate(edges_2.kernel)\)   \(S18\)

\(k_2=bitwise_and(k_1,mask=img)\)   \(S19\)

\(k=k_2*\frac{k_normal}{255}\)   \(S20\)

\(S14~S20\) is using opencv language. \(S14\) is transforming the matrix of colony to image. \(S15\) is image binaryzation. \(S16\) is finding the edge of image. \(S17\) is comparing the image above-mentioned with target image. \(S18\) is expansion the edge. \(S19\) is to present the overflow of the edge. \(S20\) will transform the result of \(S19\) to light message. Under the aforementioned initial conditions and boundary conditions, using python program to solve these equations. We can get it.

(Movie3)