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):
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.
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.
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?
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.
fMRIprep seems to run without issue for some participants but not others (of the same dataset), moreover, sometimes re-running it for a participant for whom it had failed before seems to work on second attempt.
Is this possibly a directory issue? Do I need to assign a different parent directory for the output and/or the work directory? Would this somehow solve the resulting error:
FileNotFoundError: No such file or directory ‘…/ica_aroma_wf/melodic/filtered_func_data.ica/melodic_mix’
Sometimes fmriprep works bettter when using a fresh working directory. Other times those errors are from insufficient memory resources. Or it’s possible it’s a bug that was fixed in more recent updates.
Just to close this entry, and as a reference for future.
It seems the problem was solved when I made a different work directory per participant, it seems that previously it would perhaps try to pull the information from other subjects work directories, but this issue was resolved by adding the following to the batch script of slurm job using singularity:
First define the parent working directory: WORK_BASE_DIR=${PARENT_DIR_BASE}fMRIprep_work/
I have a list of participants I am running this job on: # List of participants to process
subnrs=(sub-PP1 sub-PP2 sub-PP3 sub-PP4 sub-PP5... sub-PP31)
# Define parent directories (fill with pathway of your specific directories)
PARENT_DIR_BASE= ...
BIDS_DIR=${PARENT_DIR_BASE}.../
DERIVS_BASE_DIR=${PARENT_DIR_BASE}.../
WORK_BASE_DIR=${PARENT_DIR_BASE}.../
SUBID=${subnrs[$SLURM_ARRAY_TASK_ID-1]}
PARTICIPANT_WORK_DIR=${WORK_BASE_DIR}${SUBID}/
# Create the work directory if it doesn't exist
mkdir -p $PARTICIPANT_WORK_DIR
singularity run --cleanenv -B $PARENT_DIR_BASE \
/cm/shared/singularity_images/f/fmriprep-23.0.2.sif \
$BIDS_DIR $PARTICIPANT_DERIVS_DIR \
This seems to have solved the issue I was running into before of:
FileNotFoundError: No such file or directory with regards to the N4 bias field correction or ICA AROMA