DoHeatmap的时候发现基因不能够完全展示
解决方案参照# Seurat::DoHeatmap 的谜之报错
Warning message:
In DoHeatmap(pbmc, features = top10$gene) :
The following features were omitted as they were not found in the scale.data slot for the RNA assay: NEAT1, SLC25A39, AC090498.1, CTSS, DNAJB1, HSP90AA1, PRF1, NKG7, KLRD1, CD8B, DUSP4, CD8A, CCL5, CD27, GZMK, CD69, TNFAIP3, ZFP36L2, IL7R
function (object, features = NULL, cells = NULL, group.by = "ident",
group.bar = TRUE, disp.min = -2.5, disp.max = NULL, slot = "scale.data",
assay = NULL, label = TRUE, size = 5.5, hjust = 0, angle = 45,
raster = TRUE, draw.lines = TRUE, lines.width = NULL, group.bar.height = 0.02,
combine = TRUE)
DoHeatMap()有个默认参数slot = "scale.data",自动用scale.data的数据画图。
看一下这个Seurat对象的结构:
直接给scale.data赋值:
pbmc@assays$RNA@scale.data <- scale(pbmc@assays$RNA@data, scale = TRUE)
DoHeatmap(pbmc, features = top10$gene,size = 0.5,slot = "scale.data") + NoLegend()
问题解决。