Skip to content

Commit

Permalink
add a new env and replace antsApplyTransform with greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhananjhay committed Jan 17, 2025
1 parent c04ba2e commit 5cc4799
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions hippunfold/workflow/envs/env12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: env2
channels:
- conda-forge
- khanlab
- defaults
dependencies:
- python=3.9
- convert3d
- greedyreg
4 changes: 2 additions & 2 deletions hippunfold/workflow/rules/subfields.smk
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ rule resample_unfoldreg_subfields:
container:
config["singularity"]["autotop"]
conda:
"../envs/env2.yaml"
"../envs/env12.yaml"
shadow:
"minimal"
group:
"subj"
shell:
"c3d {input.label_nii} -slice z 0:15 -oo tmp0%d.nii.gz && "
"for fn in $(ls tmp*.nii.gz); do antsApplyTransforms -d 2 -i $fn -r $fn -o $fn -n MultiLabel -t {input.warp}; done && "
"for fn in $(ls tmp*.nii.gz); do greedy -d 2 -rf $fn -rm $fn $fn -r {input.warp}; done && "
"c3d tmp*.nii.gz -tile z -o recombined.nii.gz && "
"c3d {input.label_nii} recombined.nii.gz -copy-transform -o {output}"

Expand Down

0 comments on commit 5cc4799

Please sign in to comment.