Description & Setup

To analyze our fluorescence microscopy images, we wrote a Python Jupyter notebook to facilitate a step-by-step image analysis pipeline, easily usable and customizable by users with limited coding expertise. Our goal was to analyze whether there were differences in fluorescence intensity under different conditions of our yeast cells. This pipeline is suited for multi-position, multi-channel, 2D data in the form of .nd2 data and can be downloaded from our GitHub. Furthermore, the code is written such that the folder of .nd2 microscopy files you want to analyze should be in the same folder as the Jupyter Notebook (Figure 1). When running the code, datasets will be created for subsequent image analysis steps and will be saved in that same folder.

Example sorting folder structure
Figure 1: Folder setup for the image analysis pipeline.

Cell Segmentation

Napari viewer and cellpose cellsegmentation Zoomed in segmentation example
Figure 2: (left), Example of the Napari viewer when running the first two sections of the Python pipeline. (right), Zoomed in frame with the segmentation contours outlined.

We first employed Cellpose to segment the cells from the brightfield microscopy images. The napari package allows the user to view the microscopy data and see if the segmentation was done correctly (Figure 2). Then, using skimage and basic Python modules, we calculated the fluorescence intensities within the cell regions from the fluorescence imaging channels. For the actual analysis, we summarized the fluorescence data in two ways, (1): Taking the total fluorescence in one cell and saving this as one separate value. (2): Saving every pixel fluorescence intensity value. In both cases, the background signal was calculated by taking the average fluorescence intensity of the pixels outside of the cell segmented regions and subsequently subtracted from the fluorescence data.

Visualization

Lastly, code for standard histograms to get a quick overview of the analysis is included. Here, it is possible to obtain histograms for single image condition, or compare two conditions (Figure 2).

Fluorescence intensities histogram example
Figure 3: Example total cell fluorescence intensity histograms. Left: Distribution of total cell red fluorescence intensities across multiple images in one microscopy datafile. Right: Comparison of total cell red fluorescence intensities between two microscopy datasets.

The Jupyter notebook contains short comments and concise instructions on parameters to change per user, such as data shape, segmentation parameters, histogram bins, etc. Furthermore, the comparison histogram section also uses the two-sample Kolmogorov-Smirnov test to provide an indication if the distriubtions are significantly different. With this, we hope this helps future iGEM teams in their fluorescence microscopy image analysis.

References

  • Stringer, C., Wang, T., Michaelos, M., & Pachitariu, M. (2021). Cellpose: a generalist algorithm for cellular segmentation. Nature methods, 18(1), 100-106. https://doi.org/10.1038/s41592-020-01018-x
  • napari contributors (2019). napari: a multi-dimensional image viewer for python. https://doi.org/10.5281/zenodo.3555620