fMRIPrep Errors: N4 Bias Field Correction & ICA-AROMA Failure 23.0.2

Summary of what happened:

Hi everyone,

First time poster here, I encountered errors while running fMRIPrep 23.0.2 (the latest version with ICA Aroma I believe), I am running it using Singularity. The interesting thing that it has ran without issue for several participants with no errors and I got a full report and output, but for some others I am running into similar issues it seems relating to missing intermediary steps, or not finding the correct directory within the work-directory.

My dataset involves 2 sessions, including T1W, and resting-state BOLD, as well as DWI.

Command used (and if a helper script was used, a link to the helper script or the command generated):

singularity run --cleanenv -B $ROOT_DIR /cm/shared/singularity_images/f/fmriprep-23.0.2.sif \
    $BIDS_DIR $DERIVS_DIR \
    participant --participant-label $subnrs \
    --work-dir $WORK_DIR \
    --nthreads=$SLURM_CPUS_PER_TASK  \
    --fs-no-reconall \
    --fs-license-file /data1...license.txt \
    --output-spaces T1w MNI152NLin2009cAsym \
    --longitudinal \
    --use-aroma \
    --aroma-melodic-dimensionality -200 \
    --error-on-aroma-warnings \
    --ignore slicetiming

Version:

23.0.2

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

Singularity

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

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

Error 1: N4 Bias Field Correction Failure

Node: n4_correct

Error Message:

nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node n4_correct.
FileNotFoundError: No such file or directory '.../n4_correct/sub-PP2_ses-01_task-restingstate_bold_average_corrected.nii' 

Potential Causes:

  • The expected output file sub-PP2_ses-01_task-restingstate_bold_average_corrected.nii is missing.
  • Possible issues with input image paths or permissions.
  • Failure in N4BiasFieldCorrection command execution.

Relevant Inputs:

  • Input Image: .../gen_avg/sub-PP2_ses-01_task-restingstate_bold_average.nii
  • Weight Image: .../tpl-MNI152NLin2009cAsym_res-01_label-brain_probseg_trans_hdr.nii.gz

Error 2: ICA-AROMA Melodic Step Failure

Node: melodic

Error Message:

nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node melodic.
FileNotFoundError: No such file or directory '.../ica_aroma_wf/melodic/filtered_func_data.ica/melodic_mix' 

Potential Causes:

  • The Melodic ICA output melodic_mix is missing.
  • Incorrect input file format or preprocessing failure.
  • Possible issues with dim argument (-200).

Relevant Inputs:

  • Input Files: .../smooth/vol0000_xform-00000_clipped_merged_smooth.nii.gz
  • Mask: .../mask_std_tfm/vol0000_xform-00000_clipped_merged_average_corrected_brain_mask_maths_trans.nii.gz
  • TR (sec): 1.56

Screenshots / relevant information:

Troubleshooting Steps Taken:

  • Checked input files exist.
  • Verified permissions.
  • Examined log files for further clues.
  • Re-ran the workflow with increased verbosity.

Any insights or suggestions would be greatly appreciated!


Hi @mamudarris and welcome to neurostars!

In the future please use the Software Support post category / template. You can see I edited in for you this time.

May you try updating to the most recent version of fmriprep with a new working directory, and pipe outputs to fmripost AROMA? Keep in mind you will need to use tpl-MNI152NLin6Asym:res-2 output space. Make sure to use a fresh working directory when upgrading? Also, --fs-no-reconall is not recommended. How many resources are you devoting to your job?

Best,
Steven

Hi @Steven,

Thanks for your prompt response, and for bringing the category template to my attention, I will do certainly use it in the future.

The reason why I am using this version is that I understand the AROMA has been depreciated since fMRIprep 23.0.2, correct?

Thanks for the suggestions regarding the output-space, I will re-attempt with tpl-MNI152NLin6Asym:res-2 and let you know.

As I am not using cortical thickness analysis, I thought it would save time to run fMRIprep without reconall --fs-no-reconall

I am running an array with the following resources:
#SBATCH --time=1-00:00:00
#SBATCH --cpus-per-task=12
#SBATCH --ntasks=1
#SBATCH --mem=128G
#SBATCH --partition=cpu-long
#SBATCH --array=1-24%10

Thanks again, and I look forward to any further suggestions you may have.

Best,
Mohammed

Hi @mamudarris,

Yes, but there is now fmripost-AROMA to postprocess current fmriprep outputs with AROMA.

Yes but boundary based registration enabled by surface outputs performs better than voxel-based normalization.

Best,
Steven

1 Like