Skip to content

Commit

Permalink
fill na pvalues with 1
Browse files Browse the repository at this point in the history
related to #12
  • Loading branch information
abearab committed Dec 22, 2023
1 parent 75c0801 commit 44ca695
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions screenpro/phenoScore.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ def runPhenoScore(adata, cond1, cond2, math, test, score_level,
math=math, ave_reps=True, test=test,
growth_rate=growth_rate
)

# fill na with 1
p_values[np.isnan(p_values)] = 1
# Calculate the adjusted p-values using the Benjamini-Hochberg method
if p_values is None:
raise ValueError('p_values is None')
_, adj_pvalues, _, _ = multipletests(p_values.fillna(1), alpha=0.05, method='fdr_bh')
_, adj_pvalues, _, _ = multipletests(p_values, alpha=0.05, method='fdr_bh')
# get targets
targets = adata.var.index.str.split('_[-,+]_').str[0].to_list()
# combine results into a dataframe
Expand Down

0 comments on commit 44ca695

Please sign in to comment.