DoHeatmap函数Seurat-dataframe中出错:参数表示行数不同

DoHeatmap函数Seurat-dataframe中出错:参数表示行数不同,r,heatmap,seurat,R,Heatmap,Seurat,我试图使用Seurat中的DoHeatmap函数来显示一些已定义集群中的许多基因的表达。 B_细胞是我的修拉对象 tfs <- c("PRDM1", "PAX5", "BACH2") DoHeatmap(B_cells, features=tfs) 当我查看Seurat对象中的行数和列数时 nrow(B_cells) = 19651 ncol(B_cells) = 10151 对不起,如果这是一个愚蠢的问题,但我已经被困了一段时间了 编辑回溯(): DoHeatmap()函数的源代

我试图使用Seurat中的DoHeatmap函数来显示一些已定义集群中的许多基因的表达。 B_细胞是我的修拉对象

tfs <- c("PRDM1", "PAX5", "BACH2")

DoHeatmap(B_cells, features=tfs)
当我查看Seurat对象中的行数和列数时

nrow(B_cells) = 19651

ncol(B_cells) = 10151
对不起,如果这是一个愚蠢的问题,但我已经被困了一段时间了

编辑回溯():


DoHeatmap()函数的源代码可以在中找到。traceback()显示可视化的第363行。R导致错误:

if (label) {
   x.max <- max(pbuild$layout$panel_params[[1]]$x.range)
   # Attempt to pull xdivs from x.major in ggplot2 < 3.3.0; if NULL, pull from the >= 3.3.0 slot
   x.divs <- pbuild$layout$panel_params[[1]]$x.major %||% pbuild$layout$panel_params[[1]]$x$break_positions()
   x <- data.frame(group = sort(x = group.use), x = x.divs)
   ...
}       

这些功能是否在您的rownames,do表中(tfs%在%rownames(B_单元格))是的,它返回TRUE 3您可以在错误发生后立即运行
traceback()
,并在问题中发布输出吗?非常感谢。
3: stop(gettextf("arguments imply differing number of rows: %s", 
       paste(unique(nrows), collapse = ", ")), domain = NA)
2: data.frame(group = sort(x = group.use), x = x.divs)
1: DoHeatmap(B_cells, features = genes)
if (label) {
   x.max <- max(pbuild$layout$panel_params[[1]]$x.range)
   # Attempt to pull xdivs from x.major in ggplot2 < 3.3.0; if NULL, pull from the >= 3.3.0 slot
   x.divs <- pbuild$layout$panel_params[[1]]$x.major %||% pbuild$layout$panel_params[[1]]$x$break_positions()
   x <- data.frame(group = sort(x = group.use), x = x.divs)
   ...
}       
DoHeatmap(B_cells, features=tfs, label=FALSE)