【发布时间】:2020-03-26 14:51:37
【问题描述】:
我正在尝试使用 Seurat 中的 DoHeatmap 函数来显示一些基因在一些定义的集群中的表达。 B_cells 是我的 Seurat 对象。
tfs <- c("PRDM1", "PAX5", "BACH2")
DoHeatmap(B_cells, features=tfs)
我又收到了这个错误;
Error in data.frame(group = sort(x = group.use), x = x.divs) :
arguments imply differing number of rows: 10411, 0
当我查看 Seurat 对象中的行数和列数时;
nrow(B_cells) = 19651
ncol(B_cells) = 10151
对不起,如果这是一个愚蠢的问题,但我已经坚持了一段时间了。
编辑回溯():
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)
【问题讨论】:
-
这些特征在你的行名中吗,做 table(tfs %in% rownames(B_cells))
-
是的,它返回 TRUE 3
-
您能否在错误发生后立即运行
traceback()并在问题中发布输出?谢谢。