Skip to content

Commit

Permalink
manual simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Sep 20, 2024
1 parent 30bfcdd commit 6458336
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions alphastats/multicova/multicova.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,14 @@ def get_fdr(n_pos, n_false_pos, pi0):
proportion of true null (unaffected) genes in the data set.
"""
n = n_false_pos * pi0

fdr = 0
if n != 0:
if n_pos != 0:
fdr = n / n_pos
else:
fdr = 0
else:
if n_pos > 0:
fdr = 0
else:
fdr = np.nan
elif n_pos <= 0:
fdr = np.nan

return fdr


Expand Down

0 comments on commit 6458336

Please sign in to comment.