using `adata.var_names` in `sc.get.obs_df`
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
Calling sc.get.obs_df with keys=adata.var_names raises a value error since here an Index object is used to re-order the dataframe.
I think its a trivial fix to re-cast keys locally if an Index object is passed (aka adata.var_names) and could be nice for the user :)
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 scanpy/get/get.py at lines 303-304 and reproduce the failure by calling sc.get.obs_df with keys=adata.var_names. Check how the Index is used to reorder the dataframe and verify that the call no longer raises a ValueError after the fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics, data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100