-
Notifications
You must be signed in to change notification settings - Fork 68
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
decoding method in seqFISH #1485
Comments
Thank you for the bug report. We should make this more user friendly. What's happening is that with this spot finder, sometimes there is not a spot detected within the search radius in each round, but those are still stored in the IntensityTable. The For the time being, the following work-around should suffice. It will decode valid spots, and the features that don't meet the expectations will not decode. intensities = intensities.fillna(0)
decoded = exp.codebook.decode_per_round_max(intensities) |
Thanks for your reply. |
No, not yet. We have an open PR from @gapartel (#1482) that implements graph-based distance-aware decoding and provides a nice theoretical solution for this problem. We've also drafted work to implement this decoding in #1450 which @shanaxel42 is actively working on. I'd hesitate to give a tight ETA for these features, though. The spot finding refactor is a bit tricky. :-) #1311 chronicles the initial work to implement the SeqFISH spot finding and decoding, if you are interested. |
I'm going to tack on here since this is still open- I'm seeing some weird behavior with the per-round-max decoding. I start with a DataArray (because of the
I apply the
So both of these features map to the same codeword, However, if you go look at that codeword, you find that it looks like this:
which is nowhere near the "per round max" of the input Based on the documentation, I expect the above |
this is with
|
I noticed these behavior too. If all the channels of a given round have 0 intensity (that's the case with |
Thanks @berl @gapartel and @pdichiaro for surfacing this bug. We're going to tackle this next. |
1. When the entire row is nan, the decoder chokes. This is remedied by decoding on an array where the nan values are replaced with 0s. 2. When the entire row is of equal intensity, the `np.argmax` arbitrarily picks the first column as the winner. That erroneously decodes as ch=0 having the max intensity. This code detects that scenario, and rewrites the ch to an impossible value in that situation. Test plan: Wrote tests that failed with the existing code, applied fixes and verified that they now work. Fixes #1485
1. When the entire row is nan, the decoder chokes. This is remedied by decoding on an array where the nan values are replaced with 0s. 2. When the entire row is of equal intensity, the `np.argmax` arbitrarily picks the first column as the winner. That erroneously decodes as ch=0 having the max intensity. This code detects that scenario, and rewrites the ch to an impossible value in that situation. Test plan: Wrote tests that failed with the existing code, applied fixes and verified that they now work. Fixes #1485
after generation of intensityTable by LocalSearchBlobDetecor I use codebook.decode_per_round_max(intensities) to decode each spot. It does not work(error: all-Nan slice encountered).
The text was updated successfully, but these errors were encountered: