This is a test version of Biostars. For the public version, visit https://www.biostars.org.
clusterProfiler: number of GO terms in results

I am working with a non-model organism. So I constructed TERM2GENE and TERM2NAME files and used enricher to run GO enrichment analysis. The code I used was below. Finally, I got 71 GO terms in the result. But actually, there are 99 unique GO terms for my input genes and I have checked that all 99 GO terms exist now, no obsolete ones. I don't know why there are some GO terms missed such as GO:0003700. I checked there are 57 genes having GO:0003700 in my input gene file.

And I set pvaluecutoff and qvaluecutoff = 1 trying to get all results. But I found the outputted genes is less than 356 (#input genes). I was really very confused. I would really appreciate if anyone could give me some suggestions.

result1.0_MF = as.data.frame(enricher(gene=target1.0$GeneID, TERM2GENE=go2gene_MF, TERM2NAME=go2term_MF, pvalueCutoff = 1, qvalueCutoff=1, pAdjustMethod = "fdr"))

TERM2GENE TERM2NAME result

clusterprofiler

Thank you so much for your suggesstion. I will go to do that now.

1 answer

My bad. I have figured out why the GO number of input and output are different! If you would like to get all results, setting pvaluecutoff and qvaluecutoff = 1 is not enough! You also need to set maxGSSize and minGSSize. When I change my code to below, I got all 99 GO terms in the results.

result1.0_MF = as.data.frame(enricher(gene=target1.0$GeneID, TERM2GENE=go2gene_MF, TERM2NAME=go2term_MF, pvalueCutoff = 1, qvalueCutoff=1, pAdjustMethod = "fdr", maxGSSize = 100000, minGSSize = 1))

Log in to answer this question.