问题描述
我有一个 seuratObject,rownames 是基因名称,在列表中不是唯一的,colnames 是样本 ID。
counts <- GetAssayData(seuratObject,assay="RNA",slot="data")
genes <- c("Dmd")
counts <- as.matrix(counts[rownames(counts) %in% genes,])
# You can then prepare your Metadata using this code.
Metadata <- seuratObject[[]]
Metadata <- Metadata[rownames(Metadata) %in% colnames(counts),]
# These can then be used as input to ComplexHeatmap.
heatmap(counts,col = c("cornflower blue","green","red"))
热图在这里
我得到的是一个有 n 行的热图(Dmd 基因在列表中重复的次数),我想得到的是所有计数相加的单行。我认为它应该与rowSums
有关,但我不知道如何将其应用于情节。有谁知道如何实现这一目标?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)