I’m using xcp_d for post-process the output from fmriprep. I found misalignment between t1w and atlas almost all the subjects, similar to the case here but with worse result:
Thank you @roeysc !
I’ll try to update to latest XCP-D. And I solved this problem by rearrange structures of the output (derivatives) from fmriprep and qsiprep. Specifically, the log file tells that
250612-04:06:32,335 nipype.utils WARNING:
Multiple files found for query ‘t1w’:
…/output/qsiprep/sub-xxx/anat/sub-xxx_desc-preproc_T1w.nii.gz
…/output/sub-xxx/anat/sub-xxx_desc-preproc_T1w.nii.gz
And XCP-D choose the first processed t1w, which results in the misalignment. Therefore I move qsiprep output to another folder and it works. I’m not sure if the bug solved in lateset version is corresponding to this one.
The command you shared doesn’t mention a directory called output. Where is it located?
Also, it seems like your data are not organized in a way that BIDS Apps can make sense of. Can you post the tree? At a glance, if you have fMRIPrep derivatives and QSIPrep derivatives, it seems like you have them organized like this:
If so, this isn’t going to work. Given that these are two independent BIDS Apps, they should be organized like this:
fmriprep/
qsiprep/
If one pipeline was applied to outputs from another pipeline, then you could do this:
pipeline1/
derivatives/
pipeline2/
But the key there is that the second-order derivatives dataset should be within a “derivatives” folder- not just in the first-order derivatives dataset.