fMRIPrep Not Resampling (Reference Space Not Set Error)

Summary of what happened:

fMRIPrep is not resmapling for some reason. I hae specified for T1w output, but I am getting an error that the reference space is not set, and the output files are, indeed, misaligned in reference space.

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

#!/bin/bash

export DOCKER_CONTENT_TRUST=0

# Check if subject number argument is provided
if [ $# -ne 1 ]; then
    echo "Usage: $0 <subject_number>"
    exit 1
fi

# Subject number provided as argument
subj=$1
echo "Starting subject ${subj}"

# Set paths
bids_root_dir="/lbc/lbc1/derivatives/brainstem_funk/BIDS_DAY2"
bids_deriv_dir="/lbc/lbc1/derivatives/brainstem_funk/fmriprep"
workdir="/lbc/lbc1/derivatives/brainstem_funk/work/sub-${subj}_wd"
license_dir="/lbc/lbc1/derivatives/brainstem_funk/license.txt"

# Create working directory
mkdir -p "$workdir"

# Run fMRIPrep with Docker
docker run --rm --user $(id -u):$(id -g) \
    -v $bids_root_dir:/data \
    -v $bids_deriv_dir:/out \
    -v $license_dir:/license.txt \
    -v $workdir:/work \
    nipreps/fmriprep:24.1.1 /data /out participant \
    --skip-bids-validation  \
    --participant-label $subj \
    --fs-license-file /license.txt \
    --output-spaces T1w \
    --n_cpus 8 \
    --omp-nthreads 8 \
    --mem-mb 204800 \
    --skull-strip-t1w force \
    --me-output-echos \
    --low-mem \
    --ignore slicetiming

echo "Finished processing subject ${subj}"

# Clean up the work directory if desired
# rm -rf "$workdir"

Version:

24.1.1

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

Docker.

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

PASTE VALIDATOR OUTPUT HERE

241112-20:41:22,485 nipype.workflow INFO:
	 [Node] Setting-up "fmriprep_24_1_wf.sub_004_wf.bold_task_rest_acq_ep2d19mm_run_01_echo_1_wf.bold_native_wf.boldref_bold" in "/tmp/work/fmriprep_24_1_wf/sub_004_wf/bold_task_rest_acq_ep2d19mm_run_01_echo_1_wf/bold_native_wf/_echoidx_2/boldref_bold".
2024-11-12 20:41:22,485 [    INFO] [Node] Setting-up "fmriprep_24_1_wf.sub_004_wf.bold_task_rest_acq_ep2d19mm_run_01_echo_1_wf.bold_native_wf.boldref_bold" in "/tmp/work/fmriprep_24_1_wf/sub_004_wf/bold_task_rest_acq_ep2d19mm_run_01_echo_1_wf/bold_native_wf/_echoidx_2/boldref_bold".
2024-11-12 20:41:22,500 [    INFO] [Node] Executing "boldref_bold" <fmriprep.interfaces.resampling.ResampleSeries>
241112-20:41:22,500 nipype.workflow INFO:
	 [Node] Executing "boldref_bold" <fmriprep.interfaces.resampling.ResampleSeries>
2024-11-12 20:41:22,806 [ WARNING] WARNING: Reference space not set
2024-11-12 20:41:22,887 [ WARNING] WARNING: Reference space not set
241112-20:42:41,700 nipype.workflow INFO:
	 [Node] Finished "boldref_bold", elapsed time 79.19786s.
2024-11-12 20:42:41,700 [    INFO] [Node] Finished "boldref_bold", elapsed time 79.19786s.

Screenshots / relevant information:

Screenshot from 2024-11-12 16-29-23


I can’t imagine the ‘Units’ field from the BIDS validator would be the reason for this.

This is an example for one participant but ALL of my participants for all runs have come out this way. The output space for the functionals is the same from fmriprep before optimally combining and tedana outputs.

Why is this happening?

I am noticing a similar issue in my dataset with the newest fmriprep version and not able to find a real reason for this. Seems like a relatively new issue since there aren’t many posts bringing this up. Planning to test a prior version to see if this persists or is a unique issue with the dataset itself

Curious if anyone has resolved this issue? I’ve been trying to process my ME data through fmriprep and this error has been popping up, resulting in major registration errors.