Repository navigation
Conversation
… polygons Stripped XOA 1.3-1.x deposits (no cells.zarr.zip, boundary files without label_id) have hex cell_ids, so the raster labels could not be reconstructed. Decode the shifted-hex prefix to an integer label, used for both the raster and the table's cell_labels column. Boundaries with fewer than 4 coordinates (2-3 vertex polygons XOA occasionally emits) made shapely raise; drop them with a warning.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #431 +/- ##
==========================================
+ Coverage 66.60% 66.79% +0.18%
==========================================
Files 26 26
Lines 3345 3373 +28
==========================================
+ Hits 2228 2253 +25
- Misses 1117 1120 +3
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #427 (CSV-only / stripped Xenium bundles), found converting GEO Xenium deposits.
Hex cell_ids without
label_id. XOA 1.3-1.x boundary files carry hex cell_ids but nolabel_id; the mask values live only incells.zarr.zip, which stripped (e.g. GEO) deposits omit._get_labels_from_boundariesraised "Cannot build raster labels…". The shifted-hex prefix now decodes (via the existingprefix_suffix_uint32_from_cell_id_str) to an integer label, used for both the reconstructed raster and the table'scell_labelscolumn, so the instance key joins. Only applied when ids are decodable, from a single dataset suffix, nonzero and unique; otherwise the previous error stands. The label need not equal the original XOA mask value (that's unrecoverable without the zarr).Degenerate boundaries. XOA occasionally emits 2-3 vertex boundaries (7/40,754 cells, 17/15,488 nuclei in one GEO deposit), and shapely raised "A linearring requires at least 4 coordinates". These are now dropped with a warning (skipped when
indices_mappingmust align 1:1 withoutlabel_id).Tests:
test_xenium_csv_only_hex_without_label_id(hex fixture withlabel_idstripped) andtest_xenium_degenerate_boundary_dropped. Verified on two real GEO deposits (GSE280376, GSE280069) that previously failed: both now read with cell/nucleus labels and boundaries.