scverse / scanpy

Single-cell analysis in Python. Scales to >1M cells.
https://scanpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.88k stars 594 forks source link

repeating genes in pl.rank_genes_groups_heatmap #1958

Open dm8000 opened 3 years ago

dm8000 commented 3 years ago

Hello It seems the heatmap generated by pl.rank_genes_groups_heatmap is showing repeated genes, as seem in the picture below

image_2021-07-26_095102

This occured in 1.7.1, which I had to use because of #1941

I assume this is not working as intended.

The command I have used is sc.pl.rank_genes_groups_heatmap(adata, n_genes=5, standard_scale='var', swap_axes=True)

LuckyMD commented 3 years ago

Hi @dm8000,

I think it might just be that these genes are markers of multiple populations in your sc.tl.rank_genes_groups() results. You could check whether they are by looking at the adata.uns where you stored your results. There is a ['names'] column where you can get the names of the top genes per cluster.