scverse / scverse/spatialdata-io
`xenium` fails on imported segmentation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 103
- Forks
- 65
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 3
Description
The xenium function assumes there are two masks corresponding to nuclear and cell boundaries, which is true of xenium segmentation, but this not necessarily true when 3rd party segmentation is imported using the xeniumranger import-segmentation tool.
Issue is here: https://github.com/scverse/spatialdata-io/blob/58b2f5d73420d4a082f1953c0cde142907dcbaa0/src/spatialdata_io/readers/xenium.py#L232
If not detecting this case automatically, there should be at least a function argument to point it to the correct mask index.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/spatialdata_io/readers/xenium.py around line 232 and inspect how the xenium reader selects segmentation masks. Reproduce the failure with segmentation imported through xeniumranger import-segmentation, then determine whether automatic detection or a mask-index argument best fits the issue. Done means imported segmentations with nonstandard masks no longer fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100