MaayanLab / enrichr_issues

5 stars 3 forks source link

Odds ratio interpretation #81

Closed Matthieubz closed 7 months ago

Matthieubz commented 7 months ago

Hello,

I am using the online version of EnrichR to perform enrichment analyses of differential signatures on Reactome pathways. Could you please provide me details on the calculation and indicate me how to interpret the Odds.Ratio column in the output ?

Many thanks

enryH commented 7 months ago

I have a question how to read the documentation of the odds ratio from the help page:

where: a are the overlapping genes, b are the genes in the annotated set - overlapping genes, c- are the genes in the input set - overlapping genes, and d- are the 20,000 genes (or total genes in the background) - genes in the annotated set - genes in the input set + overlapping genes

How should one read the pluses (+) and minus (-) in the text?

For example:

What is d?

If it is a mix of minus (-) in the mathematical sense and hyphens, it needs some clarifications:) It's a great tool and the documentation is in many parts already super great!

lachmann12 commented 7 months ago

Hi,

the odds ratio is computed like so:

int totalBgGenes = 20000; // hardcoded
int gmtListSize = length of gene set from library
int numGenelist = length of gene set from user input
int a = numOverlap;
int b = gmtListSize - numOverlap;
int c = numGenelist - numOverlap;
int d = totalBgGenes - numGenelist - gmtListSize + numOverlap;
double oddsRatio = (1.0 * a * d) / Math.max(1.0 * b * c, 1);            

I hope this helps.

Best, Alex

enryH commented 7 months ago

Yes thanks! That clarifies it. Will you update the help text accordingly? (I would opt for writing minus and plus as words to make it clear - and/or link the function on GitHub?)

AviMaayan commented 7 months ago

Will do. Thank you so much for the helpful feedback. It is much appreciated!