FIJI dropdown menu for mFISH registration, segmentation, and quantification.
See our STAR Protocols publication for more.
AUTHOR: Kaitlin Sullivan (UBC) 2019-2025
TECHNICAL CONTACT: Margo Kapustina (UBC) 2025-Present
Click the image below to visit the mFISH Tutorial Hub, complete with comprehensive video tutorials!!!
- 🔧 INSTALLATION (for your local computer ONLY)
- 📂 FILE CONVENTIONS
- 🔬 IMAGE ANALYSIS
- 📊 DATA ANALYSIS
- 🐛 BUGS AND ISSUES
Click the image below to visit the mFISH Tutorial Hub, complete with comprehensive video tutorials!!!
A note to UBC TeamShare users:
Skip installation and use the TeamShare app DO NOT CHANGE OR ALTER THE TEAMSHARE APP!
This installation ensures each time you open up FIJI the menu is already installed. To update you will simply replace the existing code with the new version.
- Copy the raw contents of the latest version of the menu
- Open your FIJI app
- Plug-ins -> Macros -> Startup Macros
- Paste the code at the very bottom of the StartupMacros.txt
- Download LUT files and put in the FIJI lut folder (only if you want to use the HiPlex Overlay function)
- Close and restart your FIJI app
- You will now see the happy hippocampus icon in your FIJI!
This installation is useful for using the menu when on shared computers or read-only versions of FIJI. You will need to re-install the macro each time you open a new FIJI session.
- Save the latest version of the menu as a
.ijmfile - Open your FIJI app
- From the top menu select: Plug-ins -> Macros -> Install
- Select
FijiFISH-v5.ijmfrom wherever you have it saved - You will now see the happy hippocampus icon in your FIJI for the remainder of your session.
- HiPlex Overlay currently does not work on read-only versions of FIJI
Tips for smooth image analysis:
- Save ROI for first round on the microscope and re-load it for subsequent imaging rounds
- Ensure same zoom and resolution across rounds
- Be wary of high laser gain and intensity with low expressers
Files used in the FIJI app must be:
.tiffiles8-bitimages- Scaled in microns
- Named as such: R#_XXX_Genename (eg:
R1_405_DAPI)- #= the imaging round number
- XXX= the fluorophore excitation wavelength
- Files from all rounds must be saved in the same file folder
Example file folder for analysis...
Example output file folder structure after analysis is complete...
├── max
└── crop
└── regImages
├── composite DAPI overlays from registration
└── nonLinear
├── analyzedImages binarized images with ROIs
├── analyzedTables tables for RUHi
├── correctedImages images with background correction
└── overlay binarized images
This option takes the original images and registers them together based on their DAPI expression.
TO RUN:
- Drag-and-drop
R1_405_DAPI.tifinto FIJI and selectRegistration.
WHAT HAPPENS:
- Images will have maximum intensity projections taken and saved in a
maxfolder - Images will be croped to be the same size and saved in a
cropfolder- Automatic Cropping: puts a box in the upper left corner of each image (auto-choice for
Automated Run) - Manual Cropping: allows one to move the location of the box (be careful not to change the size of the box or move it form the limits however)
- Automatic Cropping: puts a box in the upper left corner of each image (auto-choice for
- Images will be linearly registered to eachother and saved in a
regImagesfolder - Images will be nonlinearly registered to eachother and saved in a
nonLinearfolder
This option takes the registered DAPI images from the nonLinear folder and segments them.
The DAPI from each round will be binarized then multiplied by eachother to remove cells from out-of-focus planes.
TO RUN:
- Drag-and-drop
R1_405_DAPI.tif_registered.tif_NL.tiffrom thenonLinearfolder into FIJI and selectSegmentation.
Run from the nonLinear folder...
├── max
└── crop
└── regImages
├── composite
└── nonLinear<- drag DAPI file from this folder***
**WHAT HAPPENS: **
-
Segmentation Type: select DAPI
- Segment based on DAPI signal from every round (to ensure registration in the z-axis)
- If there is a round where DAPI is not segmentable, uncheck it
-
Threshold Type: binarize the images for segmentation
- Automatic Thresholding
- Manual Thresholding: (select threshold manually with a slider if some DAPI rounds look strange via Automatic Thresholding)
-
Dialation Value: dilate ROIs to include the surrounding cytosol
- Suggested Value =
3 microns - For densly packed regions or nuclear expression only, change value to
0 microns
- Suggested Value =
-
Segmented image is saved in an
analyzedImagesfolder -
Segmented ROIs are saved in
analyzedTablesfolder -
IF USING EXTERNAL SEGMENTATION ALGORITHMS: for Baysor, Weka, or CellPose, place your Fiji-readable ROIs as
RoiSet.zipinanalyzedTablesand skip straight to Quantification.
This option takes individual gene expression images from the nonLinear folder and quantifies their expression into tables saved in the analyzedTables folder.
Run from the nonLinear folder...
├── max
└── crop
└── regImages
├── composite
└── nonLinear <- Drag first channel from this folder***
└── analyzedTables
TO RUN:
- Drag-and-drop your first gene image from the
nonLinearfolder into FIJI and selectQuantificationfrom the menu
WHAT HAPPENS:
Automatic thresholdingwill take the provided tail of the image's cumulative histogram via MaxEntropyManual thresholdingallows one to manually select the threshold for each image (useful in cases of autofluorescence)
OUTPUT:
- Quantified tables for
RUHianalysis inanalyzedTablesfolder` - Quantified image overlays for quality control in the
analyzedImagesfolder
This option allows one to manually threshold and quantify a single channel that may not look exactly right with automated thresholding.
Simply drag-and-drop your image from the nonLinear folder and run this option to manually threshold. This will overwrite the original quantified table in the analyzedTables folder.
This option creates a representative overlay image of your binarized gene expression images.
- Download the
.lutfiles from here - Place them in the FIJI
lutfolder - Re-start Fiji
TO RUN:
- Drag-and-drop your first gene image from the
overlayfolder into FIJI and selectHiPlex Overlayfrom the menu
WHAT HAPPENS:
- When running, images will be opaquely overlaid and the order and colours of the images will print out in the
Logbox.
OUTPUT:
- The image will save in the
overlayfolder asTestCOMP.png.
DRAWBACKS AND WORKAROUNDS In the future, there will be an plug-in option to change the colours and order of overlay images
- Right now this only allows up to 12 colours without any control over their order or assigned colour.
- To create a manual overlay image: pseudocolour according to prefered image colours and and use FIJI's
Image->Overlay...->Add Imagewith zero background checked!
It is suggested to only use AutoRun once you are comfortable with each individual analysis step
This option runs a full analysis from Registration -> Segmentation -> Quantification` without many pauses for options.
It will automatically: crop, segment, and quantify - there will be no option to choose.
TO RUN:
- simply drag and drop
R1_405_DAPI.tifinto FIJI and selectAutomated Run.
OUTPUT:
- All files and folders generated from
Registration,Segmentation,Quantification, andHiPlex Overlay
See the RUHi Package for how to: visualize, dimensionally reduce, and cluster the data generated from Quantification!
Ctrl + F for Troubleshoot and SPEED throughout the code to find points where you can optimize the code to your liking based on your data and imaging parameters. Please feel free to fork and update anything you feel could be enhanced!!!
Take a screenshot of the Log, the Debug Window, and any other relevant info or messages and open up an issue on our Cembrowski Lab GitHub - we will try and get to it as soon as we can 😺!