@@ -823,11 +823,8 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
823
823
'nonaggr_denoised_file' , 'bold_cifti' , 'cifti_variant' ]),
824
824
name = 'inputnode' )
825
825
826
- suffix_fmt = 'space-{}_{}' .format
827
- variant_suffix_fmt = 'space-{}_variant-{}_{}' .format
828
-
829
826
ds_confounds = pe .Node (DerivativesDataSink (
830
- base_directory = output_dir , suffix = 'confounds' ),
827
+ base_directory = output_dir , desc = 'confounds' , suffix = 'regressors ' ),
831
828
name = "ds_confounds" , run_without_submitting = True ,
832
829
mem_gb = DEFAULT_MEMORY_MIN_GB )
833
830
workflow .connect ([
@@ -837,17 +834,19 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
837
834
838
835
# Resample to T1w space
839
836
if 'T1w' in output_spaces :
840
- ds_bold_t1 = pe .Node (DerivativesDataSink (
841
- base_directory = output_dir , suffix = suffix_fmt ('T1w' , 'preproc' ), compress = True ),
837
+ ds_bold_t1 = pe .Node (
838
+ DerivativesDataSink (base_directory = output_dir , space = 'T1w' , desc = 'preproc' ,
839
+ keep_dtype = True , compress = True ),
842
840
name = 'ds_bold_t1' , run_without_submitting = True ,
843
841
mem_gb = DEFAULT_MEMORY_MIN_GB )
844
- ds_bold_t1_ref = pe .Node (DerivativesDataSink (
845
- base_directory = output_dir , suffix = suffix_fmt ( 'T1w' , 'boldref' ) ),
842
+ ds_bold_t1_ref = pe .Node (
843
+ DerivativesDataSink ( base_directory = output_dir , space = 'T1w' , suffix = 'boldref' ),
846
844
name = 'ds_bold_t1_ref' , run_without_submitting = True ,
847
845
mem_gb = DEFAULT_MEMORY_MIN_GB )
848
846
849
- ds_bold_mask_t1 = pe .Node (DerivativesDataSink (
850
- base_directory = output_dir , suffix = suffix_fmt ('T1w' , 'brainmask' )),
847
+ ds_bold_mask_t1 = pe .Node (
848
+ DerivativesDataSink (base_directory = output_dir , space = 'T1w' , desc = 'brain' ,
849
+ suffix = 'mask' ),
851
850
name = 'ds_bold_mask_t1' , run_without_submitting = True ,
852
851
mem_gb = DEFAULT_MEMORY_MIN_GB )
853
852
workflow .connect ([
@@ -861,17 +860,19 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
861
860
862
861
# Resample to template (default: MNI)
863
862
if 'template' in output_spaces :
864
- ds_bold_mni = pe .Node (DerivativesDataSink (
865
- base_directory = output_dir , suffix = suffix_fmt (template , 'preproc' ), compress = True ),
863
+ ds_bold_mni = pe .Node (
864
+ DerivativesDataSink (base_directory = output_dir , space = template , desc = 'preproc' ,
865
+ keep_dtype = True , compress = True ),
866
866
name = 'ds_bold_mni' , run_without_submitting = True ,
867
867
mem_gb = DEFAULT_MEMORY_MIN_GB )
868
- ds_bold_mni_ref = pe .Node (DerivativesDataSink (
869
- base_directory = output_dir , suffix = suffix_fmt ( template , 'boldref' ) ),
868
+ ds_bold_mni_ref = pe .Node (
869
+ DerivativesDataSink ( base_directory = output_dir , space = template , suffix = 'boldref' ),
870
870
name = 'ds_bold_mni_ref' , run_without_submitting = True ,
871
871
mem_gb = DEFAULT_MEMORY_MIN_GB )
872
872
873
- ds_bold_mask_mni = pe .Node (DerivativesDataSink (
874
- base_directory = output_dir , suffix = suffix_fmt (template , 'brainmask' )),
873
+ ds_bold_mask_mni = pe .Node (
874
+ DerivativesDataSink (base_directory = output_dir , space = template , desc = 'brain' ,
875
+ suffix = 'mask' ),
875
876
name = 'ds_bold_mask_mni' , run_without_submitting = True ,
876
877
mem_gb = DEFAULT_MEMORY_MIN_GB )
877
878
workflow .connect ([
@@ -885,11 +886,11 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
885
886
886
887
if freesurfer :
887
888
ds_bold_aseg_t1 = pe .Node (DerivativesDataSink (
888
- base_directory = output_dir , suffix = 'space-T1w_label -aseg_dseg' ),
889
+ base_directory = output_dir , space = 'T1w' , suffix = 'label -aseg_dseg' ),
889
890
name = 'ds_bold_aseg_t1' , run_without_submitting = True ,
890
891
mem_gb = DEFAULT_MEMORY_MIN_GB )
891
892
ds_bold_aparc_t1 = pe .Node (DerivativesDataSink (
892
- base_directory = output_dir , suffix = 'space-T1w_label -aparcaseg_dseg' ),
893
+ base_directory = output_dir , space = 'T1w' , suffix = 'label -aparcaseg_dseg' ),
893
894
name = 'ds_bold_aparc_t1' , run_without_submitting = True ,
894
895
mem_gb = DEFAULT_MEMORY_MIN_GB )
895
896
workflow .connect ([
@@ -902,7 +903,7 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
902
903
# fsaverage space
903
904
if freesurfer and any (space .startswith ('fs' ) for space in output_spaces ):
904
905
name_surfs = pe .MapNode (GiftiNameSource (
905
- pattern = r'(?P<LR>[lr])h.(?P<space>\w+).gii' , template = 'space-{space}. {LR}.func' ),
906
+ pattern = r'(?P<LR>[lr])h.(?P<space>\w+).gii' , template = 'space-{space}_hemi- {LR}.func' ),
906
907
iterfield = 'in_file' , name = 'name_surfs' , mem_gb = DEFAULT_MEMORY_MIN_GB ,
907
908
run_without_submitting = True )
908
909
ds_bold_surfs = pe .MapNode (DerivativesDataSink (base_directory = output_dir ),
@@ -922,8 +923,8 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
922
923
name_cifti = pe .MapNode (
923
924
CiftiNameSource (), iterfield = ['variant' ], name = 'name_cifti' ,
924
925
mem_gb = DEFAULT_MEMORY_MIN_GB , run_without_submitting = True )
925
- cifti_bolds = pe .MapNode (DerivativesDataSink (
926
- base_directory = output_dir , compress = False ),
926
+ cifti_bolds = pe .MapNode (
927
+ DerivativesDataSink ( base_directory = output_dir , desc = 'preproc' , compress = False ),
927
928
iterfield = ['in_file' , 'suffix' ], name = 'cifti_bolds' ,
928
929
run_without_submitting = True , mem_gb = DEFAULT_MEMORY_MIN_GB )
929
930
cifti_key = pe .MapNode (DerivativesDataSink (
@@ -946,12 +947,12 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
946
947
name = "ds_aroma_noise_ics" , run_without_submitting = True ,
947
948
mem_gb = DEFAULT_MEMORY_MIN_GB )
948
949
ds_melodic_mix = pe .Node (DerivativesDataSink (
949
- base_directory = output_dir , suffix = 'MELODICmix ' ),
950
+ base_directory = output_dir , desc = 'MELODIC' , suffix = 'mixing ' ),
950
951
name = "ds_melodic_mix" , run_without_submitting = True ,
951
952
mem_gb = DEFAULT_MEMORY_MIN_GB )
952
- ds_aroma_mni = pe .Node (DerivativesDataSink (
953
- base_directory = output_dir , suffix = variant_suffix_fmt (
954
- template , 'smoothAROMAnonaggr' , 'preproc' ) ),
953
+ ds_aroma_mni = pe .Node (
954
+ DerivativesDataSink ( base_directory = output_dir , space = template ,
955
+ desc = 'smoothAROMAnonaggr' , keep_dtype = True ),
955
956
name = 'ds_aroma_mni' , run_without_submitting = True ,
956
957
mem_gb = DEFAULT_MEMORY_MIN_GB )
957
958
0 commit comments