No column for framewise displacement filtered on motion.tsv

Hi @tsalo et al.,

I have specified a --motion-filter-type and --fd-thresh but my motion.tsv does not include a ‘framewise_displacement_filter’ column. The motion.json does include a description of the framewise_displacement_filter column, so I believe on should be created. I am running xcp-d 0.10.6.

Am I missing a parameter in the command? See below:

/usr/local/miniconda/bin/xcp_d --verbose --participant_label ${sub_id} --input-type fmriprep --nthreads 16 --mem_gb 48 --smoothing 3 --despike y --nuisance-regressors acompcor_gsr --dummy-scans 4 --bpf-order 2 --motion-filter-type notch --band-stop-min 10 --band-stop-max 30 --lower-bpf 0.01 --upper-bpf 0.1 --fd-thresh 0.4 --abcc-qc --file-format cifti --min-coverage 0.5 --warp-surfaces-native2std --linc-qc n --combine-runs n --output-type censored --create-matrices all --fs-license-file /path/to/FreeSurfer/freesurfer-7.2.0/license.txt --work_dir /path/to/scratch/xcpd_work/${sub_id}_ses-${ses} --mode none /path/to/xcp-d/${sub_id}${ses} /path/to/xcp-d participant

I’ve been looking through the code, and I think I see the problem. It looks like the fMRIPrep confounds file is being used when dummy_scans is set to anything other than zero.

The good news is that this happens after the temporal mask and selected confounds files are created, so it doesn’t affect any actual processing. The drawback is that you don’t get the correct motion tsv in your outputs. I will push a fix ASAP.

1 Like

Thanks, @tsalo! What command can I write to generate the motion.tsv files without rerunning the entirety of xcp-d?

If you still have your working directory, you can look for the folder named process_motion for each BOLD run and see if there’s a tsv output in there. You might need to remove the dummy scans from that file yourself though.

If I don’t have access to that directory (i.e., someone else ran the code), will I need to re-run xcp-d?

If your confounds included motion parameters you should be able to get them from the output design matrix file.

These are included, but not FD: “trans_x_filtered trans_x_derivative1_filtered trans_y_filtered trans_y_derivative1_filtered trans_z_filtered trans_z_derivative1_filtered rot_x_filtered rot_x_derivative1_filtered rot_y_filtered rot_y_derivative1_filtered rot_z_filtered rot_z_derivative1_filtered”