junjunlab / scRNAtoolVis

Useful functions to make your scRNA-seq plot more cool!
Other
271 stars 29 forks source link

Error in dimnames(x) <- dn : 'dimnames'的长度[2]必需与陈列范围相等(不是gsea结果也发生) #12

Open Roger-GOAT opened 1 year ago

Roger-GOAT commented 1 year ago

你好,上次我以为是只出现在IrGSEA结果,现在发现全部seurat都是如此。。

heatmap_gene <- c("Snhg9", "Ecm1")

 DotPlot(sce,features = heatmap_gene,assay = 'RNA',group.by = 'celltype',cols = 'Spectral')+
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust=1))+
  labs(title = "Markers of cell type")+
  theme(plot.title = element_text(hjust = 0.5)) (可以正常出图)

AverageHeatmap(object = sce,group.by = 'celltype',assays = 'RNA',slot = 'data',
               markerGene = heatmap_gene)

Error in dimnames(x) <- dn : 'dimnames'的长度[2]必需与陈列范围相等
bfcui commented 1 year ago

老哥问题解决了吗,我也遇到这个问题。 我简单摸索了一下,问题可能出在group.by这个参数下

wangdemo commented 5 months ago

就是group.by参数的问题,AverageHeatmap和DotPlot的group.by参数值好像不同

1JYL123 commented 4 months ago

我也遇到这个问题了,可以试一下0.0.3版本或0.0.4版本,这两个版本的group.by参数是可以用的