satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.29k stars 915 forks source link

Bug in DoHeatmap #8903

Closed neuhausi closed 5 months ago

neuhausi commented 5 months ago

The bug in DoHeatmap still persist. Check your own vignette at https://satijalab.org/seurat/articles/visualization_vignette. A very simple spot check would do it. Look at the Platelet cluster for PF4 and you can see is all yellow which means values > 1.8. If you look at the data in the ggplot object they are all negative except for one value :-( I reported this issue a while back https://github.com/satijalab/seurat/issues/7090 I suggest either fix it or take it out of the library. This is misleading and certainly wrong! Thank you.

# Single cell heatmap of feature expression
DoHeatmap(pbmc3k.final, downsample = 100), features = features, size = 3)
longmanz commented 5 months ago

Hi, If you check the "PF4" expression in every cell using the following commands, you can see that the all of the Platelets indeed have expression > 1.8.

test = LayerData(pbmc3k.final, layer = "scale.data")
test["PF4", pbmc3k.final$seurat_annotations == "Platelet"]

Please be aware that the "data" from a DoHeatmap object is NOT equivalent to the actual expression values (scale.data) from the Seurat object.