Recalculate parameters in xcpd despite fmriprep outputs?

Dear xcp_d user,

I have a question regarding the input process for xcpd from fmriprep. I’m curious why xcpd recalculates certain parameters that fmriprep already computes itself, such as motion parameters. Additionally, when I compare the motion parameters generated by both fmriprep and xcpd, I notice they’re in the same range but differ somewhat.

I’ve noticed the option to utilize custom confounds. Would using the

–nuisance-regressors none --custom-confounds path/to/fmriprep/output

command help avoid recalculating these parameters and utilize fmriprep’s outputs instead? Or is there a distinction I’m missing?

In essence, why do we recalculate what fmriprep has already computed, or am I misunderstanding the differences between the two?

Thanks for your assistance.

XCP-D allows users to filter their motion parameters to remove respiratory effects. It’s just easier to recalculate the Volterra expansion within XCP-D based on the motion parameters.

XCP-D recalculates framewise displacement because it matters more in XCP-D than in fMRIPrep (since we optionally use it to censor high-motion volumes), so we give a bit more control (e.g., by calculating FD based on the filtered motion parameters, or using a different head radius than fMRIPrep might use).

What settings did you use, and which regressors differed? If you didn’t use a motion filter, the base parameters (6 translation and rotation parameters) shouldn’t differ at all, and the squared and derivative parameters should the same as well even if XCP-D recalculates them, given the simplicity of the operation.

1 Like

Thanks for your fast reply !
I was indeed considering the framewise displacement differences for the motion parameters and this is the one that differs a bit. The others (rot_x, rot_y, rot_z) are rounded up differences.
Thanks for your explanation that explain why we are doing “the same” 2 times.

For the settings I used the same line as in your paper ( 10.1101/2023.11.20.567926 ) for the PNC cohort. I am actually on a project using the PNC data. The only change I did is that I am using docker instead of singularity, and that I implemented another atlas in the toolbox.

docker run \
    --rm \
    -v /path/to/input/:/input_dir/ \
    -v /path/to/output/:/output_dir/ \
    xcp_d_custom /input_dir /output_dir participant --participant-label ${participants_without_html[@]} \
    --despike -p 36P -f 0.3 --combineruns \
    --nthreads 1 --omp-nthreads 1 --mem_gb 10 --smoothing 2 \
    --min_coverage 0.5 --min_time 100 --dummy-scans auto \
    --random-seed 0 --bpf-order 2 --lower-bpf 0.01 \
    --upper-bpf 0.08 --motion-filter-type lp --band-stop-min 6 \
    --motion-filter-order 4 --head-radius auto --exact-time 300 480 600 \
    --dcan-qc \
    -vvv \
    --atlases {'hMRF','Glasser'} \
    --input-type fmriprep \
    -w /path/to/working_xcpd/ \

But I think you completely answered to my question, thanks !

1 Like