Bug when reading previously saved Xenium 2.0 data: cells without nuclei #657
LucaMarconato
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The issue
Xenium 2.0 data generated with the multimodal segmentation kit may identify cells without nuclei. For such cells, due to a missing validation in
ShapesModel
, the presence of cells without nuclei silently caused thecell_circles
shapes element to have cells with anan
value for the radius. This is now fixed and a code release is planned for the first week of August 2024. Therefore, any newly generated Xenium SpatialData will not be affected by this bug.Nevertheless, data that has already been converted to Zarr needs to be corrected, here is how you can do it.
The fix
The code above performs various checks, if some fail it should be quick to adjust it to your data. But feel free to comment below.
You can now inspect that the data was successfully adjusted.
The new cell circles should be larger than the previous ones because now they are (correctly) computed from the cells instead than from the nuclei (see here for an explanation scverse/spatialdata-io#123).
Also the two cells at the bottom are an example of cells for which no nuclei were detected and which resulted in circles with nan radius. Now these circles are correctly defined.
If you found this article helpful please put a "arrow up", so we can see how many users got affected. Thanks 😊
Beta Was this translation helpful? Give feedback.
All reactions