From 07cb12e53a7d756acbb8b297788aee4682f27e6b Mon Sep 17 00:00:00 2001 From: zqfang Date: Thu, 21 Dec 2023 13:56:46 -0800 Subject: [PATCH] format #238 --- gseapy/stats.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gseapy/stats.py b/gseapy/stats.py index 137d031..c440d4a 100644 --- a/gseapy/stats.py +++ b/gseapy/stats.py @@ -92,7 +92,9 @@ def calc_pvalues(query, gene_sets, background=20000, **kwargs): # (m + 0.5) * (k - x + 0.5) # ) # Haldane-Anscombe correction, issue #132 bu = 0.5 # base up for Haldane-Anscombe correction. When bu=0, the result is exactly equal to Enrichr. - oddr = ((x + bu) * (bg - m - k + x + bu)) / ((m - x + bu) * (k - x + bu)) # issue #237 + oddr = ((x + bu) * (bg - m - k + x + bu)) / ( + (m - x + bu) * (k - x + bu) + ) # issue #237 vals.append((s, pval, oddr, x, m, hits)) return zip(*vals)