-
Notifications
You must be signed in to change notification settings - Fork 3
smFISH decoding #82
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
base: main
Are you sure you want to change the base?
smFISH decoding #82
Conversation
Do you want to expose the smFISH magnitude thresholds as parameters so that you can set them programatically? |
Once you have run this on your smFISH data, let me know and we can look at results. If that all looks good, I'll ask Max to simulate some smFISH data using his code and I can write new tests to cover the smFISH case. Eventually I'll put the tests so they run on github, but I've had some issues with the GPU in that context so I run them locally before we add features. |
I tested it on our smFISH data and the code itself is working, but we'll need to adjust the thresholds. With a magnitude threshold of [0.75,1.75] and a distance threshold of 1.0, we got very few decoded spots (see screenshot). Napari shows most values for magnitude fall between -1 and 0. I'm not sure how we got negative values, as I thought we took the absolute value of the L2 norm. |
If the L2-norm is zero, then when we scale the normalized pixels by the L2-norm ( in and set any pixels where the normalized value is |
If the thresholds aren't working, the normalization may not be right. The math I worked out only works if the data is properly normalized between Hopefully viewing the magnitude and distance images, with only one round of your normalized smFISH data active, will help narrow down what is going on. |
…match to resolve an error
modified display_results method in PixelDecoder to display all bits in napari.
Context:
The decode_one_tile method in PixelDecoding opens multiple images in Napari - "pixels," "decoded," "magnitude," and "distance." The image in Napari labeled "pixels" represents the pre-decoding intensities of spots in 1 bit, whereas the "decoded" image that opens represents all bits, summarized using a grayscale gradient. (Black is zero, or bit 1. White is 15, or bit 16). I modified the display_results function in Pixel decoder to open up all 16 bits of pre-decoding spot intensities, so now you can toggle between the pre-decoded and decoded spots for all bits.