SDC [unwarping] correction occurs but it does not consistently apply intensity changes to the BOLD data despite a consistent seed argument provided when running fMRIPrep v24.1.1 with Apptainer. Re-running fMRIPrep may or may not result in the intensity correction being applied.
Unless I am misunderstanding something, this potentially raises an issue regarding reproducibility.
Version:
24.1.1
Command used (and if a helper script was used, a link to the helper script or the command generated):
Data formatted according to a validatable standard? Please provide the output of the validator:
Passes bids-validator v1.15.0
Relevant log outputs (up to 20 lines):
See screenshots below
Screenshots / relevant information:
Fieldmap acquisition is your typical Siemens “2 magnitude images and a phasediff” combination.
SDC clearly works in the sense that it performs the expected unwarping around the orbitofrontal regions. What is inconsistent is whether intensity adjustment is also applied.
Hi @Maurice_Pasternak please try with 25.0.0. Also note that those are different x-coordinate slices of the image. Image viewer of final product would be better so you have more control over image contrast and coordinates.
To my understanding from the new help manual, the new flag associated with this would be --force fmap-jacobian, correct? I’m assuming this flag can stay in and will be ignored if there is no fieldmap for a given subject/session, correct?
@Steven and @jsein I can confirm that this issue seems to persist in the v25 release even with the --force fmap-jacobian flag present. Some sessions flip flop between having biasfield correction applied, some appear to be “stable” in it either being applied or not applied across re-runs.
Some additional context:
other than the contents of the subject’s fmriprep/sourcedata/freesurfer/<subject> directory being preserved, to avoid the costly recon-all step, each re-run is completely fresh.
I run multiple Apptainer instances in parallel, but each instance is only given one --participant to process, which I believe is fMRIPrep’s recommendation for running in parallel.
Yes, you can see what went wrong when looking at the temporary files saved by fmriprep in the working directory.
For fmriprep v23.2, you can look for instance at : PATH_to_working_directory/fmriprep_23_2_wf/sub_02_wf/bold_ses_01_task_TASK_run_RUN_wf/bold_fit_wf/enhance_and_skullstrip_bold_wf/fix_header/tpl-MNI152NLin2009cAsym_res-01_label-brain_probseg_trans_fixhdr.nii.gz
if you see a weird brain mask, this means that the step with antsAI went wrong. The sep with antsAI is visible here:
May I ask for anyone’s thoughts on the best approach to side-stepping this issue? I understand the go-to response is “it depends on your analysis”. In which case I would say that given that orbitofrontal regions are of interest to me and the work is longitudinal resting state functional connectivity, I would prioritize solutions where SDC is applied consistently across timepoints.
I wonder if it would be worthwhile to sacrifice one round of interpolation by rigid-body transforming sessions where this happens to be closer to the MNI template’s location prior to running fMRIPrep.
Correct me if I am wrong: I have the feeling that this issue with bias correction being applied or not is only affecting the _boldref images and in the end I don’t really see an issue with the preprocessed bold images.
It is not ideal of course to have one step in the preprocessing which does not perform consistently but overall I don’t see any issue with the preprocessed bold images so I decided to live with this issue for now and go on with my analyses.