Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hundreds of thousands of non-dots detected #15

Open
miller-me opened this issue Sep 15, 2022 · 7 comments
Open

Hundreds of thousands of non-dots detected #15

miller-me opened this issue Sep 15, 2022 · 7 comments

Comments

@miller-me
Copy link

Hi! I am having an issue where RS-FISH is detecting hundreds of thousands of dots in images where we would anticipate only a few thousand at most.

Some information about our images:
We have three sample groups, probing for 6 3-gene sets per sample group, with three replicates (for a total of 9 images per gene set / gene); each sample is also DAPI stained. The images were taken with a Zeiss LSM 880 with AiryScan processing. Each image is very large, usually 12-15 tiles with a 5-z stack for each tile, with the three color channels and one grayscale channel. The laser intensity and gain for the "cyan" channel on one gene set is not always the same for the "cyan" channel on a different gene set, and so on for the other channels except DAPI, which is always the same laser power and gain. After imaging, we perform AiryScan processing, tile stitching, and a maximal-intensity projection.

In FIJI, I split the channels for each image into its individual genes. I then use RS-FISH on a single gene, fine-tuning the parameters with a few images from that gene, and then use those parameters on the remaining images once they look acceptable. Given the variability in our expression levels and fluorophores, the parameters are different gene-by-gene.

However, we have come across a problem where the parameters I set work very well for most images for a gene, but then occasionally one or two images will have something like >200,000 dots detected. Visually we would expect only a few thousand at most, and indeed when we overlay the ROIs it appears that the majority of dots detected are what we would consider background fluorescence or appear to be nothing at all.

We are using RS-FISH with RANSAC; a standard support region radius (3), min. inlier ratio (0.1) and max error (1.5); and a spot intensity threshold of 10,000. Thus, the only parameters I change between genes are the sigma and threshold, which are typically between 0.80-1.00 and 0.0005-0.0015, respectively. The Gaussian refinement and background subtractions don't appear to fix this problem, and can cause other issues like runtime errors, so we don't use them.

We are trying to figure out if this is a matter of RS-FISH, or if there is something with our imaging that may need to be addressed. I am happy to provide more information or images.

@bellonet
Copy link
Member

bellonet commented Dec 12, 2022

Hi @miller-me,
Sorry for the late response. If still relevant, can you please provide a link with the following:

  1. Images with expected behavior.
  2. Images and unexpected behavior (too many found spots).
  3. For those images - the RS-FISH FIJI log (either from terminal or GUI). It should include your parameter values and the number of detected spots.

Best,
Ella

@miller-me
Copy link
Author

Hi Ella,

Glad to hear from you and apologies for the delay in my response as well. Here is a link to a OneDrive folder containing those items - let me know if you have trouble accessing it, my university can be finicky with file sharing.

Best,
Melissa

@LauraBreimann
Copy link
Contributor

Hi Melissa,

Thanks for sharing the images. Unfortunately, it seems that the link doesn't work. Is there a different way for you to share the images? Thank you!

Best,
Laura

@miller-me
Copy link
Author

Hi Laura,

I thought that might happen! Here I've attached the images as PNGs along with the other information. Let me know if you would prefer TIFs instead and we can find a way around this, I'd be happy to email.

Best,
Melissa

Expected_Results_C1
Expected_Results_PNG_Log.txt
Unexpected_Results_C1
Unexpected_Results_PNG_Log.txt

@LauraBreimann
Copy link
Contributor

Hi Melissa,

yes tiff would be best, so let's do email: laura.breimann at mdc-berlin.de

Thank you!

Laura

@LauraBreimann
Copy link
Contributor

Hi Melissa,
yes, this works; I got the images! I can see that if I use the settings in the log (SigmaDoG: 0.85, ThresholdDoG: 0.0015) that I get the same oversampling that you describe. If I use these settings, I get a very nice detection: SigmaDoG: 1.108, ThresholdDoG: 0.0040574153

Screen Shot 2023-01-05 at 12 46 35 PM

I think the reason might be that the intensities detected in the image are very different. The "expected result" image has a detected intensity range of: img min intensity=0.0, max intensity=22119.0, while the "unexpected result" image has an intensity range of: img min intensity=9999.0, max intensity=11021.0, so the threshold value you set treats the images differently. So one option would be to set the intensity range of the images rather than clicking "Compute min/max from image," but this will only work if the intensities of the spots are actually quite similar. I tried setting the intensity of the image (something like 0-15000), which worked ok, but I found more spots with the automatic intensity detection and the above-mentioned settings. Which would leave option two of the more manual setting of the parameters.
A workflow could be to detect spots in a batch mode with one set of parameters and then go through the detections and confirm them. Images where the detections don't look good get a second round of manual selection of parameters.
I hope this makes sense and maybe also helps?
Laura

@miller-me
Copy link
Author

Hi Laura,

Thanks again for taking a look at this, that's very helpful and we will be sure to try those options.

Out of curiosity, one final question: when you manually set the intensity range of the image, do you know how this is impacting the spot detection? In other words, for this example, because the max intensity of the "unexpected" image is below the 15000 max manually set, is this somehow changing what the thresholding allows as a "real" signal in relation to the max intensity? If I am misunderstanding please let me know.

Best,
Melissa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants