@@ -318,6 +318,9 @@ def init_single_subject_wf(subject_id: str):
318
318
"""
319
319
320
320
for bold_file in subject_data ["bold" ]:
321
+ ica_aroma_wf = init_ica_aroma_wf (bold_file = bold_file )
322
+ ica_aroma_wf .__desc__ = func_pre_desc + (ica_aroma_wf .__desc__ or "" )
323
+
321
324
functional_cache = {}
322
325
if config .execution .derivatives :
323
326
# Collect native-space derivatives and warp them to MNI152NLin6Asym
@@ -332,30 +335,33 @@ def init_single_subject_wf(subject_id: str):
332
335
entities = entities ,
333
336
)
334
337
)
338
+
339
+ resample_raw_wf = init_resample_raw_wf (
340
+ bold_file = bold_file ,
341
+ precomputed = functional_cache ,
342
+ )
343
+ workflow .connect ([
344
+ (resample_raw_wf , ica_aroma_wf , [
345
+ ("outputnode.bold_std" , "inputnode.bold_std" ),
346
+ ("outputnode.bold_mask_std" , "inputnode.bold_mask_std" ),
347
+ ]),
348
+ ]) # fmt:skip
335
349
else :
336
350
# Collect standard-space derivatives
337
351
from fmripost_aroma .utils .bids import collect_derivatives
338
352
339
- ...
340
-
341
- ica_aroma_wf = init_ica_aroma_wf (
342
- bold_file = bold_file ,
343
- precomputed = functional_cache ,
344
- )
345
- ica_aroma_wf .__desc__ = func_pre_desc + (ica_aroma_wf .__desc__ or "" )
353
+ functional_cache .update (
354
+ collect_derivatives (
355
+ derivatives_dir = deriv_dir ,
356
+ entities = entities ,
357
+ )
358
+ )
359
+ ica_aroma_wf .inputs .inputnode .bold_std = functional_cache ["bold_std" ]
360
+ ica_aroma_wf .inputs .inputnode .bold_mask_std = functional_cache ["bold_mask_std" ]
346
361
347
- # fmt:off
348
- workflow .connect ([
349
- (inputnode , ica_aroma_wf , [
350
- ('bold_std' , 'inputnode.bold_std' ),
351
- ("bold_mask_std" , "inputnode.bold_mask_std" ),
352
- ("movpar_file" , "inputnode.movpar_file" ),
353
- ("name_source" , "inputnode.name_source" ),
354
- ("skip_vols" , "inputnode.skip_vols" ),
355
- ("spatial_reference" , "inputnode.spatial_reference" ),
356
- ]),
357
- ])
358
- # fmt:on
362
+ ica_aroma_wf .inputs .inputnode .movpar_file = functional_cache ["movpar_file" ]
363
+ ica_aroma_wf .inputs .inputnode .skip_vols = functional_cache ["skip_vols" ]
364
+ ica_aroma_wf .inputs .inputnode .spatial_reference = functional_cache ["spatial_reference" ]
359
365
360
366
return clean_datasinks (workflow )
361
367
0 commit comments