enrichplot画图时报错
Error in ans[ypos] <- rep(yes, length.out = len)[ypos] : replacement has length zero In addition: Warning message: In rep(yes, length.out = len) : 'x' is NULL so the result will be NULL
运行以下代码时
edo <- enrichDO(gene = gene$ENTREZID,
ont = "DO",
pvalueCutoff = 0.01,
pAdjustMethod = "BH",
universe = names(genelist$ENTREZID),
minGSSize = 5,
maxGSSize = 500,
qvalueCutoff = 0.01,
readable = FALSE)
library(enrichplot)
barplot(edo, showCategory=20)
出现报错
> barplot(edo, showCategory=20)
Error in ans[ypos] <- rep(yes, length.out = len)[ypos] :
replacement has length zero
In addition: Warning message:
In rep(yes, length.out = len) : 'x' is NULL so the result will be NULL
网上检索后,发现是阈值设的太高,把阈值调低即可:
pvalueCutoff = 0.01,
qvalueCutoff = 0.05,
改为pvalueCutoff = 0.2,
qvalueCutoff = 0.2