From 8d50d37a50aa5db332d8d9a1397a0b4cf9c2d140 Mon Sep 17 00:00:00 2001 From: Jiayi Wu Date: Sun, 6 May 2018 17:40:46 -0400 Subject: [PATCH] fixed user defined grid_file in FDR calculation --- mtag.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtag.py b/mtag.py index 5b6159d..aeba333 100644 --- a/mtag.py +++ b/mtag.py @@ -1067,7 +1067,7 @@ def fdr(args, Ns_f, Zs): if args.grid_file is not None: prob_grid = np.loadtxt(args.grid_file) # exclude rows that don't sum to 1 - prob_grid = prob_grid[(np.sum(prob_grid, axis=1) > 1.) & np.sum(prob_grid, axis=1) < 0] + prob_grid = prob_grid[(np.sum(prob_grid, axis=1) > 1.) & (np.sum(prob_grid, axis=1) < 0)] else: # automate the creation of the probability grid # one_dim_interval = np.linspace(0., 1., args.intervals +1)