Skip to content

Commit 662a58d

Browse files
committed
FIX: Correctly check SDCFlows registry of IntendedFor files
1 parent d94d442 commit 662a58d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

dmriprep/workflows/dwi/base.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def init_dwi_preproc_wf(dwi_file, has_fieldmap=False):
5252
fmap_id
5353
The BIDS modality label of the fieldmap being used
5454
55-
5655
Outputs
5756
-------
5857
dwi_reference
@@ -81,13 +80,17 @@ def init_dwi_preproc_wf(dwi_file, has_fieldmap=False):
8180
)
8281

8382
if has_fieldmap:
83+
import re
8484
from sdcflows.fieldmaps import get_identifier
8585

86-
estimator_key = get_identifier(dwi_file)
86+
dwi_rel = re.sub(
87+
r"^sub-[a-zA-Z0-9]*/", "", str(dwi_file.relative_to(layout.root))
88+
)
89+
estimator_key = get_identifier(dwi_rel)
8790
if not estimator_key:
8891
has_fieldmap = False
8992
config.loggers.workflow.critical(
90-
f"None of the available B0 fieldmaps are associated to <{dwi_file}>"
93+
f"None of the available B0 fieldmaps are associated to <{dwi_rel}>"
9194
)
9295

9396
# Build workflow
@@ -167,7 +170,8 @@ def init_dwi_preproc_wf(dwi_file, has_fieldmap=False):
167170

168171
ds_report_reg = pe.Node(
169172
DerivativesDataSink(
170-
base_directory=str(config.execution.output_dir), datatype="figures",
173+
base_directory=str(config.execution.output_dir),
174+
datatype="figures",
171175
),
172176
name="ds_report_reg",
173177
run_without_submitting=True,

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ install_requires =
2929
numpy
3030
pybids >= 0.11.1
3131
pyyaml
32-
sdcflows @ git+https://github.com/nipreps/sdcflows.git@9b5c167d81e7670ef2121151b2d59fe190c0167c
32+
sdcflows @ git+https://github.com/nipreps/sdcflows.git@b3dc469cfa0a9bbffd94fa55976362b6fbeebb8c
3333
smriprep >= 0.8.0rc0
3434
templateflow ~= 0.6
3535
toml

0 commit comments

Comments
 (0)