From 262d334be37c317b2dbdcb7dfe8a43160aa225c1 Mon Sep 17 00:00:00 2001 From: akhanf Date: Mon, 22 Mar 2021 16:38:37 -0400 Subject: [PATCH 1/2] added missing final transform as target rule --- hippunfold/workflow/Snakefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hippunfold/workflow/Snakefile b/hippunfold/workflow/Snakefile index d1d6a27c..39115e23 100644 --- a/hippunfold/workflow/Snakefile +++ b/hippunfold/workflow/Snakefile @@ -86,6 +86,19 @@ def get_final_coords(): return coords +def get_final_transforms(): + transforms = [] + for modality in config['modality']: + mod_index = get_modality_key(modality) + transforms = transforms + \ + expand(bids(root='results',datatype='seg_{modality}',**config['subj_wildcards'],suffix='xfm.nii.gz',hemi='{hemi}',from_='T1w',to='unfold',mode='image'), + modality=modality, + hemi=['L','R'], + subject=config['input_lists'][mod_index]['subject'], + session=config['sessions']) + + return transforms + def get_final_anat(): anat = [] for modality in config['modality']: @@ -129,6 +142,7 @@ rule all: input: get_final_specs(), get_final_subfields(), + get_final_transforms(), get_final_coords(), get_final_anat(), get_final_qc(), From b4d26830b050a526f52b7daa7fe81c814b8a2abc Mon Sep 17 00:00:00 2001 From: Ali Khan Date: Mon, 22 Mar 2021 16:45:00 -0400 Subject: [PATCH 2/2] fix typo in related documentation --- docs/getting_started/outputs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting_started/outputs.rst b/docs/getting_started/outputs.rst index 22fec944..9aea3e2a 100644 --- a/docs/getting_started/outputs.rst +++ b/docs/getting_started/outputs.rst @@ -41,11 +41,11 @@ ITK transforms to warp images from the ``T1w`` space to the ``unfold`` space are sub-{subject} └── seg_T2w - └── sub-{subject}_hemi-{L,R}_from-corobl_to-unfold_mode-image_xfm.nii.gz + └── sub-{subject}_hemi-{L,R}_from-T1w_to-unfold_mode-image_xfm.nii.gz This is an ITK transform that can transform any image that is in ``T1w`` space (can be any resolution and FOV, as long as aligned to ``T1w``), to the ``unfold`` hippocampal volume space. You can use the warp itself as a reference image, e.g.:: - antsApplyTransforms -i sub-001_space-T1w_FA.nii.gz -o sub-001_hemi-L_space-unfold_FA.nii.gz -t sub-001_hemi-L_from-corobl_to-unfold_mode-image_xfm.nii.gz -r sub-001_hemi-L_from-corobl_to-unfold_mode-image_xfm.nii.gz -v + antsApplyTransforms -i sub-001_space-T1w_FA.nii.gz -o sub-001_hemi-L_space-unfold_FA.nii.gz -t sub-001_hemi-L_from-T1w_to-unfold_mode-image_xfm.nii.gz -r sub-001_hemi-L_from-T1w_to-unfold_mode-image_xfm.nii.gz -v Subfield segmentations