I am just wondering how are the false discovery rates in pathway enrichment analysis are calculated. I think I saw from somewhere else saying that they are the significance of the genes in my gene set overlapping with the genes in the specific pathway, compared to if a set of random genes were input to find the enriched pathways. So the more significant, the more likely that my gene set is enriched in that specific pathways and not just enriched by chance.
I can no longer find where I saw this explanation and I forgot how they worded it so my explanation might be weird, could anyone explain how are they calculated please? Thank you in advance!