Issue with tl.annotate_cells_cluster function
- Dominant language
- Python
- Stars
- 50
- Forks
- 17
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 3
Description
Adding this issue on Petra's request.
My UMAP looks as expected (I had already run this analysis previously on besca24ngs)

The issue occurs when I label my celltypes and then re-plot the UMAP with the labels. I get the following gibberish. I know that the labelings are good.

The problem was sorted by using a different labelling function as described by Petra.
# Dictionary for renaming values
correspondence = {
'0': 'Tumor_Necro',
'1': 'Tumor',
'2': 'Tumor_Necro',
'3': 'Tumor_Fibro',
...
}
adata.obs['annov2'] = adata.obs['leiden'].copy()
adata.obs['annov2'] = adata.obs['annov2'].replace(correspondence)
So seems like an issue with the tl.annotate_cells_cluster function
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported behavior around tl.annotate_cells_cluster, using the described UMAP labeling workflow and the adata.obs values shown in the issue. Compare its output with the replace-based workaround. Done means the annotated labels render correctly when the UMAP is re-plotted, with a regression check for the reported labeling case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100