From 7bd4afa7c083cd1eb0257e7e942669df723c9b76 Mon Sep 17 00:00:00 2001 From: Jon Clucas Date: Wed, 29 Mar 2023 15:59:41 -0400 Subject: [PATCH] :bug: Handle no z-score case for FCP-INDI/C-PAC#1787 --- CPAC/cwas/cwas.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CPAC/cwas/cwas.py b/CPAC/cwas/cwas.py index d2743b51dc..a866773ff6 100644 --- a/CPAC/cwas/cwas.py +++ b/CPAC/cwas/cwas.py @@ -233,9 +233,11 @@ def merge_cwas_batches(cwas_batches, mask_file, z_score, permutations): if 1 in z_score: zvals = pval_to_zval(p_set, permutations) z_file = zstat_image(zvals, mask_file) - + else: + z_file = None + return F_file, p_file, log_p_file, one_p_file, z_file - + def zstat_image(zvals, mask_file): mask_image = nb.load(mask_file)