TITLE: EASI-FISH Spot Counting in Drosophila Brain Using RS-FISH
AUTHORS: Claire Managan, Gudrun Ihrke

[DESCRIPTION]
This protocol describes how to utilize the Radial Symmetry-FISH (RS-FISH) software for fluorescent spot detection and counting (Bahry, E., Breimann, L., Zouinkhi, M.et al., 2022) to analyze images of the adult Drosophila brain labeled by Expansion-Assisted Iterative Fluorescence In Situ Hybridization (EASI-FISH) (Wang, Y., Eddison, M., Fleishman, G. et al., 2021). In expansion microscopy, tissues are embedded and expanded isotropically in a swellable hydrogel to achieve a higher spatial resolution (Chen, F., Tillberg, P.W. & Boyden, E.S., 2015). EASI-FISH combines this method with RNA fluorescence in situ hybridization, utilizing the hybridization chain reaction (HCR). In images taken by light sheet or confocal microscopy, individual transcripts are detected as bright spots. These spots are sufficiently separated from each other after 2x or 3x expansion of the brains to perform spot counting, unless the gene is question is too highly expressed. To use this protocol, RS-FISH should be installed as a Fiji plugin according to the instructions detailed on the RS-FISH GitHub repository. The cell body masks were produced in Amira using the techniques described in the "Using Amira to generate cell body masks in fluorescent light sheet microscopy images of EASI-FISH samples" protocol.

[STEPS]
SECTION: Image Cropping and Channel Selection
2. Isolate and edit the channels with RNA expression that will be used for spot counting.
SECTION: Calculate the Anisotropy Coefficient
3. In order to accurately detect 3D locations, it is important that the spots being counted are relatively spherical. The anisotropy coefficient is the factor by which the image needs to be adjusted to achieve more spherical spots for the RS-FISH process.
SECTION: Run RS-FISH
4. Use RS-FISH to determine the total number of individual spots of RNA expression in the image.
SECTION: Mask Filtering
7. The mask filtering process narrows down the total number of spots to only those that are present within the boundaries of the mask.
SECTION: Checking Results in Big Data Viewer
8. Big Data Viewer can be used to visualize the spots of RNA expression detected within the mask by highlighting them in the original channel image.
SECTION: Image Cropping and Channel Selection
1.1. Open the “shrink 2” mask, the “shrink 5” mask, and the original CZI image file by dragging them into Fiji
In the Bio-Formats Import Options window that appears when loading the CZI file, ensure that View stack with is set to “Hyperstack” and Stack order is set to “XYCZT” 
Click OK

 
SECTION: Image Cropping and Channel Selection
1. Crop all relevant images so that spot counting only occurs in the area around the cell body.
SECTION: Image Cropping and Channel Selection
1.2.  Run Plugins → Macros → Record… to bring up a Recorder window that lists every action done in Fiji
Use the macro recorder to take note of parameters for future reference
SECTION: Image Cropping and Channel Selection
1.3. Select the “shrink 2” mask window and run Image → Stacks → Z Project…
In the ZProjection window that appears, make sure that the Projection type is set to “Max Intensity” 
Save the resulting maximum intensity projection (MIP) as a TIF file by running File → Save As → Tiff…
SECTION: Image Cropping and Channel Selection
1.4. Click on the MIP window and select a rectangular area around the cell body using the Rectangle tool on the Fiji toolbar

 
Leave a margin around the cell body of approximately 50 pixels on all sides
Save the dimensions of the rectangle by copying them from the Recorder window
SECTION: Image Cropping and Channel Selection
1.5. Select the original “shrink 2” mask file window and run Edit → Selection → Restore Selection
Once the rectangle selection appears on the image run Image → Crop
Save the output as a TIF file and name it “...mask_cropped” 
     (e.g., “Gel1_Brain2_L_SS76094_2x_shrink2_mask_cropped.tif”)
Repeat the process for the “shrink 5” mask
SECTION: Image Cropping and Channel Selection
1.6. Select the original CZI image file and run Edit → Selection → Restore Selection
Once the rectangle selection appears on the image run Image → Crop
Save the output as a TIF file and name it “...image_cropped” 
     (e.g., “Gel1_Brain2_L_SS76094_2x_image_cropped.tif”)
Keep the cropped image file open and close all other windows
SECTION: Image Cropping and Channel Selection
2.1. Select the cropped image window and run Image → Color → Split Channels
Close the windows for channels 1 & 4
Save channels 2 & 3 as separate TIF files 
     (e.g., “C2-Gel1_Brain2_L_SS76094_2x.tif” and “C3-Gel1_Brain2_L_SS76094_2x.tif”)
SECTION: Image Cropping and Channel Selection
2.2. Select the channel 2 window and adjust the settings to make the spots more visible
Increase the size of the image by hitting the “up” arrow key (↑) on the keyboard until the spots in the image are an adequate size
Click the LUT button on the Fiji toolbar and select “Grays”

 
Run Process → Subtract Background… and set the Rolling ball radius to 50.0 pixels. Click OK to apply the background subtraction to the entire stack

 
If the brightness of the image is not optimal run Image → Adjust → Brightness/Contrast… → Reset (do NOT click Apply). Scroll through the entire stack to make sure that none of the signal is oversaturated
Save the processed image as a TIF file and name it “...bg_subtract” 
     (e.g., “C2-Gel1_Brain2_L_SS76094_2x_bg_subtract.tif”)
The “…bg_subtract” image is what will be used for all subsequent steps
SECTION: Calculate the Anisotropy Coefficient
3.1. Select the channel 2 window and run Plugins → RS-FISH → Tools → Calculate Anisotropy Coefficient
In the Anisotropy window that appears, select the correct name from the Image dropdown list and make sure the Detection Mode is set to “Gauss Fit"
Click OK
SECTION: Calculate the Anisotropy Coefficient
3.2. Move the rectangle that appears in the image to a location where it either surrounds a cell body or where there are multiple isolated spots that can be counted
Copy the dimensions of the rectangle from the Recorder window and save them for later use
SECTION: Calculate the Anisotropy Coefficient
3.3. Spots that will be used to calculate the coefficient will be outlined in red in the image window. Adjust the following parameters in the Adjust difference-of-gaussian values window so that as many spots as possible are included, with particular attention paid to spots that are well isolated from the rest
Adjust the Sigma up or down to increase or decrease the size of the radius of the red outline circle
Adjust the Threshold up or down to increase or decrease the number of spots included
Click Done

 
 

SECTION: Calculate the Anisotropy Coefficient
3.4. When the calculation has finished, the anisotropy coefficient will appear in a Log window
The anisotropy coefficient should be close to 1.0 (unless the spots greatly deviate from something close to circular)

 

SECTION: Calculate the Anisotropy Coefficient
3.5. To check the anisotropy coefficient, apply it to a resliced image
Select the channel 2 window and run Image → Stacks → Reslice [/]...
In the Reslice window that appears, make sure that Avoid interpolation is checked and click OK

 
Now select the resliced image and Run Image → Scale…
In the Scale window that appears, enter the calculated anisotropy coefficient as the Y Scale value and click OK

 
Compare the original reslice to the scaled reslice. Find a Z-section where spots in the original reslice appear either elongated or flattened and see if the same spots in the scaled reslice are more circular. The spots of RNA expression in the EASI-FISH images are usually already round, so the effect may be minimal
Close both reslice images
SECTION: Calculate the Anisotropy Coefficient
3.6. If the anisotropy coefficient looks correct, take note of the value by copying the “Anisotropy coefficient” line from the Log window 
SECTION: Run RS-FISH
4.1. Select the channel 2 window and run Plugins → RS-FISH → RS-FISH
In the Radial Symmetry (2d/3d) window that appears, select the correct name from the Image dropdown and make sure that the Mode set to “Interactive”
The Anisotropy coefficient line should show the coefficient that was just calculated (rounded to 4 decimal places)
In the Computation section, Robust fitting should be set to “RANSAC,” the boxes next to Compute min/max intensity from image and Use anisotropy coefficient for DoG should be checked, and Spot intensity should be set to “Linear Interpolation”
Under Visualization, the box next to Add detections to ROI-Manager should NOT be checked
Click OK

 
SECTION: Run RS-FISH
4.2. Detected spots will now be outlined with a red circle in the image window. A blue cross inside the circle indicates that the RANSAC algorithm used outlier removal to detect the spot
Click inside the rectangle in the image window to make sure that it is in the same position that was used to calculate the anisotropy coefficient
SECTION: Run RS-FISH
4.3. Another window called RANSAC preview will also appear, which displays the currently detected spots. The preview will change as the parameters are adjusted
SECTION: Run RS-FISH
4.4. Adjust the following parameters in the Adjust difference-of-gaussian values to include as many spots as possible that are not part of the noise or the background. Be sure to scroll through all Z-sections in the stack to ensure that the parameters provide the desired results for the entire image
As before, the Sigma value will determine the size of the area for detection. When setting this value, keep in mind that the red outline circles should be a bit larger than the actual spots
As before, the Threshold value will determine the limit for spot detection. If the image contains more noise or if there are “halos” around the spots that are also being detected, set this value higher to compensate (the normal range is anywhere from 0.00500 to 0.00800)

 

SECTION: Run RS-FISH
4.5. For this project, the parameters in the Adjust RANSAC values window are being left at their default values
The Support region radius (which selects the radius for each spot where gradients are used for radial symmetry) should be set to 3
The Inlier ratio (the ratio of the gradients that are part of the current spot) should be set to 0.10
The Max error (the maximum error allowed for fitting) should be set to 1.5000
Local background subtraction should be set to “No background subtraction”

 
SECTION: Run RS-FISH
4.6. Once the parameters have been set, take note of them before clicking Done in the Adjust RANSAC values window
Once the process has finished, the image window will show the selected spots in red and a new Intensity distribution histogram window will appear
Take a screenshot of the histogram window and save it as a PNG labeled “...original_c#” 
     (e.g., “SS76094_L_original_c2.PNG”)
SECTION: Run RS-FISH
4.7. Adjust the minimum intensity threshold by clicking at different points along the histogram
The histogram window can be expanded to make it easier to select a certain value
Scroll through the image stack as the threshold is adjusted to make sure only true spots are being detected
Carefully check areas that either have a large amount of noise or that have “halos” around the spots to make sure they are not included
Consider not only the shape of the histogram and where the peak lies, but also the intensity value at which the peak occurs. If the peak of the histogram is at a low intensity (≤ 200) be sure to set the threshold point beyond it

 

SECTION: Run RS-FISH
4.8. If the parameters need to be adjusted based on the detections seen in the image window, close the Intensity distribution window and run Plugins → RS-FISH → RS-FISH again until the optimal settings are reached
Keep track of all parameter values as they are adjusted
Move the rectangle in the image window to the same position that was used to calculate the anisotropy coefficient
Overwrite the “original_c#” PNG with a new screenshot each time that RS-FISH process is repeated
SECTION: Run RS-FISH
4.9. Once the parameters have been finalized and the intensity threshold has been set, take another screenshot of the histogram window and save it as a PNG labeled “…final_c#” 
(e.g., “SS76094_L_final_c2.PNG”)
SECTION: Run RS-FISH
4.10. To complete the process, select the Intensity distribution window and click OK - press to proceed to final results
Copy the “Final #detections (before intensity check),” the “intensityThreshold,” and the “Spots found” lines from the Log window for future reference
The histogram window will be replaced by a window called smFISH localizations that lists the coordinates of all detected spots. Run File → Save As from this window (not from the main Fiji toolbar) and edit the file name so it includes the cell body ID and the channel number. Be sure to manually change the file type to CSV (e.g., “SS76094_L_smFISH localizations_c2.csv”)
SECTION: Mask Filtering
7.1. Create a new folder named “Results” within the spot counting folder
SECTION: Mask Filtering
7.2. Run Plugins → RS-FISH → Tools → Mask Filtering
In the Pick files to include window that appears, drag the CSV file into the Inputs File/Folder line
Drag the cropped mask file into the Mask File line
Drag the “Results” folder into the Output Folder line (this will avoid possible overwrite of existing files)
The name of the selected CSV should appear at the bottom of the window in the selected files section. If it doesn’t, change the exclude files smaller than (KB) to “0”
Click OK
 
 
SECTION: Mask Filtering
7.3. A dialogue window will show the number of files filtered, and a new CSV file will be written to the selected output directory
Edit the name of the filtered CSV file to include the shrink size of the mask 
     (e.g., “SS76094_L_shrink2_smFISH localizations_c2_filtered.csv”)
SECTION: Mask Filtering
7.4. Move the filtered CSV out of the “Results” folder and place it in the parent spot counting folder. This will allow the “Results” folder to be used repeatedly
SECTION: Mask Filtering
7.5. Repeat the filtering process until the initial results for channels 2 & 3 have been filtered for both the “shrink 2” and the “shrink 5” masks
SECTION: Checking Results in Big Data Viewer
8.1. Open the “…bg_subtract” image for the desired channel in Fiji and run Plugins → RS-FISH → Tools → Show Detections (BigDataViewer)
SECTION: Checking Results in Big Data Viewer
8.2. A window called Display overlaid points with BDV should appear
For Options, select “Display a currently open image and load points from CSV” from the dropdown
Leave the Sigma (points) slider at 1.00
Click OK
SECTION: Run RS-FISH
5. Repeat the entire process for channel 3, starting from step 2.2 under “Image Cropping and Channel Selection.”
  
SECTION: Run RS-FISH
6. If there is more than one cell body in the image, the parameters for both the anisotropy coefficient calculation and for the RS-FISH process can be used as starting points for a new cell since the image acquisition settings should be relatively consistent.
SECTION: Checking Results in Big Data Viewer
8.4. Once the BigDataViewer window is open, hover over the right side of the window and click on the blue arrow that appears to view the sidebar
Under Sources, click on the image name above “detections”
Use the now active slider at the bottom of the Sources section to lower the maximum threshold by dragging the circle on the right side towards the left. The image should become visible when the maximum is lowered down to around 1000 or 3000

 
SECTION: Checking Results in Big Data Viewer
8.5. Scroll through the image to find the green spots that were detected within the mask and make sure they look correct
This method is helpful when determining if expression from neighboring cells has been included in the final spot count
SECTION: Checking Results in Big Data Viewer
8.3. In the Select open image and CSV(s) window, make sure the correct image name is displayed, and drag the filtered CSV file for the corresponding channel (at either “shrink 2” or “shrink 5”) into the Select CSV line