bedapub / bedapub/besca

Issue with tl.annotate_cells_cluster function

Open
#344 0 comments 0 reactions 0 assignees View on GitHub
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)

![image](https://github.com/bedapub/besca/assets/171248155/8282eb50-e600-4355-94df-f3a3f583732a)

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.

![image (1)](https://github.com/bedapub/besca/assets/171248155/e4268e95-3e63-4b78-926e-6496e0986888)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.