Error in ans[ypos] <- rep(yes, length.out = len)[ypos] : replacement has length zero

created at 09-03-2021 views: 84

description

When running the following command:

ego.down <- enrichGO(gene = down$newid,
                   universe = bg.list$newid,
                   OrgDb = org.Hs.eg.db,
                   keyType       = 'ENSEMBL',
                   ont = "BP", # biological process, change this to "MF" for molecular function, or "CC" for cellular components
                   pAdjustMethod = "BH",
                   pvalueCutoff = 0.01,
                   qvalueCutoff = 0.05,
                   readable = TRUE)
saveRDS(ego.down,file="./GOBP.down.shRBBP6.2.RDS")

dotplot(ego.down,showCategory=20,x="GeneRatio",font.size=13) + ggtitle("GO (BP) terms of down-regulated genes\nCW468_shRBBP6_2")+
scale_y_discrete(labels=function(x) str_wrap(x,width = 40))  +
  theme(plot.title = element_text(size=16,face = "bold",hjust = .5),
        legend.title = element_text(size=15),
        legend.text = element_text(size=14))

got error

Error in ans[ypos] <- rep(yes, length.out = len)[ypos] : replacement has length zero

After checking it, it was found that the threshold was set too high, just lower the threshold:

change

pvalueCutoff = 0.01,
qvalueCutoff = 0.05,

to

pvalueCutoff = 0.2,
qvalueCutoff = 0.2,
created at:09-03-2021
edited at: 09-03-2021: