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


    运行以下命令时:

    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)
    
    dotplot(ego.down,showCategory=20,x="GeneRatio",font.size=13) + ggtitle("GO (BP) terms of down-regulated genes")+
    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))
    

    出现报错:

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

    检查了一下,发现是阈值设的太高,把阈值调低即可:

    pvalueCutoff = 0.01,
    qvalueCutoff = 0.05,
    

    把上面的改为:

    pvalueCutoff = 0.2,
    qvalueCutoff = 0.2,
    
  • 相关阅读:
    Extended Traffic LightOJ
    SPFA()判环
    Ignatius and the Princess IV HDU 1029
    DNA sequence HDU
    Eight HDU
    哈密顿绕行世界问题 HDU2181
    F
    E
    Hash记录字符串
    无序map 记录一下
  • 原文地址:https://www.cnblogs.com/chenwenyan/p/15225007.html
Copyright © 2020-2023  润新知