Closed jimmymathews closed 1 year ago
I've added some handlers to squidpy to return None instead of throwing errors in more cases, but I'm conflicted about this resolution. The errors indicate that the parameters with which you're calling squidpy are bad in some way, e.g., the cluster vector you've provided only has a single unique value because, for example, no cell in the sample has the DAPI channel. These cases should probably be handled outside of the squidpy logic, and we would rather use errors that squidpy throws to track down these missing edge cases.
Yeah let's just check that the example that caused this particular error can be handled gracefully enough. So we should diagnose which edge case it is and handle it.
This exact example works fine now. Some null values are returned, no error is thrown.
Encountered the following triggered sometimes when computed the co-occurrence scores:
Clearly the return data type coming from Squidpy needs to be validated even more before this step of processing.
For this issue, add a few guards to prevent this, passing null or None if nothing can be done.
Also make sure that in all the Squidpy metrics, we are gracefully handling None values as valid responses.