IGEM:IMPERIAL/2008/Prototype/Drylab/Validation

From OpenWetWare

(Difference between revisions)
Jump to: navigation, search
(Software Validation)
m (Microscope Video Characteristics)
Line 79: Line 79:
Our first video.The cells are out of focus.  
Our first video.The cells are out of focus.  
-
[[Image:Video1.tif|400px]]
+
[[Image:Video_1.gif|400px]]
Notice (see below) the presence of some noisy circular patterns. These patterns are found at fixed positions over all frames.  
Notice (see below) the presence of some noisy circular patterns. These patterns are found at fixed positions over all frames.  

Revision as of 13:18, 3 September 2008

Home The Project B.subtilis Chassis Wet Lab Dry Lab Notebook


Contents

Software Validation

In order to validate our choice of open-source tracking software, a synthetic video based on synthetic data was created. This video was then fed into the software for cell tracking, afterwhich data analysis to obtain bacteria motility characteristics was carried out. The data output was then compared with the synthetic data generated so as to ensure the effectiveness and integrity of the tracking software. The following figure describes our approach in validating the tracking software.

Generating Bacteria Characteristics

Bacteria light intensity or color, shape, size and orientation are being generated in a single m-file. A function leading to the generation of these parameters is then called by the main function which generates synthetic video.

Generating Bacteria Trajectory

Distributions of bacteria run velocity, run duration, tumbling angle and tumbling duration were generated using alternative models with arbitrary parameters assumed. Frame-by-frame coordinates are then returned to the main function, allowing the trajectory of bacteria to be plotted.

Generating Synthetic Video

A synthetic video of user defined number of bacteria was created using MATLAB. The function calls motility data and bacteria characteristic generating functions, and with these, it plots the trajectory of "motile" bacteria. The background image on which the video is generated also changes with time, introducing an element of noise.

Tracking Software

The tracking software used will receive the generated synthetic video as an input, and commence cell tracking on a frame-by-frame basis. Bacteria trajectory will then be produced as the data output.

Data Analysis

Bacteria motility characteristics such as run velocity, run duration, tumbling angle and tumbling duration will be generated by using algorithms applied to the trajectory data produced by the tracking software.

Data Output and Validation

Validating the software involves comparing the trajectory produced by the tracking software with the synthetic trajectory data generated. Algorithms which act on coordinate data to produce motility characteristics will also be verified by comparing the distributions of bacteria run velocity, run duration, tumbling angle and tumbling duration.

--SxE00 09:31, 27 August 2008 (EDT) Explain what the various phases of the validation imply Shouldn't this picture be at the top of the page????

How does Spot Tracker work ?

Spot Tracker was written specifically for the tracking of fluorescent markers in time lapse microscopy. We intend to use it to track swimming Bacillus Subtilis cells filmed using a wiedfield microscope. The software’s algorithm is optimised to track a single particle over a sequence of noisy images. The software performs both the detecting and tracking of the cell simultaneously. The method is inspired from techniques developed in contours extractions from very noisy ultra sound images. It is has been demonstrated to be very reliable, as it relies on all the frames in the image stack. However, it can only track one particle at a time. Should the images contain more than one particle, than these should be sufficiently distant from each other, so that they can each be individually tracked accurately.


The tracking algorithm is actually implemented in three steps:


  • First, a sequence alignment algorithm is executed so as to compensate for the movement of the structures under investigation. Basically, it is looking for a reference structure in all the images, and use it to determine all other structures. It can even accommodate for changing shape as long as their curve are within some parametric family (e.g. circle, ellipse, or parametric snake).


  • Secondly, the images are filtered so that the background noise is attenuated and the particles of interest are enhanced. The particles of interest should have Gaussian distributed intensities, as it is generally the case for fluorescent markers. More detail on the working of that filter can be found in the linked paper.


  • Finally, once the images have been aligned and filtered, the actual tracking algorithm is executed. Note, that it can only track one particle at a time, having a limited displacement frame by frame. It will favor positions where the intensity is bright, or where the response to the spot-enhancing filter is strong. Because of this, it might give incorrect results if two particles come too close to each other.


  • To account for the fact that the particle might be dim or even disappear in some parts of the sequence, it assumes the most probable position of the particle from the rest of the known positions. Additionally, the user can manually input nodes at the desired positions. The tracking algorithm recomputes the trajectory only on the segments adjacent to the new nodes so as it improve the speed of the process.


--SxE00 09:36, 27 August 2008 (EDT)General Remark: it is a very dense paragraph - images would help to understand


--SxE00 09:41, 27 August 2008 (EDT) I guess all sections below will be significantly changed and oved so I am not commenting on them

Microscope Experimental Setup

Synthetic Video Characteristics

All the videos were generated using Matlab. All the positions of the cells for each frame are know.

  • Synthetic Video 1

This video consists of a simple ellipse moving about a noisy background

Image:Video_synth1.tif

Microscope Video Characteristics

From our experience on the microscope, we observe the following:

Bacteria are rod shaped. As the bacteria transverse across the plate, it may change shape and orientation. Due to tumbling in the z-direction, bacteria may go in and out of focus. This leads to change in light intensity. Background noise is also present. We also observe a few static noisy spots over all images ( might be due to dust particles ???)

  • Video 1

Our first video.The cells are out of focus.

Notice (see below) the presence of some noisy circular patterns. These patterns are found at fixed positions over all frames.

Image:Noise1.tif

Intensity properties for the background, cells and noisy circular patterns can be found below. As well as shape characteristics for the cells.

Background Cells Circular Patterns

  • Video 2

This video was recorded with higher contrast and with a better focus than for Video1. The video was shot at 12 fps for a duration of 1 min. The cells and their wall can clearly be seen over all frames. Note that the inside of the wall is darker than the cell membrane.

Notice (see below) the presence of some noisy circular patterns. These patterns are found at fixed positions over all frames.

Image:Noise2r.tiff

Intensity properties for the background, cells and noisy circular patterns can be found below. As well as shape characteristics for the cells.

Background Cells Circular Patterns

--SxE00 09:37, 27 August 2008 (EDT)Shouldn't this section be at the start of the page since it backs your choice of synthetic data?????

Behaviour of the tracking software with real data

  • Analysis of Video1

The Spot Tracker software plug-in behaves as expected. It automatically detects the most likely candidate to be a particle. That is the particle having a Gaussian like intensity distribution with the highest peak. Although the video contains more than one likely candidate, the particle having the greatest intensity is selected. It is then tracked over all frames. In this video, the cells or the static circular patterns are suitable candidates. The cells having a greater intensity than the noisy circular patterns, they end up being selected by the software as the particles to be tracked. Only one cell is tracked, i.e. the one with the higher intensity. Note that when the tracked cell comes close to other cells, the software fails to determine its correct track. Similarly when the cell disappears out of the focal plane, the tracking fails.

Although the tracking seems quite satisfactory, the images being of poor quality, the generated trajectories will be very unreliable.

  • Analysis of Video2


Again the tracking software behaves as expected. Despite the video being of greater quality than video1, the software fails to detect and track any of the cells. Instead it spots and tracks the static noisy spots that cover all of the images. It track these because they are very bright spot having a Gaussian like distribution. We must get ride of these spots. However, if we manage to do so, the software would be able to track a point from the cell's membrane, as the membrane is brighter than the inside of the cell. Then again the software won't be tracking the same spot over all the frames, it will always be tracking the brightest point amongst all the pixels of the membrane. There will always be an inherent error in the cell's position, as the intensity distribution of the cell's membrane will vary over the frames. Even, if say the inside of the cell was brighter than the cell's wall, the intensity distribution of the inside of the cell would still vary over all frames, reciprocally causing incorrect variations in the cell's position.


Without editing the images, there is no way that Spot Tracker can track the cells. We applied a threshold on the images so that only the cells appear in white over a black background. We obtain a binary image, with cells appearing in white and the background being black (see image on left). The static circular patterns no longer appear on the binary images. However, Spot Tracker cannot track the cells in these image settings. Gaussian noise of a given standard deviation was added to the binary image (see image in middle). In the unprocessed images the noise characteristics of the cells and the background were different, however in the processed images the same Gaussian noise is applied to the cells and the background. Using the Spot Enhancing filter in the Spot Tracker software we obtain a more suitable image sequence for the Spot Tracker plug-in (see image on right hand side). The images being noisy, the tracking software is able to peak up and track the cells. However, there is still an inherent off-set in the position of the cell, because of how the tracking software works, i.e. tracking the brightest spot frame by frame.


What we need to know is how much precision do we gain or loose by increasing or decreasing the noise ? How big is the variation in the trajectory generated by Spot Tracker and the real trajectory. Using the synthetic data we've generated, we could track the cells over simple paths using Spot Tracker and track them manually over a few frames (the manual tracking would be our reference tracking). We could then compare the results, a use them as the basis for determining the inherent off-set in the cell's position when Spot Tracker is tracking the real cells.

Alternatively, we could tag the cells with fluorescent markers. This might resolve the issue of the spread in intensity of the cell.

Which ever method we use, we would still have to deal with the frequent problem of the tracking going wrong when the tracked cell is too close to other cells. This can be remediated manually by inputting the cell's position at the frames where the software fails to track the cell.

  • Conclusion

In conclusion, Spot Tracker will definitely not give us the accurate results we are hopping to get. We can however do our best to obtain the most accurate positions by estimating the errors that the software will make.

It might be a good idea to opt for an alternative tracking software. One having better segmentation algorithm than Spot Tracker. A suitable candidate would be Volocity Quantitation ( not open source, not free).

Behaviour of the tracking software with synthetic data

  • Analysis of Synthetic Video1

The ellipse representing a cell in this very idealised video was tracked using Spot Tracker, Manual Tracking and Particle Tracker plug-ins. The detailed analysis of the tracking outcome can be found in the following file:

Bacteria Motility

Bacteria motility comprises of periods of "runs", referring to movement in a single direction at relatively constant velocity, and periods of "tumbles", where the bacteria changes its orientation and thus direction. During runs, the flagellum of the bacteria are bundled together and turn in an anti-clockwise direction, propelling the bacteria forward. Tumbling is caused when one or more flagellar flare up and break away from the bundle, turning in a clockwise direction. Runs usually last for ~1 seconds, while tumbles last for ~0.1 seconds.

The assumptions are used in generating synthetic motility data:

  • Run velocity is Maxwell distributed.
  • Tumbling Angle is Von Mises distributed.
  • Run Duration and Tumbling Duration are Exponentially Distributed with parameter lamda of 1.0 and 10.0 respectively.

Synthetic Video

A synthetic video will be generated with MATLAB. A function is written to create the video. This function will call upon two other functions which return motility data and bacteria characteristic data which are used as inputs for the bacteria to be drawn on a plot.


    [[IGEM:IMPERIAL/2008/New/{{{1}}}|< Previous]]
    [[IGEM:IMPERIAL/2008/New/{{{2}}}|Next >]]

</td></tr></table>
Personal tools