Team:TU Eindhoven/Modeling/Bacterial Cell Counter

From 2014.igem.org

(Difference between revisions)
 
(33 intermediate revisions not shown)
Line 8: Line 8:
<meta name="keywords" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="description" content="" />
-
        <meta name="viewport" content="width=device-width" />
+
<meta name="viewport" content="width=device-width, user-scalable=true;">  
<link href="https://2014.igem.org/Team:TU_Eindhoven/css/tooplate_style?action=raw&ctype=text/css" rel="stylesheet" type="text/css" charset="utf-8" />
<link href="https://2014.igem.org/Team:TU_Eindhoven/css/tooplate_style?action=raw&ctype=text/css" rel="stylesheet" type="text/css" charset="utf-8" />
<link href="https://2014.igem.org/Team:TU_Eindhoven/css/coda-slider?action=raw&ctype=text/css" rel="stylesheet" type="text/css" charset="utf-8" />
<link href="https://2014.igem.org/Team:TU_Eindhoven/css/coda-slider?action=raw&ctype=text/css" rel="stylesheet" type="text/css" charset="utf-8" />
Line 121: Line 121:
     <div id="tooplate_wrapper">
     <div id="tooplate_wrapper">
            
            
-
         <div id="contentwiki" style="height:2550px;">
+
         <div id="contentwiki" style="height:2100px;">
                
                
               <div class="panel" id="home">
               <div class="panel" id="home">
Line 128: Line 128:
<figure style="float:right;margin-right:0;">
<figure style="float:right;margin-right:0;">
<img id='Fig1' src="https://static.igem.org/mediawiki/2014/b/be/TU_Eindhoven_Modeling4.png" width="500" style="display: inline-block; border: 4px solid #00BAC6; padding: 4px; background: #222; margin-bottom: 10px;">
<img id='Fig1' src="https://static.igem.org/mediawiki/2014/b/be/TU_Eindhoven_Modeling4.png" width="500" style="display: inline-block; border: 4px solid #00BAC6; padding: 4px; background: #222; margin-bottom: 10px;">
-
<figcaption style="font-size:18px;color:#CCCCCC;">Figuur 1. Sample image used to show how the program works.</figcaption>
+
<figcaption style="font-size:18px;color:#CCCCCC;">Figure 1. The used sample image</figcaption>
</figure>
</figure>
                   <h2>Bacterial Cell Counter</h2>
                   <h2>Bacterial Cell Counter</h2>
-
                   <p>When photos of the microfluidics results are taken, the droplets and the cells in the droplets have to be counted. In order to have reliable results this has to be done on a large scale. To make it possible to analyses large numbers of photos a computer program has been made to do the counting. To give a better visualization of the process, a step by step analysis of an image (<a href="#Fig1">Figure 1</a>) is given below.</p>
+
                   <p>Once photos of the microfluidics results have been made, the droplets and the cells inside the droplets have to be counted. In order to have reliable results, this has to be done on a large scale. A computer program has been designed to perform the counting on large numbers of photos. To give a better visualization of the process, a step by step analysis of the image shown in <a href="#Fig1">Figure 1</a> is given below.</p>
-
<p>The program has the following steps: find and count the droplets, then find and count the cells in the droplets and finally create a histogram of the results (number of droplets with 0 cells, with 1 cell, with 2 et cetera). By adding up the histograms of multiple images you get a view of how the cells are divided over the droplets.</p>
+
<p>The program has the following steps: firstly, to find and count the droplets, then to find and count the cells inside of the droplets and finally to create a histogram of the results. By adding up the histograms of multiple images one get a impression of how the cells are divided over the droplets.</p>
<figure style="float:left;margin-left:0;">
<figure style="float:left;margin-left:0;">
<img id='Fig2' src="https://static.igem.org/mediawiki/2014/a/a1/TU_Eindhoven_Modeling5.png" width="500" style="display: inline-block; border: 4px solid #00BAC6; padding: 4px; background: #222; margin-bottom: 10px;">
<img id='Fig2' src="https://static.igem.org/mediawiki/2014/a/a1/TU_Eindhoven_Modeling5.png" width="500" style="display: inline-block; border: 4px solid #00BAC6; padding: 4px; background: #222; margin-bottom: 10px;">
-
<figcaption style="font-size:18px;color:#CCCCCC;">Figuur 2. </figcaption>
+
<figcaption style="font-size:18px;color:#CCCCCC;">Figure 2. The results after EdgeDetect</figcaption>
</figure>
</figure>
<h3>Droplet Detection</h3>
<h3>Droplet Detection</h3>
-
<p>To detect the cells <i>EdgeDetect</i> (a function of Mathematica using gradient methods) is used followed by a dilation to make the edges clearer.</p>
+
<p>To detect the cells <i>EdgeDetect</i>, a function of Mathematica using gradient methods, is used. It is then followed by a dilation in order to make the edges clearer. The results of these actions can be seen in <a href="#Fig2">Figure 2</a>.</p>
-
<p>This results in clusters of pixels, all the pixels that are connected with only black pixels. The program then looks for the clusters bigger than 2000 pixels and smaller than 6000 pixels (<a href="#Fig2">Figure 2.</a>).</p>
+
<p>This results in the clustering of black pixels. The program then looks for the clusters bigger than 2000 pixels and smaller than 6000 pixels. In <a href="#Fig3">Figure 3</a>, these clusters are visualized with blue circles.</p>
-
<h3>Parameters of Droplets Detection</h3>
+
<h3>Parameters for Droplets Detection</h3>
-
<p>The parameters of this function are chosen so they have a very low false positive, because a false positive means a non-existing droplet and thus false data.  A false negative only lowers the sample size, which can be increased by analyzing more images.</p>
+
<p>The parameters of this function are chosen in a way that prioritizes decrease in false positives over the decrease in false negatives. This is because a false positive means a non-existing droplet and thus false data, while false negative only lowers the sample size, which can be increased by analyzing more images.</p>
<figure style="float:right;margin-right:0;">
<figure style="float:right;margin-right:0;">
<img id='Fig3' src="https://static.igem.org/mediawiki/2014/a/aa/TU_Eindhoven_Modeling6.png" width="500" style="display: inline-block; border: 4px solid #00BAC6; padding: 4px; background: #222; margin-bottom: 10px;">
<img id='Fig3' src="https://static.igem.org/mediawiki/2014/a/aa/TU_Eindhoven_Modeling6.png" width="500" style="display: inline-block; border: 4px solid #00BAC6; padding: 4px; background: #222; margin-bottom: 10px;">
-
<figcaption style="font-size:18px;color:#CCCCCC;">Figuur 3. </figcaption>
+
<figcaption style="font-size:18px;color:#CCCCCC;">Figure 3. The results of clustering shown as blue circles, layered onto the original image </figcaption>
</figure>
</figure>
<h3>Bacterial Cell Detection</h3>
<h3>Bacterial Cell Detection</h3>
-
<p>The program is now at the point where it has to count the number of cells in the droplets. Using the droplets from the edgedetect picture, erosion with value 1 is performed. This makes sure the cells connected to the borders of the droplet are loose, the program deletes the border components so it only finds cells. The program uses <i>EnclosingComponentCount</i> instead of count now because a lot of cells became empty circles to get the results (<a href="#Fig3">Figure 3.</a>).
+
<p>The program is currently at the point where the next step is to count the number of cells inside the droplets. Onto the clusters from <a href="#Fig2">Figure 2</a>, an <i>Erosion</i> function with value 1 is performed. This makes sure that cells connected to the borders of the droplet are disconnected from this border. The program deletes border components, so that it only finds cells that are not connected to the outside of the droplet. This cancels out outside noise. The program uses <i>EnclosingComponentCount</i> instead of <i>count</i> to get the results, because a lot of cells became empty circles.
<br><br>
<br><br>
-
The results for this image are 9 false positives and 11 false negatives on a total of 93 cell in 126 droplets. Because some droplets had multiple false positives or false negatives the next step to improve this number is selecting to droplets better.
+
The corresponding output of the program from the sample image shown in <a href="#Fig1">Figure 1</a> can be found in <a href="#Fig4">Figure 4</a>. The analysis of the sample image included 9 false positives and 11 false negatives on a total of 93 cell in 126 droplets. Some droplets had multiple false positives or false negatives. In the future, droplet selection has to be optimized in order to increase accuracy of the program.<br>
 +
<a href="https://static.igem.org/mediawiki/2014/6/6b/TU_Eindhoven_Bacterial_Cell_Detection.zip">Click here to download the code</a>
</p>
</p>
-
<h4>Bibliography</h4>
+
<figure style="float:left;margin-left:0;">
 +
<img id='Fig4' src="https://static.igem.org/mediawiki/2014/8/87/TU_Eindhoven_Modeling_Histogram.jpg" width="500" style="display: inline-block; border: 4px solid #00BAC6; padding: 4px; background: #222; margin-bottom: 10px;">
 +
<figcaption style="font-size:18px;color:#CCCCCC;">Figure 4. The output of the program is a histogram showing how many droplets contained a certain number of cells</figcaption>
 +
</figure>
</div>
</div>

Latest revision as of 01:20, 18 October 2014

iGEM Team TU Eindhoven 2014

iGEM Team TU Eindhoven 2014

Figure 1. The used sample image

Bacterial Cell Counter

Once photos of the microfluidics results have been made, the droplets and the cells inside the droplets have to be counted. In order to have reliable results, this has to be done on a large scale. A computer program has been designed to perform the counting on large numbers of photos. To give a better visualization of the process, a step by step analysis of the image shown in Figure 1 is given below.

The program has the following steps: firstly, to find and count the droplets, then to find and count the cells inside of the droplets and finally to create a histogram of the results. By adding up the histograms of multiple images one get a impression of how the cells are divided over the droplets.

Figure 2. The results after EdgeDetect

Droplet Detection

To detect the cells EdgeDetect, a function of Mathematica using gradient methods, is used. It is then followed by a dilation in order to make the edges clearer. The results of these actions can be seen in Figure 2.

This results in the clustering of black pixels. The program then looks for the clusters bigger than 2000 pixels and smaller than 6000 pixels. In Figure 3, these clusters are visualized with blue circles.

Parameters for Droplets Detection

The parameters of this function are chosen in a way that prioritizes decrease in false positives over the decrease in false negatives. This is because a false positive means a non-existing droplet and thus false data, while false negative only lowers the sample size, which can be increased by analyzing more images.

Figure 3. The results of clustering shown as blue circles, layered onto the original image

Bacterial Cell Detection

The program is currently at the point where the next step is to count the number of cells inside the droplets. Onto the clusters from Figure 2, an Erosion function with value 1 is performed. This makes sure that cells connected to the borders of the droplet are disconnected from this border. The program deletes border components, so that it only finds cells that are not connected to the outside of the droplet. This cancels out outside noise. The program uses EnclosingComponentCount instead of count to get the results, because a lot of cells became empty circles.

The corresponding output of the program from the sample image shown in Figure 1 can be found in Figure 4. The analysis of the sample image included 9 false positives and 11 false negatives on a total of 93 cell in 126 droplets. Some droplets had multiple false positives or false negatives. In the future, droplet selection has to be optimized in order to increase accuracy of the program.
Click here to download the code

Figure 4. The output of the program is a histogram showing how many droplets contained a certain number of cells
iGEM Team TU Eindhoven 2014