Skip to content

Commit acd563a

Browse files
committed
rf: Pass BOLD source_file to datasink workflows as kwarg
1 parent 440d3e2 commit acd563a

File tree

3 files changed

+45
-23
lines changed

3 files changed

+45
-23
lines changed

fmriprep/workflows/bold/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ def init_bold_wf(
314314

315315
if boldref_out or echos_out:
316316
ds_bold_native_wf = init_ds_bold_native_wf(
317+
source_file=bold_series,
317318
bids_root=str(config.execution.bids_dir),
318319
output_dir=fmriprep_dir,
319320
bold_output=boldref_out,
@@ -372,7 +373,6 @@ def init_bold_wf(
372373
for node in workflow.list_node_names():
373374
if node.split('.')[-1].startswith('ds_report'):
374375
workflow.get_node(node).inputs.base_directory = fmriprep_dir
375-
workflow.get_node(node).inputs.source_file = bold_file
376376
return workflow
377377

378378
# Pass along BOLD reference as a source file for provenance
@@ -416,6 +416,7 @@ def init_bold_wf(
416416
# Full derivatives, including resampled BOLD series
417417
if nonstd_spaces.intersection(('anat', 'T1w')):
418418
ds_bold_t1_wf = init_ds_volumes_wf(
419+
source_file=bold_file,
419420
bids_root=str(config.execution.bids_dir),
420421
output_dir=fmriprep_dir,
421422
multiecho=multiecho,
@@ -453,6 +454,7 @@ def init_bold_wf(
453454
name='bold_std_wf',
454455
)
455456
ds_bold_std_wf = init_ds_volumes_wf(
457+
source_file=bold_file,
456458
bids_root=str(config.execution.bids_dir),
457459
output_dir=fmriprep_dir,
458460
multiecho=multiecho,

fmriprep/workflows/bold/fit.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ def init_bold_fit_wf(
348348
)
349349

350350
func_fit_reports_wf = init_func_fit_reports_wf(
351+
source_file=bold_file,
351352
sdc_correction=fieldmap_id is not None,
352353
freesurfer=config.workflow.run_reconall,
353354
output_dir=config.execution.fmriprep_dir,
@@ -368,7 +369,6 @@ def init_bold_fit_wf(
368369
('hmc_xforms', 'motion_xfm'),
369370
]),
370371
(inputnode, func_fit_reports_wf, [
371-
('bold_file', 'inputnode.source_file'),
372372
('t1w_preproc', 'inputnode.t1w_preproc'),
373373
# May not need all of these
374374
('t1w_mask', 'inputnode.t1w_mask'),
@@ -399,6 +399,7 @@ def init_bold_fit_wf(
399399
hmc_boldref_wf.inputs.inputnode.dummy_scans = config.workflow.dummy_scans
400400

401401
ds_hmc_boldref_wf = init_ds_boldref_wf(
402+
source_file=bold_file,
402403
bids_root=layout.root,
403404
output_dir=config.execution.fmriprep_dir,
404405
desc='hmc',
@@ -445,6 +446,7 @@ def init_bold_fit_wf(
445446
)
446447

447448
ds_hmc_wf = init_ds_hmc_wf(
449+
source_file=bold_file,
448450
bids_root=layout.root,
449451
output_dir=config.execution.fmriprep_dir,
450452
)
@@ -513,6 +515,7 @@ def init_bold_fit_wf(
513515
)
514516

515517
ds_fmapreg_wf = init_ds_registration_wf(
518+
source_file=bold_file,
516519
bids_root=layout.root,
517520
output_dir=config.execution.fmriprep_dir,
518521
source='boldref',
@@ -561,12 +564,14 @@ def init_bold_fit_wf(
561564
)
562565

563566
ds_coreg_boldref_wf = init_ds_boldref_wf(
567+
source_file=bold_file,
564568
bids_root=layout.root,
565569
output_dir=config.execution.fmriprep_dir,
566570
desc='coreg',
567571
name='ds_coreg_boldref_wf',
568572
)
569573
ds_boldmask_wf = init_ds_boldmask_wf(
574+
source_file=bold_file,
570575
output_dir=config.execution.fmriprep_dir,
571576
desc='brain',
572577
name='ds_boldmask_wf',
@@ -672,6 +677,7 @@ def init_bold_fit_wf(
672677
)
673678

674679
ds_boldreg_wf = init_ds_registration_wf(
680+
source_file=bold_file,
675681
bids_root=layout.root,
676682
output_dir=config.execution.fmriprep_dir,
677683
source='boldref',

0 commit comments

Comments
 (0)