我正在尝试绘制火山图,但收到此错误:
Error in grid.Call(C_convert, x, as.integer(whatfrom), as.integer(whatto), :
Viewport has zero dimension(s)
Run Code Online (Sandbox Code Playgroud)
我从来没有遇到过这个问题,代码过去工作得很好。它基本上是根据标签的细胞火山图。我试图找出两组之间的差异。
p=c()
for (i in 1:nrow(scores.batch)){
p[i] = wilcox.test(scores.batch[i,totaldata$Response=='Response'],scores.batch[i,totaldata$Response=='NoResponse'])$p.value
}
p.adj = p.adjust(p,method='fdr')
lfc = log2(rowMeans(scores.batch[,totaldata$Response=='Response'])/rowMeans(scores.batch[,totaldata$Response=='NoResponse']))
set.seed(42)
DF.2 = data.frame(lfc, p, labels= rownames(scores.batch))
EnhancedVolcano(toptable = DF.2, lab=DF.2$labels, drawConnectors = TRUE,
x='lfc',y='p',pCutoff = 0.5, FCcutoff = 0.25, ylim = c(0,7.5), xlim = c(-1.5,1.5))
Run Code Online (Sandbox Code Playgroud)
什么可能导致这种情况?我尝试重新启动 R 但没有帮助。