Fmriprep 2024.1.0 won't do distortion correction with AP/PA

Summary of what happened:

Hello everyone. I am running fmri prep 2024.1.0. My folders are in BIDS format (no error)

In my func folder I have:

  • sub-02_ses-1_task-priming_bold.nii.gz
  • sub-02_ses-1_task-priming_bold.json

And in my fmap folder I have:

Since I did not have a AP top up, I extracted the first volume of my task (in AP), called it : sub-02_ses-1_task-priming_dir-ap_epi.nii.gz and placed it in the fmap folder

as follow :


# get fmri data from the task
data = nib.load(".../rawdata/sub-02/ses-1/func/sub-02_ses-1_task-priming_bold.nii.gz")

# extract the first volume
first_volume = image.index_img(data, 0)

# save the first volume as a separate NIfTI file 
first_volume.to_filename('.../rawdata/sub-02/ses-1/fmap/sub-02_ses-1_task-priming_dir-ap_epi.nii.gz')

And then, I copied the .json task file (this one : sub-02_ses-1_task-priming_bold.json) and called it sub-02_ses-1_task-priming_dir-ap_epi.json
I changed the last part of the json file such as instead of it being written : “TaskName”: “priming”, I wrote : “IntendedFor”: [“bids::sub-02/ses-1/func/sub-02_ses-1_task-priming_bold.nii.gz”]

When I then run fmriprep, it won’t show B0 field maps nor do the distortion correction, where it would normally do it…

Do you know what could be happening?

Thank you!!

Alexane

Version:

2024.1.0

Environment (Docker, Singularity / Apptainer, custom installation):

Linux Ubuntu

Data formatted according to a validatable standard? Please provide the output of the validator:

Data in BIDS format, no error or comment after BIDS validator.

Relevant log outputs (up to 20 lines):

PASTE LOG OUTPUT HERE

Screenshots / relevant information:


Hi @Alexane_Leclerc and welcome to neurostars!

I’m not sure that your method of creating the AP field map is valid, since the field map image and BOLD images have different contrast.

Also, your IntendedFor has the BIDS URI which may not work in fmriprep. You can try removing it (that is, delete bids::sub-xx/) from the entries.

Additionally have you confirmed the BOLD image and collected field map have different phase encoding directions?

Best,
Steven

Hi Steven,

Thank you for your answer!!

I checked in the .json file and the only thing that changed from the PA file was this :
“TaskName”: “priming” instead of “IntendedFor”: [“bids::sub-02/ses-1/func/sub-02_ses-1_task-priming_bold.nii.gz”]"

And, to write the IndentedFor, I did it like this (image below). I think now it is required?

I will remove it now and try.

Yes, BOLD images were collected in AP, then I did one PA at the end, but no AP, so I was trying to find a way to pre-process and correct for distortions with PA only, or creating an AP fieldmap!

Best,

Alexane