Team:NTNU Trondheim/Software/Quantitative Analysis Tool
Software
Quantitative Analysis Tool for Fluorescence Microscopy
We have developed a tool to analyze fluorescence individually for each bacterial cell, based on ImageJ and MATLAB. The tool takes a LIF microscopy image as an input and outputs the 2D data analysis (Biological, Individual) or 3D data analysis (Technical, Biological, Individual).
Videocast of the Quantitative Analysis Tool being used for analyzing the capsule fluorescence images in batch:
Downloads
Software repository
The following files are required for this tutorial:
- MATLAB post processing script:
post_processing.m
. - ImageJ macro:
Interlab.ijm
. - Sample TIFF file:
NTNU_Trondheim_Tutorial_Sample.tiff
.
Preparing the data set files
The microscope software (LAS AF, Leica) provides the data set in a LIF format. This file has about 1 GB size. While ImageJ can read LIF format, it does not manage the memory very well, and cannot upload the images simultaneously. One method to circumvent this issue is to convert the LIF file into many TIFF files. Each TIFF file contains one fluorescence image and one bright field image. Download the bfconvert utility to convert the Leica LIF files into a set of TIFF files. The utility is available from http://downloads.openmicroscopy.org/bio-formats/5.1.3/.
Run in a terminal
./bfconvert 150818\ Interlab\ Hyd2.lif %n.tiff
The resulting files have spaces in their name. This creates problems for ImageJ. The spaces can be converted into underscores with the following command:
$ for file in *.tiff; do mv "$file" `echo $file | tr ' ' '_'` ; done
Now the images are in a file format that can be easily handled with ImageJ.
ls *.tiff 150827_1A1.tiff 150827_2C1.tiff 150828_NCB1.tiff 150827_1A2.tiff 150827_2C2.tiff 150828_NCB2.tiff 150827_1A3.tiff 150827_2C3.tiff 150828_NCB3.tiff 150827_1B1.tiff 150827_3A1.tiff 150828_NCC1.tiff 150827_1B2.tiff 150827_3A2.tiff 150828_NCC2.tiff 150827_1B3.tiff 150827_3A3.tiff 150828_NCC3.tiff 150827_1C1.tiff 150827_3B1.tiff 150828_PCA1.tiff 150827_1C2.tiff 150827_3B2.tiff 150828_PCA2.tiff 150827_1C3.tiff 150827_3B3.tiff 150828_PCA3.tiff 150827_2A1.tiff 150827_3C1.tiff 150828_PCB1.tiff 150827_2A2.tiff 150827_3C2.tiff 150828_PCB2.tiff 150827_2A3.tiff 150827_3C3.tiff 150828_PCB3.tiff 150827_2B1.tiff 150828_NCA1.tiff 150828_PCC1.tiff 150827_2B2.tiff 150828_NCA2.tiff 150828_PCC2.tiff 150827_2B3.tiff 150828_NCA3.tiff 150828_PCC3.tiff
The script is named
Interlab.ijm
, and requires Fiji, which can be downloaded from http://fiji.sc/DownloadsAfter starting up Fiji, the script can be run by dragging it and dropping to the main window as shown below.
Then, clicking "Run" as shown below:
A window will appear to invite the user to select the folder where the TIFF files are located as shown below:
A new window appears to invite the user to select the directory where the processing is exported as shown below:
At this point, the script will run automatically, processing all the files in the specified directories without user input. Every TIFF file is composed of one brightfield image as shown here:
As well as a fluorescence image as follows:
The script proceeds in segmenting the images into individual bacteria as illustrated here:
The script can also be used as a bacteria cell counter.
Finally, the results are displayed and saved into a CSV file, as shown below:
The final CSV files are post-processed in MATLAB using
post_processing.m
. As an outcome of this tutorial, the InterLab Study has been submitted using quantitative analysis, and compares satisfactorily with the results obtained by flow cytometry, which can be seen in the Interlab page.
The following output will appear confirming the conversion of the images.
LIFReader initializing 150827 Interlab Hyd2 FINAL SET.lif Reading header Finding image offsets [Leica Image File Format] -> %n.tiff [Tagged Image File Format] Series 0: converted 1/2 planes (50%) Series 0: converted 2/2 planes (100%) Series 1: converted 2/2 planes (100%) Series 2: converted 2/2 planes (100%) Series 3: converted 2/2 planes (100%) Series 4: converted 2/2 planes (100%) Series 5: converted 2/2 planes (100%) Series 6: converted 2/2 planes (100%) Series 7: converted 2/2 planes (100%) Series 8: converted 2/2 planes (100%) Series 9: converted 2/2 planes (100%) Series 10: converted 2/2 planes (100%) Series 11: converted 2/2 planes (100%) Series 12: converted 2/2 planes (100%) Series 13: converted 2/2 planes (100%) Series 14: converted 2/2 planes (100%) Series 15: converted 2/2 planes (100%) Series 16: converted 2/2 planes (100%) Series 17: converted 2/2 planes (100%) Series 18: converted 2/2 planes (100%) Series 19: converted 2/2 planes (100%) Series 20: converted 2/2 planes (100%) Series 21: converted 2/2 planes (100%) Series 22: converted 2/2 planes (100%) Series 23: converted 2/2 planes (100%) Series 24: converted 2/2 planes (100%) Series 25: converted 2/2 planes (100%) Series 26: converted 2/2 planes (100%) Series 27: converted 2/2 planes (100%) Series 28: converted 2/2 planes (100%) Series 29: converted 2/2 planes (100%) Series 30: converted 2/2 planes (100%) Series 31: converted 2/2 planes (100%) Series 32: converted 2/2 planes (100%) Series 33: converted 2/2 planes (100%) Series 34: converted 2/2 planes (100%) Series 35: converted 2/2 planes (100%) Series 36: converted 2/2 planes (100%) Series 37: converted 2/2 planes (100%) Series 38: converted 2/2 planes (100%) Series 39: converted 2/2 planes (100%) Series 40: converted 2/2 planes (100%) Series 41: converted 2/2 planes (100%) Series 42: converted 2/2 planes (100%) Series 43: converted 2/2 planes (100%) Series 44: converted 2/2 planes (100%) [done] 45.92s elapsed (53.166668+376.83334ms per plane, 5533ms overhead)
Running the batch processing script
Post-processing