Needing further clarification on incorporating PEPOLAR susceptibility to fMRI data in fMRIprep

Hi everyone,

First:
fmriprep-docker v24.0.1
dcm2bids v1.9.0

I have read through this forum about how to incorporate a TOPUP-style approach (ie PEPOLAR) into FMRIprep for susceptibility distortion correction, and sadly I’m still confused about what to do. I have acquired a 12-min resting state scan (multiband, multiecho, phase dir ‘j-’), as well as a 30 second resting state scan with the same acquisition parameters, but opposite phase dir (yet to be put through dcm2bids, as I’m learning one step at a time). Note that I intend to use TEDANA for denoising post-fMRIprep with the individual echoes. Also note that I have only been working with the strictness of the BIDS format for a week or so. BTW, my fMRIprep is working fine, I just would like to incorporate SDC into processing now.

I have read through this thread: Utilize TOPUP fieldmap data into fMRIprep

I too am confused by the statement " Please note that all routines for susceptibility-derived distortion correction have been excised off of fMRIPrep for utilization on other projects (e.g., dMRIPrep)".

From what I understand, TOPUP correction WILL be performed with some savviness regarding the “IntendedFor” field within the JSON sidecar. What I’m not sure about is how to implement this.

Would I need to add my 12-min scan again, except add as an ‘fmap’ this time instead of as ‘bold’, in addition to adding my 30-sec opposite phase scan as an ‘fmap’? Should I perform TOPUP beforehand, and add the fieldcoeffs.nii.gz and/or movepar.txt file to the fmriprep-docker command?

I am also unclear of whether there is an additional flag I should be adding to my fmriprep-docker command.

Apologies if this seems a redundant question. I’d appreciate any advice, or prompts for more information.

Thanks!

Hi @Crock,

This just means that a dedicated code repository contains the code for SDC (called SDCFlows). Other projects besides fMRIPrep may use SDCFlows for their own purposes, so they made it a separate repository.

You have two options to link your fmap.

  1. Use IntendedFor. In your fmap json, include the path relative to the subject folder. For example:
"IntendedFor":"ses-01/func/sub-01_ses-01_task-rest_bold.nii.gz"

(obviously replace with the path in your system).

  1. Use B0FieldSource/Identifier fields.
    In your fmap json, include something like
"B0FieldIdentifier":"fmap_rest"

and in your BOLD json

"B0FieldSource":"fmap_rest"

The B0FieldSource/Identifier method takes priority over IntendedFor if both are specified.

No, BOLD files only go in the func folder.

No, fmriprep will do TOPUP for you.

No, SDC is enabled by default as long as the files are available.

Best,
Steven

1 Like

Hi Steven,

Thanks for the time and patience you’ve spent answering question throughout this forum!

That said, I still have some confusion (I acknowledge I’m a bit dim…, anyone please weigh in!)

OK, I understand that should BIDS format have the correct identifiers, PEPOLAR SDC will automatically be performed within fMRIprep. Awesome.

However, I’m still confused that I only have forward- and reverse-phase BOLD prior to launching FMRIprep, thus no existing ‘fmaps’.

I was wondering if you (or someone) could provide (or could point me to) examples or contextual snippets of JSON files (obviously need two series with opposing phase directions) prior to running FMRIprep? A config file (or contextual snippet) defining the two would work as well.

Thanks again!
(Also, if I get this figured out on my end, I’ll post examples as well)

Hi @Crock

Fmriprep will use those to run TOPUP to create the distortion field.

I provided the relevant JSON text in my first answer but you can also check out examples at GitHub - bids-standard/bids-examples: A set of BIDS compatible datasets with empty raw data files that can be used for writing lightweight software tests..

Best,
Steven