@@ -67,12 +67,14 @@ def init_fmriprep_wf(
67
67
use_bbr ,
68
68
use_syn ,
69
69
work_dir ,
70
+ bids_filters ,
70
71
):
71
72
"""
72
73
Build *fMRIPrep*'s pipeline.
73
74
74
75
This workflow organizes the execution of FMRIPREP, with a sub-workflow for
75
76
each subject.
77
+
76
78
If FreeSurfer's ``recon-all`` is to be run, a corresponding folder is created
77
79
and populated with any needed template subjects under the derivatives folder.
78
80
@@ -129,6 +131,7 @@ def init_fmriprep_wf(
129
131
use_bbr=True,
130
132
use_syn=True,
131
133
work_dir='.',
134
+ bids_filters=None,
132
135
)
133
136
134
137
@@ -213,6 +216,9 @@ def init_fmriprep_wf(
213
216
If fieldmaps are present and enabled, this is not run, by default.
214
217
work_dir : str
215
218
Directory in which to store workflow execution state and temporary files
219
+ bids_filters : dict
220
+ Provides finer specification of the pipeline input files using pybids entities filters.
221
+ A dict with the following structure {<suffix>:{<entity>:<filter>,...},...}
216
222
217
223
"""
218
224
fmriprep_wf = Workflow (name = 'fmriprep_wf' )
@@ -265,6 +271,7 @@ def init_fmriprep_wf(
265
271
use_aroma = use_aroma ,
266
272
use_bbr = use_bbr ,
267
273
use_syn = use_syn ,
274
+ bids_filters = bids_filters ,
268
275
)
269
276
270
277
single_subject_wf .config ['execution' ]['crashdump_dir' ] = (
@@ -316,6 +323,7 @@ def init_single_subject_wf(
316
323
use_aroma ,
317
324
use_bbr ,
318
325
use_syn ,
326
+ bids_filters ,
319
327
):
320
328
"""
321
329
This workflow organizes the preprocessing pipeline for a single subject.
@@ -377,6 +385,7 @@ def init_single_subject_wf(
377
385
use_aroma=False,
378
386
use_bbr=True,
379
387
use_syn=True,
388
+ bids_filters=None,
380
389
)
381
390
382
391
Parameters
@@ -463,6 +472,9 @@ def init_single_subject_wf(
463
472
use_syn : bool
464
473
**Experimental**: Enable ANTs SyN-based susceptibility distortion correction (SDC).
465
474
If fieldmaps are present and enabled, this is not run, by default.
475
+ bids_filters : dict
476
+ Provides finer specification of the pipeline input files using pybids entities filters.
477
+ A dict with the following structure {<suffix>:{<entity>:<filter>,...},...}
466
478
467
479
Inputs
468
480
------
@@ -477,7 +489,8 @@ def init_single_subject_wf(
477
489
'bold' : ['/completely/made/up/path/sub-01_task-nback_bold.nii.gz' ]
478
490
}
479
491
else :
480
- subject_data = collect_data (layout , subject_id , task_id , echo_idx )[0 ]
492
+ subject_data = collect_data (layout , subject_id , task_id , echo_idx ,
493
+ bids_filters = bids_filters )[0 ]
481
494
482
495
# Make sure we always go through these two checks
483
496
if not anat_only and subject_data ['bold' ] == []:
0 commit comments