Skip to content

Commit 3d541d5

Browse files
committed
RF: Move confounds datasink into bold_wf
1 parent ad9f868 commit 3d541d5

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

fmriprep/workflows/bold/base.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,19 @@ def init_bold_wf(
452452
name="bold_confounds_wf",
453453
)
454454

455+
ds_confounds = pe.Node(
456+
DerivativesDataSink(
457+
base_directory=fmriprep_dir,
458+
desc='confounds',
459+
suffix='timeseries',
460+
dismiss_entities=("echo",),
461+
),
462+
name="ds_confounds",
463+
run_without_submitting=True,
464+
mem_gb=config.DEFAULT_MEMORY_MIN_GB,
465+
)
466+
ds_confounds.inputs.source_file = bold_file
467+
455468
workflow.connect([
456469
(inputnode, bold_confounds_wf, [
457470
('t1w_tpms', 'inputnode.t1w_tpms'),
@@ -467,6 +480,10 @@ def init_bold_wf(
467480
(bold_native_wf, bold_confounds_wf, [
468481
('outputnode.bold_native', 'inputnode.bold'),
469482
]),
483+
(bold_confounds_wf, ds_confounds, [
484+
('outputnode.confounds_file', 'in_file'),
485+
('outputnode.confounds_metadata', 'meta_dict'),
486+
]),
470487
]) # fmt:skip
471488

472489
# Fill-in datasinks of reportlets seen so far

fmriprep/workflows/bold/outputs.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -961,17 +961,6 @@ def init_func_derivatives_wf(
961961
raw_sources = pe.Node(niu.Function(function=_bids_relative), name='raw_sources')
962962
raw_sources.inputs.bids_root = bids_root
963963

964-
ds_confounds = pe.Node(
965-
DerivativesDataSink(
966-
base_directory=output_dir,
967-
desc='confounds',
968-
suffix='timeseries',
969-
dismiss_entities=("echo",),
970-
),
971-
name="ds_confounds",
972-
run_without_submitting=True,
973-
mem_gb=DEFAULT_MEMORY_MIN_GB,
974-
)
975964
ds_ref_t1w_xfm = pe.Node(
976965
DerivativesDataSink(
977966
base_directory=output_dir,
@@ -1001,9 +990,6 @@ def init_func_derivatives_wf(
1001990
# fmt:off
1002991
workflow.connect([
1003992
(inputnode, raw_sources, [('all_source_files', 'in_files')]),
1004-
(inputnode, ds_confounds, [('source_file', 'source_file'),
1005-
('confounds', 'in_file'),
1006-
('confounds_metadata', 'meta_dict')]),
1007993
(inputnode, ds_ref_t1w_xfm, [('source_file', 'source_file'),
1008994
('bold2anat_xfm', 'in_file')]),
1009995
(inputnode, ds_ref_t1w_inv_xfm, [('source_file', 'source_file'),

0 commit comments

Comments
 (0)