Always add 'use_rep' for uns["neighbors"]["params"]
Open
Nobody has claimed this yet.
Area - Dimensionality Reduction 🤏
Area - Metadata 📝
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
Please describe your wishes and possible alternatives to achieve the desired result.
No key inside 'use_rep' can mean 'X' or 'X_pca' was used for nearest neighbor calculation depending on the number of vars. It's storing things correctly if 'use_rep' is called explicitly.
sc.pp.neighbors(combined_emb, n_neighbors=50)
combined_emb.uns["neighbors"]["params"]["use_rep"] -> KeyError
sc.pp.neighbors(combined_emb, n_neighbors=50, use_rep='X')
combined_emb.uns["neighbors"]["params"]["use_rep"] -> 'X'
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 sc.pp.neighbors and reproduce the two examples in the issue, comparing the implicit and explicit use_rep cases. The work is done when uns["neighbors"]["params"] includes use_rep with the representation actually used in both cases, while preserving the existing explicit behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100