From 772744bb15748a32429d9978cea8e43ea38c9367 Mon Sep 17 00:00:00 2001 From: Peter Van Dyken <87136354+pvandyken@users.noreply.github.com> Date: Mon, 13 Mar 2023 16:03:19 -0400 Subject: [PATCH] Move target_rule to beginning of snakemake call The target was previously at the end of the call, but then if the last user-provided snakemake argument is something that consumes arguments (such as `-q`), the target gets misinterpreted and snakemake errors. --- snakebids/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snakebids/app.py b/snakebids/app.py index 79757085..0fbddfd7 100644 --- a/snakebids/app.py +++ b/snakebids/app.py @@ -233,6 +233,9 @@ def run_snakemake(self): *filter( None, [ + *app.config["targets_by_analysis_level"][ + app.config["analysis_level"] + ], "--snakefile", str(app.snakefile_path), "--directory", @@ -240,9 +243,6 @@ def run_snakemake(self): "--configfile", str(new_config_file.resolve()), *app.config["snakemake_args"], - *app.config["targets_by_analysis_level"][ - app.config["analysis_level"] - ], ], ) ]