21
21
22
22
from niworkflows .engine .workflows import LiterateWorkflow as Workflow
23
23
from niworkflows .interfaces .cifti import GenerateCifti
24
+ from niworkflows .interfaces .utils import DictMerge
24
25
25
26
from ...utils .meepi import combine_meepi_source
26
27
@@ -875,10 +876,17 @@ def init_func_preproc_wf(
875
876
function = _to_join ),
876
877
name = 'aroma_confounds' )
877
878
879
+ mrg_conf_metadata = pe .Node (niu .Merge (2 ), name = 'merge_confound_metadata' ,
880
+ run_without_submitting = True )
881
+ mrg_conf_metadata2 = pe .Node (DictMerge (), name = 'merge_confound_metadata2' ,
882
+ run_without_submitting = True )
878
883
workflow .disconnect ([
879
884
(bold_confounds_wf , outputnode , [
880
885
('outputnode.confounds_file' , 'confounds' ),
881
886
]),
887
+ (bold_confounds_wf , outputnode , [
888
+ ('outputnode.confounds_metadata' , 'confounds_metadata' ),
889
+ ]),
882
890
])
883
891
workflow .connect ([
884
892
(bold_std_trans_wf , ica_aroma_wf , [
@@ -893,13 +901,19 @@ def init_func_preproc_wf(
893
901
('outputnode.skip_vols' , 'inputnode.skip_vols' )]),
894
902
(bold_confounds_wf , join , [
895
903
('outputnode.confounds_file' , 'in_file' )]),
904
+ (bold_confounds_wf , mrg_conf_metadata ,
905
+ [('outputnode.confounds_metadata' , 'in1' )]),
896
906
(ica_aroma_wf , join ,
897
907
[('outputnode.aroma_confounds' , 'join_file' )]),
908
+ (ica_aroma_wf , mrg_conf_metadata ,
909
+ [('outputnode.aroma_metadata' , 'in2' )]),
910
+ (mrg_conf_metadata , mrg_conf_metadata2 , [('out' , 'in_dicts' )]),
898
911
(ica_aroma_wf , outputnode ,
899
912
[('outputnode.aroma_noise_ics' , 'aroma_noise_ics' ),
900
913
('outputnode.melodic_mix' , 'melodic_mix' ),
901
914
('outputnode.nonaggr_denoised_file' , 'nonaggr_denoised_file' )]),
902
915
(join , outputnode , [('out_file' , 'confounds' )]),
916
+ (mrg_conf_metadata2 , outputnode , [('out_dict' , 'confounds_metadata' )]),
903
917
])
904
918
905
919
# SURFACES ##################################################################################
0 commit comments