Skip to content

Commit

Permalink
Merge pull request #255 from khanlab/fix-label-gii
Browse files Browse the repository at this point in the history
fixes bug introduced in unfold_reg by reverting
  • Loading branch information
akhanf authored Aug 10, 2023
2 parents a7f797d + 0ea2366 commit ba32784
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion hippunfold/workflow/rules/gifti.smk
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,13 @@ rule nii_to_label_gii:
"unfold_template_hipp",
"tpl-avg_space-unfold_den-{density}_midthickness.surf.gii",
),
label_list=lambda wildcards: os.path.join(
workflow.basedir,
"..",
config["atlas_files"][wildcards.atlas]["label_list"],
),
params:
structure_type=lambda wildcards: hemi_to_structure[wildcards.hemi],
output:
label_gii=bids(
root=root,
Expand All @@ -1116,8 +1123,12 @@ rule nii_to_label_gii:
"subj"
container:
config["singularity"]["autotop"]
shadow:
"minimal"
shell:
"wb_command -volume-to-surface-mapping {input.label_nii} {input.surf} {output.label_gii} -enclosing"
"wb_command -volume-to-surface-mapping {input.label_nii} {input.surf} temp.shape.gii -enclosing && "
"wb_command -metric-label-import temp.shape.gii {input.label_list} {output.label_gii} && "
"wb_command -set-structure {output.label_gii} {params.structure_type}"


def get_cmd_cifti_metric(wildcards, input, output):
Expand Down

0 comments on commit ba32784

Please sign in to comment.