Skip to content

Commit 3134728

Browse files
committed
propagate spike and CompCor specs
1 parent 22c9e4b commit 3134728

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

fmriprep/workflows/base.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def init_fmriprep_wf(subject_list, task_id, echo_idx, run_uuid, work_dir, output
3939
omp_nthreads, skull_strip_template, skull_strip_fixed_seed,
4040
freesurfer, output_spaces, template, medial_surface_nan, cifti_output, hires,
4141
use_bbr, bold2t1w_dof, fmap_bspline, fmap_demean, use_syn, force_syn,
42-
use_aroma, ignore_aroma_err, aroma_melodic_dim, template_out_grid):
42+
use_aroma, ignore_aroma_err, aroma_melodic_dim, template_out_grid,
43+
return_all_components, fd_spike_thr, dv_spike_thr):
4344
"""
4445
This workflow organizes the execution of FMRIPREP, with a sub-workflow for
4546
each subject.
@@ -167,6 +168,12 @@ def init_fmriprep_wf(subject_list, task_id, echo_idx, run_uuid, work_dir, output
167168
template_out_grid : str
168169
Keyword ('native', '1mm' or '2mm') or path of custom reference
169170
image for normalization
171+
return_all_components
172+
Return all CompCor component time series instead of the top fraction
173+
fd_spike_thr
174+
Criterion for flagging framewise displacement outliers
175+
dv_spike_thr
176+
Criterion for flagging DVARS outliers
170177
171178
"""
172179
fmriprep_wf = Workflow(name='fmriprep_wf')
@@ -215,6 +222,9 @@ def init_fmriprep_wf(subject_list, task_id, echo_idx, run_uuid, work_dir, output
215222
use_aroma=use_aroma,
216223
aroma_melodic_dim=aroma_melodic_dim,
217224
ignore_aroma_err=ignore_aroma_err,
225+
return_all_components=return_all_components,
226+
fd_spike_thr=fd_spike_thr,
227+
dv_spike_thr=dv_spike_thr,
218228
)
219229

220230
single_subject_wf.config['execution']['crashdump_dir'] = (
@@ -237,7 +247,8 @@ def init_single_subject_wf(subject_id, task_id, echo_idx, name, reportlets_dir,
237247
freesurfer, output_spaces, template, medial_surface_nan,
238248
cifti_output, hires, use_bbr, bold2t1w_dof, fmap_bspline, fmap_demean,
239249
use_syn, force_syn, template_out_grid,
240-
use_aroma, aroma_melodic_dim, ignore_aroma_err):
250+
use_aroma, aroma_melodic_dim, ignore_aroma_err,
251+
return_all_components, fd_spike_thr, dv_spike_thr):
241252
"""
242253
This workflow organizes the preprocessing pipeline for a single subject.
243254
It collects and reports information about the subject, and prepares
@@ -365,6 +376,12 @@ def init_single_subject_wf(subject_id, task_id, echo_idx, name, reportlets_dir,
365376
Perform ICA-AROMA on MNI-resampled functional series
366377
ignore_aroma_err : bool
367378
Do not fail on ICA-AROMA errors
379+
return_all_components
380+
Return all CompCor component time series instead of the top fraction
381+
fd_spike_thr
382+
Criterion for flagging framewise displacement outliers
383+
dv_spike_thr
384+
Criterion for flagging DVARS outliers
368385
369386
Inputs
370387
@@ -503,6 +520,9 @@ def init_single_subject_wf(subject_id, task_id, echo_idx, name, reportlets_dir,
503520
use_aroma=use_aroma,
504521
aroma_melodic_dim=aroma_melodic_dim,
505522
ignore_aroma_err=ignore_aroma_err,
523+
return_all_components=return_all_components,
524+
fd_spike_thr=fd_spike_thr,
525+
dv_spike_thr=dv_spike_thr,
506526
num_bold=len(subject_data['bold']))
507527

508528
workflow.connect([

fmriprep/workflows/bold/base.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
5050
output_spaces, template, output_dir, omp_nthreads,
5151
fmap_bspline, fmap_demean, use_syn, force_syn,
5252
use_aroma, ignore_aroma_err, aroma_melodic_dim,
53+
return_all_components, fd_spike_thr, dv_spike_thr,
5354
medial_surface_nan, cifti_output,
5455
debug, low_mem, template_out_grid,
5556
layout=None, num_bold=1):
@@ -136,6 +137,12 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
136137
Perform ICA-AROMA on MNI-resampled functional series
137138
ignore_aroma_err : bool
138139
Do not fail on ICA-AROMA errors
140+
return_all_components
141+
Return all CompCor component time series instead of the top fraction
142+
fd_spike_thr
143+
Criterion for flagging framewise displacement outliers
144+
dv_spike_thr
145+
Criterion for flagging DVARS outliers
139146
medial_surface_nan : bool
140147
Replace medial wall values with NaNs on functional GIFTI files
141148
cifti_output : bool
@@ -431,6 +438,9 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
431438
bold_confounds_wf = init_bold_confs_wf(
432439
mem_gb=mem_gb['largemem'],
433440
metadata=metadata,
441+
return_all_components=return_all_components,
442+
fd_spike_thr=fd_spike_thr,
443+
dv_spike_thr=dv_spike_thr,
434444
name='bold_confounds_wf')
435445
bold_confounds_wf.get_node('inputnode').inputs.t1_transform_flags = [False]
436446

0 commit comments

Comments
 (0)