Team:NTNU Trondheim/Software/Quantitative Analysis Tool



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

Our software is available on the iGEM GitHub software repository!

The following files are required for this tutorial:

  1. MATLAB post processing script: post_processing.m.
  2. ImageJ macro: Interlab.ijm.
  3. Sample TIFF file: NTNU_Trondheim_Tutorial_Sample.tiff.

Preparing the data set files

  1. 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/.

  2. Run in a terminal

    ./bfconvert 150818\ Interlab\ Hyd2.lif %n.tiff

  3. 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)
    
  4. 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
    

  5. 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
    

  6. Running the batch processing script

  7. The script is named Interlab.ijm, and requires Fiji, which can be downloaded from http://fiji.sc/Downloads

  8. After starting up Fiji, the script can be run by dragging it and dropping to the main window as shown below.

  9. Then, clicking "Run" as shown below:

  10. A window will appear to invite the user to select the folder where the TIFF files are located as shown below:

  11. A new window appears to invite the user to select the directory where the processing is exported as shown below:

  12. 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:

  13. The script proceeds in segmenting the images into individual bacteria as illustrated here:

    The script can also be used as a bacteria cell counter.

  14. Finally, the results are displayed and saved into a CSV file, as shown below:

  15. Post-processing

  16. 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.