`join_sdata_spatialelement_table()` fails with non-unique `AnnData` obs
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 394
- Forks
- 95
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 7
Description
When the AnnData object has obs that are not unique the join will fail because code like this table[joined_indices, :] require unique indices.
I think we should
- modify the function
_get_joined_table_indices()to return numerical indices - in general modify the
locin dataframes and the use of obs indices in anndata to useilocand numerical indices instead
To test:
- make a table with some rows and
obs.indexnot unique - compute a left join
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 join_sdata_spatialelement_table() and _get_joined_table_indices(), then reproduce the failure using a table whose AnnData obs.index contains duplicates. Run a left join and add coverage showing that non-unique obs works; done means the join no longer fails for that case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100