R package for functional enrichment and depletion analysis
1
0
Entering edit mode
12 months ago
lessismore ★ 1.3k

Dear community,

I'm searching for a R package for performing enrichment and depletion analysis of user-defined pathways (e.g. in gmt format) using an empirical p-value calculated from a permutation test (i.e. random sampling the same number of genes as the user submitted gene set from the background set e.g. 1000 times and testing the intersection with the pathway set for each pathway). Can you please help? If I don't find it, I'll generate a custom function, but I find weird that a package like that does not exist. Thanks in advance

enrichment depletion • 766 views
ADD COMMENT
0
Entering edit mode
12 months ago

What you're describing is a simulation of the hypergeometric test, so if you want an exact solution you could use the function fora from fgsea to caclulate the hypergeometric test directly instead of simulating it.

ADD COMMENT
0
Entering edit mode

Thanks for your answer but as far as I know this cannot perform depletion analysis, correct?

ADD REPLY
1
Entering edit mode

You can also use the base R function stats::phyper which lets you calculate a p-value for underrepresentation lower.tail=TRUE or overrpresentation lower.tail=FALSE.

ADD REPLY

Login before adding your answer.

Traffic: 2526 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6