-
Notifications
You must be signed in to change notification settings - Fork 78
rasterize_bins() can now produce a labels element
#811
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
rasterize_bins() can now produce a labels element
#811
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #811 +/- ##
==========================================
- Coverage 91.80% 91.79% -0.01%
==========================================
Files 45 45
Lines 7064 7118 +54
==========================================
+ Hits 6485 6534 +49
- Misses 579 584 +5
🚀 New features to boost your workflow:
|
…ArneDefauw/spatialdata into visium_hd_rasterize_bins_labels
…arnedefauw/spatialdata into visium_hd_rasterize_bins_labels
|
I reviewed the PR and it's ready to merge! Thanks again @ArneDefauw. Finally, I added tests to cover the case in which instance_key is of string dtype. |
rasterize_bins() can now produce a labels element
PR related to scverse/spatialdata-io#211 and provides complimentary changes to
spatialdata.rasterize_bins.See unit test https://github.com/ArneDefauw/spatialdata/blob/5c3edee642bad1eaedbddf2097430315b964bb1a/tests/core/operations/test_rasterize_bins.py#L36
And more in particular https://github.com/ArneDefauw/spatialdata/blob/5c3edee642bad1eaedbddf2097430315b964bb1a/tests/core/operations/test_rasterize_bins.py#L80
Note that even if the table is annotated by a labels layer created by
spatialdata.rasterize_bins, we want to be able to run theraterize_binsfunction, but now withreturn_region_as_labels=True, see https://github.com/ArneDefauw/spatialdata/blob/5c3edee642bad1eaedbddf2097430315b964bb1a/tests/core/operations/test_rasterize_bins.py#L111.There is a use case for this, e.g. you have leiden cluster ID's, and you want a 'snappy' way to also visualize gene expression levels in napari-spatialdata, see example below: