repeating genes in pl.rank_genes_groups_heatmap
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of scanpy.
- (optional) I have confirmed this bug exists on the master branch of scanpy.
Hello
It seems the heatmap generated by pl.rank_genes_groups_heatmap is showing repeated genes, as seem in the picture below

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)
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 by reproducing the reported call to sc.pl.rank_genes_groups_heatmap(adata, n_genes=5, standard_scale='var', swap_axes=True) using the affected setup. Inspect how this entry point selects and displays ranked genes, then verify that the resulting heatmap does not show repeated genes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100