bedapub / besca

BESCA (Beyond Single Cell Analysis) offers python functions for single-cell analysis
https://bedapub.github.io/besca/
GNU General Public License v3.0
49 stars 16 forks source link

Issue with tl.annotate_cells_cluster function #344

Open prasadm1k opened 4 months ago

prasadm1k commented 4 months ago

Adding this issue on Petra's request.

My UMAP looks as expected (I had already run this analysis previously on besca24ngs)

image

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)

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