@@ -98,6 +98,8 @@ def init_bold_confs_wf(
9898 BOLD series mask
9999 movpar_file
100100 SPM-formatted motion parameters file
101+ rmsd_file
102+ Framewise displacement as measured by ``fsl_motion_outliers``.
101103 skip_vols
102104 number of non steady state volumes
103105 t1w_mask
@@ -140,6 +142,9 @@ def init_bold_confs_wf(
140142 Several confounding time-series were calculated based on the
141143*preprocessed BOLD*: framewise displacement (FD), DVARS and
142144three region-wise global signals.
145+ FD was computed using two formulations following Power (absolute sum of
146+ relative motions, @power_fd_dvars) and Jenkinson (relative root mean square
147+ displacement between affines, @mcflirt).
143148FD and DVARS are calculated for each functional run, both using their
144149implementations in *Nipype* [following the definitions by @power_fd_dvars].
145150The three global signals are extracted within the CSF, the WM, and
@@ -173,8 +178,8 @@ def init_bold_confs_wf(
173178were annotated as motion outliers.
174179""" .format (fd = regressors_fd_th , dv = regressors_dvars_th )
175180 inputnode = pe .Node (niu .IdentityInterface (
176- fields = ['bold' , 'bold_mask' , 'movpar_file' , 'skip_vols ' ,
177- 't1w_mask' , 't1w_tpms' , 't1_bold_xform' ]),
181+ fields = ['bold' , 'bold_mask' , 'movpar_file' , 'rmsd_file ' ,
182+ 'skip_vols' , ' t1w_mask' , 't1w_tpms' , 't1_bold_xform' ]),
178183 name = 'inputnode' )
179184 outputnode = pe .Node (niu .IdentityInterface (
180185 fields = ['confounds_file' , 'confounds_metadata' ]),
@@ -258,6 +263,9 @@ def init_bold_confs_wf(
258263 add_motion_headers = pe .Node (
259264 AddTSVHeader (columns = ["trans_x" , "trans_y" , "trans_z" , "rot_x" , "rot_y" , "rot_z" ]),
260265 name = "add_motion_headers" , mem_gb = 0.01 , run_without_submitting = True )
266+ add_rmsd_header = pe .Node (
267+ AddTSVHeader (columns = ["rmsd" ]),
268+ name = "add_rmsd_header" , mem_gb = 0.01 , run_without_submitting = True )
261269 concat = pe .Node (GatherConfounds (), name = "concat" , mem_gb = 0.01 , run_without_submitting = True )
262270
263271 # CompCor metadata
@@ -382,6 +390,7 @@ def _pick_wm(files):
382390
383391 # Collate computed confounds together
384392 (inputnode , add_motion_headers , [('movpar_file' , 'in_file' )]),
393+ (inputnode , add_rmsd_header , [('rmsd_file' , 'in_file' )]),
385394 (dvars , add_dvars_header , [('out_nstd' , 'in_file' )]),
386395 (dvars , add_std_dvars_header , [('out_std' , 'in_file' )]),
387396 (signals , concat , [('out_file' , 'signals' )]),
@@ -390,6 +399,7 @@ def _pick_wm(files):
390399 ('pre_filter_file' , 'cos_basis' )]),
391400 (acompcor , concat , [('components_file' , 'acompcor' )]),
392401 (add_motion_headers , concat , [('out_file' , 'motion' )]),
402+ (add_rmsd_header , concat , [('out_file' , 'rmsd' )]),
393403 (add_dvars_header , concat , [('out_file' , 'dvars' )]),
394404 (add_std_dvars_header , concat , [('out_file' , 'std_dvars' )]),
395405
0 commit comments