Skip to content

Commit

Permalink
add logs for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
akhanf committed Feb 13, 2024
1 parent dee6025 commit cb08829
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions workflow/rules/atlasreg.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand All @@ -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}"

Expand All @@ -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"

Expand Down Expand Up @@ -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} && "
Expand Down Expand Up @@ -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 "
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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"

0 comments on commit cb08829

Please sign in to comment.