From ff6fe044116e5c71d9eef5e4fbc38a1024b94e55 Mon Sep 17 00:00:00 2001 From: Sam Minot Date: Wed, 13 Mar 2024 09:21:44 -0700 Subject: [PATCH] Correct FDR calculation --- bin/plot_metagenomes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/plot_metagenomes.py b/bin/plot_metagenomes.py index e43c57e..de5a232 100755 --- a/bin/plot_metagenomes.py +++ b/bin/plot_metagenomes.py @@ -66,7 +66,7 @@ def __init__( kw: self.adata.var[kw].fillna(val) 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["qvalue"] = multipletests(self.adata.var["p_value"].fillna(1), 0.1, "fdr_bh")[1] self.adata.var["neg_log10_pvalue"] = -np.log10(self.adata.var["p_value"]) self.adata.var["neg_log10_qvalue"] = -np.log10(self.adata.var["qvalue"]) for line in str(self.adata).split("\n"):