Skip to content

Commit

Permalink
Relax fallback threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
sminot committed Feb 16, 2024
1 parent 47cee4c commit 20c0000
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/plot_metagenomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(
)
self.adata.var = self.adata.var.assign(**{
kw: self.adata.var[kw].fillna(val)
for kw, val in [("estimate", 0), ("std_error", 0), ("p_value", 1)]
for kw, val in [("estimate", 0), ("std_error", 0), ("p_value", 0.99)]
})
self.adata.var["qvalue"] = multipletests(self.adata.var["p_value"].fillna(0), 0.1, "fdr_bh")[1]
self.adata.var["neg_log10_pvalue"] = -np.log10(self.adata.var["p_value"])
Expand Down Expand Up @@ -244,7 +244,7 @@ def plot(self, meta_cname, output_folder):

# Bars showing the -log10(qvalue) for each gene bin
# (unless there are no useful q-values, in which case fall back to p-values)
if self.adata.var["neg_log10_qvalue"].max() == 0:
if self.adata.var["neg_log10_qvalue"].max() < 0.0001:
kw = "neg_log10_pvalue"
label = "p-value (-log10)"
else:
Expand Down

0 comments on commit 20c0000

Please sign in to comment.