33
33
from .bold import init_func_preproc_wf
34
34
35
35
36
- def init_fmriprep_wf (subject_list , task_id , run_uuid ,
36
+ def init_fmriprep_wf (subject_list , task_id , run_uuid , work_dir , output_dir , bids_dir ,
37
37
ignore , debug , low_mem , anat_only , longitudinal , t2s_coreg ,
38
- omp_nthreads , skull_strip_template , work_dir , output_dir , bids_dir ,
38
+ omp_nthreads , skull_strip_template , skull_strip_fixed_seed ,
39
39
freesurfer , output_spaces , template , medial_surface_nan , cifti_output , hires ,
40
40
use_bbr , bold2t1w_dof , fmap_bspline , fmap_demean , use_syn , force_syn ,
41
41
use_aroma , ignore_aroma_err , aroma_melodic_dim , template_out_grid ):
@@ -56,6 +56,9 @@ def init_fmriprep_wf(subject_list, task_id, run_uuid,
56
56
wf = init_fmriprep_wf(subject_list=['fmripreptest'],
57
57
task_id='',
58
58
run_uuid='X',
59
+ work_dir='.',
60
+ output_dir='.',
61
+ bids_dir='.',
59
62
ignore=[],
60
63
debug=False,
61
64
low_mem=False,
@@ -64,9 +67,7 @@ def init_fmriprep_wf(subject_list, task_id, run_uuid,
64
67
t2s_coreg=False,
65
68
omp_nthreads=1,
66
69
skull_strip_template='OASIS',
67
- work_dir='.',
68
- output_dir='.',
69
- bids_dir='.',
70
+ skull_strip_fixed_seed=False,
70
71
freesurfer=True,
71
72
output_spaces=['T1w', 'fsnative',
72
73
'template', 'fsaverage5'],
@@ -94,6 +95,12 @@ def init_fmriprep_wf(subject_list, task_id, run_uuid,
94
95
Task ID of BOLD series to preprocess, or ``None`` to preprocess all
95
96
run_uuid : str
96
97
Unique identifier for execution instance
98
+ work_dir : str
99
+ Directory in which to store workflow execution state and temporary files
100
+ output_dir : str
101
+ Directory in which to save derivatives
102
+ bids_dir : str
103
+ Root directory of BIDS dataset
97
104
ignore : list
98
105
Preprocessing steps to skip (may include "slicetiming", "fieldmaps")
99
106
debug : bool
@@ -111,12 +118,9 @@ def init_fmriprep_wf(subject_list, task_id, run_uuid,
111
118
Maximum number of threads an individual process may use
112
119
skull_strip_template : str
113
120
Name of ANTs skull-stripping template ('OASIS' or 'NKI')
114
- work_dir : str
115
- Directory in which to store workflow execution state and temporary files
116
- output_dir : str
117
- Directory in which to save derivatives
118
- bids_dir : str
119
- Root directory of BIDS dataset
121
+ skull_strip_fixed_seed : bool
122
+ Do not use a random seed for skull-stripping - will ensure
123
+ run-to-run replicability when used with --omp-nthreads 1
120
124
freesurfer : bool
121
125
Enable FreeSurfer surface reconstruction (may increase runtime)
122
126
output_spaces : list
@@ -176,6 +180,9 @@ def init_fmriprep_wf(subject_list, task_id, run_uuid,
176
180
single_subject_wf = init_single_subject_wf (subject_id = subject_id ,
177
181
task_id = task_id ,
178
182
name = "single_subject_" + subject_id + "_wf" ,
183
+ reportlets_dir = reportlets_dir ,
184
+ output_dir = output_dir ,
185
+ bids_dir = bids_dir ,
179
186
ignore = ignore ,
180
187
debug = debug ,
181
188
low_mem = low_mem ,
@@ -184,9 +191,7 @@ def init_fmriprep_wf(subject_list, task_id, run_uuid,
184
191
t2s_coreg = t2s_coreg ,
185
192
omp_nthreads = omp_nthreads ,
186
193
skull_strip_template = skull_strip_template ,
187
- reportlets_dir = reportlets_dir ,
188
- output_dir = output_dir ,
189
- bids_dir = bids_dir ,
194
+ skull_strip_fixed_seed = skull_strip_fixed_seed ,
190
195
freesurfer = freesurfer ,
191
196
output_spaces = output_spaces ,
192
197
template = template ,
@@ -218,10 +223,10 @@ def init_fmriprep_wf(subject_list, task_id, run_uuid,
218
223
return fmriprep_wf
219
224
220
225
221
- def init_single_subject_wf (subject_id , task_id , name ,
226
+ def init_single_subject_wf (subject_id , task_id , name , reportlets_dir , output_dir , bids_dir ,
222
227
ignore , debug , low_mem , anat_only , longitudinal , t2s_coreg ,
223
- omp_nthreads , skull_strip_template , reportlets_dir , output_dir ,
224
- bids_dir , freesurfer , output_spaces , template , medial_surface_nan ,
228
+ omp_nthreads , skull_strip_template , skull_strip_fixed_seed ,
229
+ freesurfer , output_spaces , template , medial_surface_nan ,
225
230
cifti_output , hires , use_bbr , bold2t1w_dof , fmap_bspline , fmap_demean ,
226
231
use_syn , force_syn , template_out_grid ,
227
232
use_aroma , aroma_melodic_dim , ignore_aroma_err ):
@@ -241,25 +246,26 @@ def init_single_subject_wf(subject_id, task_id, name,
241
246
242
247
from fmriprep.workflows.base import init_single_subject_wf
243
248
wf = init_single_subject_wf(subject_id='test',
244
- name='single_subject_wf',
245
249
task_id='',
246
- longitudinal=False,
247
- t2s_coreg=False,
248
- omp_nthreads=1,
249
- freesurfer=True,
250
+ name='single_subject_wf',
250
251
reportlets_dir='.',
251
252
output_dir='.',
252
253
bids_dir='.',
254
+ ignore=[],
255
+ debug=False,
256
+ low_mem=False,
257
+ anat_only=False,
258
+ longitudinal=False,
259
+ t2s_coreg=False,
260
+ omp_nthreads=1,
253
261
skull_strip_template='OASIS',
262
+ skull_strip_fixed_seed=False,
263
+ freesurfer=True,
254
264
template='MNI152NLin2009cAsym',
255
265
output_spaces=['T1w', 'fsnative',
256
266
'template', 'fsaverage5'],
257
267
medial_surface_nan=False,
258
268
cifti_output=False,
259
- ignore=[],
260
- debug=False,
261
- low_mem=False,
262
- anat_only=False,
263
269
hires=True,
264
270
use_bbr=True,
265
271
bold2t1w_dof=9,
@@ -297,6 +303,9 @@ def init_single_subject_wf(subject_id, task_id, name,
297
303
Maximum number of threads an individual process may use
298
304
skull_strip_template : str
299
305
Name of ANTs skull-stripping template ('OASIS' or 'NKI')
306
+ skull_strip_fixed_seed : bool
307
+ Do not use a random seed for skull-stripping - will ensure
308
+ run-to-run replicability when used with --omp-nthreads 1
300
309
reportlets_dir : str
301
310
Directory in which to save reportlets
302
311
output_dir : str
@@ -423,6 +432,7 @@ def init_single_subject_wf(subject_id, task_id, name,
423
432
# Preprocessing of T1w (includes registration to MNI)
424
433
anat_preproc_wf = init_anat_preproc_wf (name = "anat_preproc_wf" ,
425
434
skull_strip_template = skull_strip_template ,
435
+ skull_strip_fixed_seed = skull_strip_fixed_seed ,
426
436
output_spaces = output_spaces ,
427
437
template = template ,
428
438
debug = debug ,
0 commit comments