From cb08829c668f5b0496b720a43149055f81e80a0d Mon Sep 17 00:00:00 2001 From: Ali Khan Date: Tue, 13 Feb 2024 12:05:10 -0500 Subject: [PATCH] add logs for linting --- workflow/rules/atlasreg.smk | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/workflow/rules/atlasreg.smk b/workflow/rules/atlasreg.smk index 1c7da67..5124e8a 100644 --- a/workflow/rules/atlasreg.smk +++ b/workflow/rules/atlasreg.smk @@ -8,6 +8,8 @@ rule import_anat: anat=lambda wildcards: config["atlases"][wildcards.template]["anat"], output: anat=bids_tpl(root=root, template="{template}", suffix="anat.nii.gz"), + log: + bids_tpl(root='logs',datatype="import_anat",template="{template}", suffix="log.txt") shell: "cp {input} {output}" @@ -17,6 +19,8 @@ rule import_dseg: dseg=lambda wildcards: config["atlases"][wildcards.template]["dseg"], output: dseg=bids_tpl(root=root, template="{template}", suffix="dseg.nii.gz"), + log: + bids_tpl(root='logs',datatype="import_dseg",template="{template}", suffix="log.txt") shell: "cp {input} {output}" @@ -26,6 +30,8 @@ rule import_lut: json=lambda wildcards: config["atlases"][wildcards.template]["lut"], output: tsv=bids_tpl(root=root, template="{template}", suffix="dseg.tsv"), + log: + bids_tpl(root='logs',datatype="import_lut",template="{template}", suffix="log.txt") script: "../scripts/import_labelmapper_lut.py" @@ -67,6 +73,16 @@ rule affine_reg: desc="affinewarped", suffix="spim.nii", ), + log: + bids( + root='logs', + subject="{subject}", + datatype="affine_reg", + sample="{sample}", + acq="{acq}", + space="{template}", + suffix="log.txt", + ), shell: "greedy -d 3 -i {input.template} {input.subject} " " -a -dof 12 -ia-image-centers -m NMI -o {output.xfm_ras} && " @@ -111,6 +127,16 @@ rule deform_reg: desc="deformwarped", suffix="spim.nii", ), + log: + bids( + root='logs', + subject="{subject}", + datatype="deform_reg", + sample="{sample}", + acq="{acq}", + space="{template}", + suffix="log.txt", + ), shell: "greedy -d 3 -i {input.template} {input.subject} " " -it {input.xfm_ras} -m NMI " @@ -150,6 +176,18 @@ rule resample_labels_to_zarr: ) ) ), + log: + bids( + root='logs', + subject="{subject}", + datatype="resample_labels_to_zarr", + sample="{sample}", + acq="{acq}", + desc="{desc}", + space="{template}", + suffix="log.txt", + ), + script: "../scripts/resample_labels_to_zarr.py" @@ -194,5 +232,16 @@ rule zarr_to_ome_zarr_labels: config["containers"]["spimprep"] group: "preproc" + log: + bids( + root='logs', + subject="{subject}", + datatype="zarr_to_ome_zarr_labels", + sample="{sample}", + acq="{acq}", + desc="{desc}", + space="{template}", + suffix="log.txt", + ), script: "../scripts/zarr_to_ome_zarr_labels.py"