Skip to content

Commit 184fdad

Browse files
committed
docs: fix building dwi-preproc from docstring
1 parent 1c217b6 commit 184fdad

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

dmriprep/workflows/dwi/base.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ def init_dwi_preproc_wf(dwi_file):
2121
from dmriprep import config
2222
from dmriprep.workflows.dwi.base import init_dwi_preproc_wf
2323
with mock_config():
24-
wf = init_dwi_preproc_wf()
24+
wf = init_dwi_preproc_wf(
25+
f"{config.execution.layout.root}/"
26+
"sub-THP0005/dwi/sub-THP0005_dwi.nii.gz"
27+
)
2528
2629
Parameters
2730
----------
@@ -139,7 +142,8 @@ def init_dwi_preproc_wf(dwi_file):
139142

140143
ds_report_reg = pe.Node(
141144
DerivativesDataSink(
142-
base_directory=str(config.execution.output_dir), datatype="figures",
145+
base_directory=str(config.execution.output_dir),
146+
datatype="figures",
143147
),
144148
name="ds_report_reg",
145149
run_without_submitting=True,
@@ -199,6 +203,7 @@ def _get_wf_name(filename):
199203
200204
"""
201205
from pathlib import Path
206+
202207
fname = Path(filename).name.rpartition(".nii")[0].replace("_dwi", "_wf")
203-
fname_nosub = '_'.join(fname.split("_")[1:])
208+
fname_nosub = "_".join(fname.split("_")[1:])
204209
return f"dwi_preproc_{fname_nosub.replace('.', '_').replace(' ', '').replace('-', '_')}"

0 commit comments

Comments
 (0)