From 51f61670b8b8becf1bb481ded17e83614ba130f5 Mon Sep 17 00:00:00 2001 From: Karl5766 Date: Fri, 4 Oct 2024 13:03:32 -0400 Subject: [PATCH] move args to rule --- spimquant/workflow/Snakefile | 11 ++--------- spimquant/workflow/rules/blobdetect.smk | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/spimquant/workflow/Snakefile b/spimquant/workflow/Snakefile index b06b77b..16d9f9c 100644 --- a/spimquant/workflow/Snakefile +++ b/spimquant/workflow/Snakefile @@ -6,15 +6,8 @@ import shutil set_bids_spec("v0_11_0") -TARGET_SNAKEBIDS_YML_PATH = pathlib.Path("config/snakebids.yml").resolve() # configfile if found -# otherwise use the template which will not directly work but you can provide command line arguments to add to it -if not os.path.exists(TARGET_SNAKEBIDS_YML_PATH): - if not os.path.exists(TARGET_SNAKEBIDS_YML_PATH.parent): - os.makedirs(TARGET_SNAKEBIDS_YML_PATH.parent) - SNAKEBIDS_YML_PATH = "../examples/snakebids_template.yml" - shutil.copy(SNAKEBIDS_YML_PATH, TARGET_SNAKEBIDS_YML_PATH) - -configfile: TARGET_SNAKEBIDS_YML_PATH + +configfile: "config/snakebids.yml" # use expandvars so we can use e.g. '$SLURM_TMPDIR' diff --git a/spimquant/workflow/rules/blobdetect.smk b/spimquant/workflow/rules/blobdetect.smk index 4ba13e0..fd40273 100644 --- a/spimquant/workflow/rules/blobdetect.smk +++ b/spimquant/workflow/rules/blobdetect.smk @@ -311,8 +311,8 @@ rule negatively_masked_counting: Work in progress """ input: - zarr=config["negatively_masked_counting"]["zarr"], - neg_mask=config["negatively_masked_counting"]["neg_mask"], + zarr='/path_to_bids_root/bids/sub-onuska21/micr/sub-onuska21_sample_brain_acq-prestitched_SPIM.ome.zarr?slices=[1]', + neg_mask='/path_to_bids_root/resources/onuska21_patched.tiff', params: neg_mask_scale=(1, 1, 1), tmp_path=f'{config["output_dir"]}/tmp'