From 10deca175b815d23044ccbf48ff7bdb03a072518 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 4 Jun 2024 12:54:06 -0400 Subject: [PATCH 1/3] Use BIDSURI in init_ds_boldmask_wf. --- fmriprep/workflows/bold/outputs.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fmriprep/workflows/bold/outputs.py b/fmriprep/workflows/bold/outputs.py index ddeada79..3c59c0d4 100644 --- a/fmriprep/workflows/bold/outputs.py +++ b/fmriprep/workflows/bold/outputs.py @@ -488,8 +488,14 @@ def init_ds_boldmask_wf( ) outputnode = pe.Node(niu.IdentityInterface(fields=['boldmask']), name='outputnode') - raw_sources = pe.Node(niu.Function(function=_bids_relative), name='raw_sources') - raw_sources.inputs.bids_root = bids_root + sources = pe.Node( + BIDSURI( + numinputs=1, + dataset_links=config.execution.dataset_links, + out_dir=str(config.execution.fmriprep_dir.absolute()), + ), + name='sources', + ) ds_boldmask = pe.Node( DerivativesDataSink( @@ -504,12 +510,12 @@ def init_ds_boldmask_wf( ) workflow.connect([ - (inputnode, raw_sources, [('source_files', 'in_files')]), + (inputnode, sources, [('source_files', 'in1')]), (inputnode, ds_boldmask, [ ('boldmask', 'in_file'), ('source_files', 'source_file'), ]), - (raw_sources, ds_boldmask, [('out', 'RawSources')]), + (sources, ds_boldmask, [('out', 'Sources')]), (ds_boldmask, outputnode, [('out_file', 'boldmask')]), ]) # fmt:skip From fcfb78d4278449df83b1ee1deaba175ca89940ba Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 4 Jun 2024 12:55:25 -0400 Subject: [PATCH 2/3] Drop unused import. --- fmriprep/workflows/bold/outputs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/fmriprep/workflows/bold/outputs.py b/fmriprep/workflows/bold/outputs.py index 3c59c0d4..ffb06681 100644 --- a/fmriprep/workflows/bold/outputs.py +++ b/fmriprep/workflows/bold/outputs.py @@ -29,7 +29,6 @@ from nipype.pipeline import engine as pe from niworkflows.interfaces.fixes import FixHeaderApplyTransforms as ApplyTransforms from niworkflows.utils.images import dseg_label -from smriprep.workflows.outputs import _bids_relative from fmriprep import config from fmriprep.config import DEFAULT_MEMORY_MIN_GB From 5e10ae6ce5c41366b8c7bd1df1042fc0126d885a Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Tue, 4 Jun 2024 12:56:08 -0400 Subject: [PATCH 3/3] Remove unused workflow parameter. --- fmriprep/workflows/bold/fit.py | 1 - fmriprep/workflows/bold/outputs.py | 1 - 2 files changed, 2 deletions(-) diff --git a/fmriprep/workflows/bold/fit.py b/fmriprep/workflows/bold/fit.py index 51ce1961..f66d49eb 100644 --- a/fmriprep/workflows/bold/fit.py +++ b/fmriprep/workflows/bold/fit.py @@ -474,7 +474,6 @@ def init_bold_fit_wf( name='ds_coreg_boldref_wf', ) ds_boldmask_wf = init_ds_boldmask_wf( - bids_root=layout.root, output_dir=config.execution.fmriprep_dir, desc='brain', name='ds_boldmask_wf', diff --git a/fmriprep/workflows/bold/outputs.py b/fmriprep/workflows/bold/outputs.py index ffb06681..4f3450b1 100644 --- a/fmriprep/workflows/bold/outputs.py +++ b/fmriprep/workflows/bold/outputs.py @@ -473,7 +473,6 @@ def init_ds_boldref_wf( def init_ds_boldmask_wf( *, - bids_root, output_dir, desc: str, name='ds_boldmask_wf',