I meet a problem when use enricher of clusterProfiler :
my CC background gene number is 9052, print summary(ego), its show BgRatio is 9052, but when i use ego@geneSets to show only 5k, then i use plotGOgraph,the first level of go`s gene number is 5k, not 9052, other levels gene number is right as the same as showing of summary(ego)
- i use latest version of clusterProfiler
library(clusterProfiler) annot <- read.table("PFC/annot.C", header=F, sep="\t", quote="", colClasses = "character") allg <- read.table("Unigene.fa.bgl", header=F, colClasses = "character") deg <- read.table("../CK-VS-T.glist", header=F, colClasses = "character") g2g <- annot[, c("V1", "V2")] g2t <- annot[, c("V1", "V3")] ego <- enricher(deg$V1, universe=allg$V1, pAdjustMethod = "none", minGSSize = 1, TERM2GENE= g2g, TERM2NAME = g2t, pvalueCutoff =1, qvalueCutoff =1) write.table(summary(ego)[,-6][,-8], "test/test.C.xls", sep="\t", row.names=F, quote=F) ego <- enricher(deg$V1, universe=allg$V1, pAdjustMethod = "none", minGSSize = 1, TERM2GENE= g2g, TERM2NAME = g2t, pvalueCutoff =0.05, qvalueCutoff =1) ego@ontology = "CC" if(length(rownames(summary(ego))) != 0) { pdf("test/test.C.pdf") if(length(rownames(summary(ego))) > 9) { plotGOgraph(ego) }else{ plotGOgraph(ego, firstSigNodes = length(rownames(summary(ego)))) } dev.off() }
yes, I know BgRatio is format to M/N
9052 is N, the number of geneSets is 5k, are they the same? i think it must be the same, or i use plotGOgraph show the first level of go`s gene number is 5k, not 9052
pls install the newest release of DOSE, it should solve your issue.