nilearn icon indicating copy to clipboard operation
nilearn copied to clipboard

`nilearn.input_data.fmriprep_confounds` not retreiving confound files correctly when entity `part-` is present

Open htwangtw opened this issue 2 years ago • 0 comments

This is likely an upstream issue. I am filing it here to track it in case other people run into the same thing.

Right now nilearn.input_data.fmriprep_confounds is finding the relevant confound file by replacing the suffix of a bold image from _space-<space_label>_desc-preproc_bold.nii.gz to _desc-confounds_timeseries.tsv, based on fMRIPrep documentation.

However we encounter a case today where they have entity part in the file name with data processed with fmriprep v20.2.3:

sub-01_ses-001_task-stuff_space-T1w_desc-preproc_part-mag_bold.nii.gz

From my understanding of BIDS entity, the functional derivative file name should be

sub-01_ses-001_task-stuff_part-mag_space-T1w_desc-preproc_bold.nii.gz

as entities is roughly following the order noted here By this logic, entity part should be a part of the [specifiers]

I have also opened an issue on https://github.com/nipreps/fmriprep/issues/2598

htwangtw avatar Oct 14 '21 15:10 htwangtw