scverse / scverse/spatialdata-io
Wrong file loaded when building new SpatialData
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 103
- Forks
- 65
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 3
Description
I am working with some data with many .h5ad files stored in the same directory. Whenever I create a new SpatialData object I specify the path to the correct AnnData counts file.
I noticed that the file that is loaded is typically the wrong one and the first .h5ad in the directory is loaded instead. I believe this is because the first element of a list is considered here
I guess the same happens for the barcodes that are specified in the line below
The only workaround right now is to have multiple paths for different files.
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 in src/spatialdata_io/readers/dbit.py at the referenced lines 282 and 285, where the first elements of the file lists are selected. Reproduce the issue with multiple .h5ad files and verify that the explicitly specified counts and barcode paths are used; done means the requested files are loaded rather than the directory's first entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100