scverse / scverse/scanpy

sc.pl.heatmap show the wrong scale

Open
#750 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

Dear, when I use sc.pl.heatmap(adata,markers,groupby='leiden',show_gene_labels=True) to show some marker genes, the colorbar value range is different from that generated by sc.pl.umap(). I am sure that umap show the expression value correctly and there must be something wrong with sc.pl.heatmap(), here are the images:

For example, the expression value of gene 'Sct' is 0-7.5, while it changes to 0-1e7 on the heatmap, the value is so high that it may scale other gene's expression value to almost zero and nothing can be seen on heatmap for other genes. Some other genes have the same issue. Do you know the reason ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with sc.pl.heatmap(adata, markers, groupby='leiden', show_gene_labels=True) and compare its colorbar with sc.pl.umap(). Start at the sc.pl.heatmap and sc.pl.umap entry points to trace how expression values and scales are handled. Done means the heatmap uses the correct expression range, such as 0–7.5 for Sct, without suppressing other genes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics, data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.