Protocol (C): Automated segmentation of the otic vesicle and image analysis
Désirée A. Schmitz, Tobias Wechsler, Hongwei Bran Li, Rolf Kümmerli, Bjoern Menze
Danio rerio
multispecies bacterial infections
image analysis
automated segmentation
Pseudomonas aeruginosa
Klebsiella pneumoniae
Acinetobacter baumannii
Abstract
This protocol details the automated segmentation of the otic vesicle and image analysis.
Attachments
Steps
Automated segmentation of the otic vesicle and image analysis
Organize your images in a folder with two subfolders:
- one for the brightfield images named ‘Images’,
- one for all fluorescence images named ‘Fluor’.
The image file names have to contain the slice number with a Z as a prefix and the channel number (0-based) with a C as a prefix (e.g., PositionName_Z00_C00.tif). For example, for measuring two different fluorophores and the brightfield image, we have three channels, C00 (e.g., brightfield), C01 (e.g., GFP), C02 (e.g., mCherry). We include an example script to convert Leica image files accordingly (sort_images_lif.py), which can be used as an example of how to organize all images automatically as described.
For the segmentation of the otic vesicle, run the segmentation.sh (segmentation.ps1 for Windows) script with the previously created directory as input (e.g. for Mac: in Terminal). Make sure the shell script is executable (e.g. for Mac: by typing
chmod +x segmentation.sh
``` in Terminal). The script will start a docker container and the segmentation model on the specified brightfield images.
In the same directory that contains your brightfield (Images) and fluorescence (Fluor) images, a directory named output_real_value is created that contains the segmentation masks.
Start FIJI and open the check_measure.py script.
Run the script and select the directory with your brightfield (Images) and fluorescence (Fluor) images and segmentation masks (output_real_value) as input.
FIJI will display the brightfield images and the corresponding segmentation. In the ROI Manager window untick the box “Show All” and select one of the ROIs in the list to only show the segmentation for a single ROI. Go through the ROI sequence and delete inaccurate segmentations.
Complete the manual review of the segmentations by pressing OK.
The script creates six files:
an image with an overlay of the strain partitioning based on fluorescence (e.g. Sample1_overlay.tif),
a text file containing the log to check what has been done up until here (e.g. Sample1_log.txt)
a zip file with the ROIs (Sample1_rois.zip)
a table with fluorescence values within the whole otic vesicle (mean and integrated density for both GFP and mCherry; e.g. Sample1 ov_data.csv)
A table with the size of the area occupied by tagged strains (e.g. Sample1_strain_count.csv) → e.g. needed to calculate co-localization
A table with the fluorescence values of individual pixels within the otic vesicle (e.g. Sample1 pixel_data.csv).
Use the accompanying R-script to visualize the size of the area occupied by each tagged bacterial species and the overlap between the two species to quantify their co-localization (script: co_localization.R).
Check whether the fluorescence images in FIJI correspond to the values in R by dropping the Fluor folder into FIJI and comparing it to the R plot.