This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using clusterprofiler (or else) top look for enrichment of one specific GO term

In my set of differentially expressed proteins (derived from comparison of different genotypes to healthy) I would like to check if specific GO-terms are enriched (eg. if one set of proteins contains significantly more often the annotation for "membrane" = GO:0016020).

Currently I am using clusterProfiler for enrichment analysis but it appears that it will only check for unbiased enrichment in the sense of "which terms are enriched?". But I did not find a function to ask the question: is term xxx enriched in protein set A.

Maybe someone knows how I could best achieve this?

Thank you! Sebastian

r clusterprofiler bioconductor enrichment

2 answers

Your question is the same as what any enrichment analysis tool does - "which terms are enriched in my geneset compared to a background gene set?".

In your case, you just need to change your background gene set to all of your differentially expressed genes (the universe parameter in clusterProfiler) rather than all genes, then use the genes from set A as your test set:

genesetA.terms <- enrichGO(yourgenesetA, universe=allDEGs, ...)

May I ask what the allDEGs mean? I also meet this problem, but I can't solve it, I don't know how to set the background parameter, universe. Plz forgive me for asking such a simple question.

This is a separate question. Please post it as a new question (with a clear explanation and reproducible example) if you would like help. Please read this post on how to properly ask a question before doing so.

Log in to answer this question.