scverse / scverse/spatialdata-io
Read `cell_feature_matrix` in market format
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 103
- Forks
- 65
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 3
Description
Some Xenium datasets deposited in GEO lack h5 file format and instead decided to upload market format. For example: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM8253804
Of course it is possible to ask the authors to update the record. But maybe it is useful and better for other cases like this to add the ability to read the file in market format? Perhaps also then it is possible to add support for zarr in case someone decides to upload that one instead?
For now, I have tried to workaround this but the only solution was to avoid reading the AnnData entirely, read the file with scanpy and then assign it to sadata.tables. Following this code:
sdata = io.xenium(".", cells_table=False, cells_as_circles=False, cells_boundaries=False, nucleus_boundaries=False)
adata = sc.read_10x_mtx("cell_feature_matrix")
sdata.tables["mydata"] = adata
But of course this causes a lot of information to be missing and this may cause other problems. Is there any other way to work around this issue?
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 with the io.xenium entry point and inspect how it currently reads cell_feature_matrix. Compare that path with the scanpy read_10x_mtx workaround and the assignment to sdata.tables['mydata']. Done means Xenium data in market format can be loaded through the reader without losing the information currently missing from the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100