@@ -827,7 +827,7 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
827
827
variant_suffix_fmt = 'space-{}_variant-{}_{}' .format
828
828
829
829
ds_confounds = pe .Node (DerivativesDataSink (
830
- base_directory = output_dir , suffix = 'confounds' ),
830
+ base_directory = output_dir , desc = 'confounds' , suffix = 'regressors ' ),
831
831
name = "ds_confounds" , run_without_submitting = True ,
832
832
mem_gb = DEFAULT_MEMORY_MIN_GB )
833
833
workflow .connect ([
@@ -837,17 +837,19 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
837
837
838
838
# Resample to T1w space
839
839
if 'T1w' in output_spaces :
840
- ds_bold_t1 = pe .Node (DerivativesDataSink (
841
- base_directory = output_dir , suffix = suffix_fmt ('T1w' , 'preproc' ), compress = True ),
840
+ ds_bold_t1 = pe .Node (
841
+ DerivativesDataSink (base_directory = output_dir , space = 'T1w' , desc = 'preproc' ,
842
+ keep_dtype = True , compress = True ),
842
843
name = 'ds_bold_t1' , run_without_submitting = True ,
843
844
mem_gb = DEFAULT_MEMORY_MIN_GB )
844
- ds_bold_t1_ref = pe .Node (DerivativesDataSink (
845
- base_directory = output_dir , suffix = suffix_fmt ( 'T1w' , 'boldref' ) ),
845
+ ds_bold_t1_ref = pe .Node (
846
+ DerivativesDataSink ( base_directory = output_dir , space = 'T1w' , suffix = 'boldref' ),
846
847
name = 'ds_bold_t1_ref' , run_without_submitting = True ,
847
848
mem_gb = DEFAULT_MEMORY_MIN_GB )
848
849
849
- ds_bold_mask_t1 = pe .Node (DerivativesDataSink (
850
- base_directory = output_dir , suffix = suffix_fmt ('T1w' , 'brainmask' )),
850
+ ds_bold_mask_t1 = pe .Node (
851
+ DerivativesDataSink (base_directory = output_dir , space = 'T1w' , desc = 'brain' ,
852
+ suffix = 'mask' ),
851
853
name = 'ds_bold_mask_t1' , run_without_submitting = True ,
852
854
mem_gb = DEFAULT_MEMORY_MIN_GB )
853
855
workflow .connect ([
@@ -861,17 +863,19 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
861
863
862
864
# Resample to template (default: MNI)
863
865
if 'template' in output_spaces :
864
- ds_bold_mni = pe .Node (DerivativesDataSink (
865
- base_directory = output_dir , suffix = suffix_fmt (template , 'preproc' ), compress = True ),
866
+ ds_bold_mni = pe .Node (
867
+ DerivativesDataSink (base_directory = output_dir , space = template , desc = 'preproc' ,
868
+ keep_dtype = True , compress = True ),
866
869
name = 'ds_bold_mni' , run_without_submitting = True ,
867
870
mem_gb = DEFAULT_MEMORY_MIN_GB )
868
- ds_bold_mni_ref = pe .Node (DerivativesDataSink (
869
- base_directory = output_dir , suffix = suffix_fmt ( template , 'boldref' ) ),
871
+ ds_bold_mni_ref = pe .Node (
872
+ DerivativesDataSink ( base_directory = output_dir , space = template , suffix = 'boldref' ),
870
873
name = 'ds_bold_mni_ref' , run_without_submitting = True ,
871
874
mem_gb = DEFAULT_MEMORY_MIN_GB )
872
875
873
- ds_bold_mask_mni = pe .Node (DerivativesDataSink (
874
- base_directory = output_dir , suffix = suffix_fmt (template , 'brainmask' )),
876
+ ds_bold_mask_mni = pe .Node (
877
+ DerivativesDataSink (base_directory = output_dir , space = template , desc = 'brain' ,
878
+ suffix = 'mask' ),
875
879
name = 'ds_bold_mask_mni' , run_without_submitting = True ,
876
880
mem_gb = DEFAULT_MEMORY_MIN_GB )
877
881
workflow .connect ([
@@ -885,11 +889,11 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
885
889
886
890
if freesurfer :
887
891
ds_bold_aseg_t1 = pe .Node (DerivativesDataSink (
888
- base_directory = output_dir , suffix = 'space-T1w_label -aseg_dseg' ),
892
+ base_directory = output_dir , space = 'T1w' , suffix = 'label -aseg_dseg' ),
889
893
name = 'ds_bold_aseg_t1' , run_without_submitting = True ,
890
894
mem_gb = DEFAULT_MEMORY_MIN_GB )
891
895
ds_bold_aparc_t1 = pe .Node (DerivativesDataSink (
892
- base_directory = output_dir , suffix = 'space-T1w_label -aparcaseg_dseg' ),
896
+ base_directory = output_dir , space = 'T1w' , suffix = 'label -aparcaseg_dseg' ),
893
897
name = 'ds_bold_aparc_t1' , run_without_submitting = True ,
894
898
mem_gb = DEFAULT_MEMORY_MIN_GB )
895
899
workflow .connect ([
@@ -902,7 +906,7 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
902
906
# fsaverage space
903
907
if freesurfer and any (space .startswith ('fs' ) for space in output_spaces ):
904
908
name_surfs = pe .MapNode (GiftiNameSource (
905
- pattern = r'(?P<LR>[lr])h.(?P<space>\w+).gii' , template = 'space-{space}. {LR}.func' ),
909
+ pattern = r'(?P<LR>[lr])h.(?P<space>\w+).gii' , template = 'space-{space}_hemi- {LR}.func' ),
906
910
iterfield = 'in_file' , name = 'name_surfs' , mem_gb = DEFAULT_MEMORY_MIN_GB ,
907
911
run_without_submitting = True )
908
912
ds_bold_surfs = pe .MapNode (DerivativesDataSink (base_directory = output_dir ),
@@ -922,8 +926,9 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,
922
926
name_cifti = pe .MapNode (
923
927
CiftiNameSource (), iterfield = ['variant' ], name = 'name_cifti' ,
924
928
mem_gb = DEFAULT_MEMORY_MIN_GB , run_without_submitting = True )
925
- cifti_bolds = pe .MapNode (DerivativesDataSink (
926
- base_directory = output_dir , compress = False ),
929
+ cifti_bolds = pe .MapNode (
930
+ DerivativesDataSink (base_directory = output_dir , desc = 'preproc' ,
931
+ keep_dtype = True , compress = False ),
927
932
iterfield = ['in_file' , 'suffix' ], name = 'cifti_bolds' ,
928
933
run_without_submitting = True , mem_gb = DEFAULT_MEMORY_MIN_GB )
929
934
cifti_key = pe .MapNode (DerivativesDataSink (
0 commit comments