@@ -269,6 +269,7 @@ def init_single_subject_wf(subject_id: str):
269
269
subject_data = subject_data ,
270
270
anat_only = config .workflow .anat_only ,
271
271
subject_id = subject_id ,
272
+ anat_derivatives = anatomical_cache if anatomical_cache else None ,
272
273
),
273
274
name = 'bidssrc' ,
274
275
)
@@ -338,9 +339,24 @@ def init_single_subject_wf(subject_id: str):
338
339
skull_strip_fixed_seed = config .workflow .skull_strip_fixed_seed ,
339
340
)
340
341
342
+ # allow to run with anat-fast-track on fMRI-only dataset
343
+ if anatomical_cache and not subject_data ['t1w' ]:
344
+ workflow .connect ([
345
+ (bidssrc , bids_info , [(('bold' , fix_multi_T1w_source_name ), 'in_file' )]),
346
+ (anat_fit_wf , summary , [('outputnode.t1w_preproc' , 't1w' )]),
347
+ (anat_fit_wf , ds_report_summary , [('outputnode.t1w_preproc' , 'source_file' )]),
348
+ (anat_fit_wf , ds_report_about , [('outputnode.t1w_preproc' , 'source_file' )]),
349
+ ])
350
+ else :
351
+ workflow .connect ([
352
+ (bidssrc , bids_info , [(('t1w' , fix_multi_T1w_source_name ), 'in_file' )]),
353
+ (bidssrc , summary , [('t1w' , 't1w' )]),
354
+ (bidssrc , ds_report_summary , [(('t1w' , fix_multi_T1w_source_name ), 'source_file' )]),
355
+ (bidssrc , ds_report_about , [(('t1w' , fix_multi_T1w_source_name ), 'source_file' )]),
356
+ ])
357
+
341
358
workflow .connect ([
342
359
(inputnode , anat_fit_wf , [('subjects_dir' , 'inputnode.subjects_dir' )]),
343
- (bidssrc , bids_info , [(('t1w' , fix_multi_T1w_source_name ), 'in_file' )]),
344
360
(bidssrc , anat_fit_wf , [
345
361
('t1w' , 'inputnode.t1w' ),
346
362
('t2w' , 'inputnode.t2w' ),
@@ -350,10 +366,8 @@ def init_single_subject_wf(subject_id: str):
350
366
(bids_info , anat_fit_wf , [(('subject' , _prefix ), 'inputnode.subject_id' )]),
351
367
# Reporting connections
352
368
(inputnode , summary , [('subjects_dir' , 'subjects_dir' )]),
353
- (bidssrc , summary , [('t1w' , 't1w' ), ( ' t2w' , 't2w' ), ('bold' , 'bold' )]),
369
+ (bidssrc , summary , [('t2w' , 't2w' ), ('bold' , 'bold' )]),
354
370
(bids_info , summary , [('subject' , 'subject_id' )]),
355
- (bidssrc , ds_report_summary , [(('t1w' , fix_multi_T1w_source_name ), 'source_file' )]),
356
- (bidssrc , ds_report_about , [(('t1w' , fix_multi_T1w_source_name ), 'source_file' )]),
357
371
(summary , ds_report_summary , [('out_report' , 'in_file' )]),
358
372
(about , ds_report_about , [('out_report' , 'in_file' )]),
359
373
]) # fmt:skip
0 commit comments