Summary of what happened:
I am usinf fMRIprep v25.0 to preprocess my data. My dataset is organised as BIDS, and sub-02, sub-03 and sub-04 are strictly similar in terms of data organisation. Surprisingly, sub-03 and sub-04 are preprocessed just well by fMRIprep, while sub-02 encountered an error: Node Name: fmriprep_25_0_wf.sub_02_wf.anat_fit_wf.surface_recon_wf.autorecon1
Command used (and if a helper script was used, a link to the helper script or the command generated):
#!/bin/bash
# variable settings
root_dir=${PWD}
bids_dir=${root_dir}/bids
out_dir1=${root_dir}/fmriprep
work_dir=${out_dir1}/work
nthreads=28
mem=200 #gb
mem=`echo "${mem//[!0-9]/}"` #remove gb at end
mem_mb=`echo $((mem*1000))`
echo 'export PATH=$PATH:~/.local/bin' >> ~/.bash_profile
source ~/.bash_profile
export FS_LICENSE=/home/touhara/freesurfer/license.txt
# fmriprep
for sub in $@;do
subnum=`printf %02d $sub`
start_time=`date "+%Y-%m-%d %H:%M:%S"`
fmriprep-docker $bids_dir $out_dir1 \
participant \
--participant-label $subnum \
--md-only-boilerplate \
--fs-license-file ${FS_LICENSE} \
--nthreads $nthreads \
--stop-on-first-crash \
--mem_mb $mem_mb \
--low-mem \
--dummy-scans 7 \
end_time=`date "+%Y-%m-%d %H:%M:%S"`
echo start, $start_time
echo finish,$end_time
done
That I call with
su - touhara
cd /mnt/{path_to_rootdir}
./fmriprep.sh {subjects ID}
Version:
25.0.0
Environment (Docker, Singularity / Apptainer, custom installation):
Docker
Data formatted according to a validatable standard? Please provide the output of the validator:
According to BIDS Validator , the only ERROR I got is
ERROR: SIDECAR_KEY_REQUIRED (SKULLSTRIPPED)
A data file's JSON sidecar is missing a key listed as required.
- /sub-04/fmap/sub-04_dir-PA_epi.nii.gz (Field description: Whether the volume was skull stripped (non-brain voxels set to zero) or not. )
- /sub-04/fmap/sub-04_dir-AP_epi.nii.gz (Field description: Whether the volume was skull stripped (non-brain voxels set to zero) or not. )
- /sub-04/anat/sub-04_T1w.nii.gz (Field description: Whether the volume was skull stripped (non-brain voxels set to zero) or not. )
- /sub-04/func/sub-04_task-odor_run-09_echo-1_bold.nii.gz (Field description: Whether the volume was skull stripped (non-brain voxels set to zero) or not. )
(and so on for all my sub fmap, anat and func)
But again, I face the issue with sub-02, not sub-03 nor 04.
Relevant log outputs (up to 20 lines):
File: <workdir>/sub-02/log/20250331-125334_87940b73-a1fa-4a76-91a1-c315d4bc53e3/crash-20250331-125948-root-autorecon1-7d5fc784-4e1c-4cd6-a992-9c7b78c9aa32.txt
Working Directory: /tmp/work/fmriprep_25_0_wf/sub_02_wf/anat_fit_wf/surface_recon_wf/autorecon1
(...)
mri_info /out/sourcedata/freesurfer/sub-02/mri/rawavg.mgz
rawavg.mgz ========================================
Volume information for /out/sourcedata/freesurfer/sub-02/mri/rawavg.mgz
type: MGH
dimensions: 208 x 300 x 320
voxel sizes: 0.800000, 0.809375, 0.809375
type: FLOAT (3)
fov: 259.000
dof: 1
xstart: -83.2, xend: 83.2
ystart: -121.4, yend: 121.4
zstart: -129.5, zend: 129.5
TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees
nframes: 1
PhEncDir: UNKNOWN
FieldStrength: 0.000000
ras xform present
xform info: x_r = 1.0000, y_r = 0.0000, z_r = -0.0000, c_r = 0.2651
: x_a = 0.0000, y_a = 1.0000, z_a = -0.0000, c_a = 23.5953
: x_s = 0.0000, y_s = 0.0000, z_s = 1.0000, c_s = 3.7655
talairach xfm :
Orientation : RAS
Primary Slice Direction: axial
voxel to ras transform:
0.8000 0.0000 -0.0000 -82.9349
0.0000 0.8094 -0.0000 -97.8109
0.0000 0.0000 0.8094 -125.7345
0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 0.52407
ras to voxel transform:
1.2500 0.0000 0.0000 103.6686
0.0000 1.2355 0.0000 120.8475
0.0000 0.0000 1.2355 155.3477
0.0000 0.0000 0.0000 1.0000
/out/sourcedata/freesurfer/sub-02
mri_convert /out/sourcedata/freesurfer/sub-02/mri/rawavg.mgz /out/sourcedata/freesurfer/sub-02/mri/orig.mgz --conform_min
mri_convert /out/sourcedata/freesurfer/sub-02/mri/rawavg.mgz /out/sourcedata/freesurfer/sub-02/mri/orig.mgz --conform_min
reading from /out/sourcedata/freesurfer/sub-02/mri/rawavg.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (1, 0, 0)
j_ras = (0, 1, 0)
k_ras = (-0, -0, 1)
changing data type from float to uchar (noscale = 0)...
MRIchangeType: Building histogram -0.00440979 4095 1000, flo=0, fhi=0.999, dest_type=0
Reslicing using trilinear interpolation
writing to /out/sourcedata/freesurfer/sub-02/mri/orig.mgz...
mri_add_xform_to_header -c /out/sourcedata/freesurfer/sub-02/mri/transforms/talairach.xfm /out/sourcedata/freesurfer/sub-02/mri/orig.mgz /out/sourcedata/freesurfer/sub-02/mri/orig.mgz
INFO: extension is mgz
mri_info /out/sourcedata/freesurfer/sub-02/mri/orig.mgz
orig.mgz ========================================
Volume information for /out/sourcedata/freesurfer/sub-02/mri/orig.mgz
type: MGH
dimensions: 323 x 323 x 323
voxel sizes: 0.800000, 0.800000, 0.800000
type: UCHAR (0)
fov: 258.400
dof: 1
xstart: -129.2, xend: 129.2
ystart: -129.2, yend: 129.2
zstart: -129.2, zend: 129.2
TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees
nframes: 1
PhEncDir: UNKNOWN
FieldStrength: 0.000000
ras xform present
xform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r = 0.2651
: x_a = 0.0000, y_a = 0.0000, z_a = 1.0000, c_a = 23.5953
: x_s = 0.0000, y_s = -1.0000, z_s = 0.0000, c_s = 3.7655
talairach xfm : /out/sourcedata/freesurfer/sub-02/mri/transforms/talairach.xfm
Orientation : LIA
Primary Slice Direction: coronal
voxel to ras transform:
-0.8000 0.0000 0.0000 129.4651
0.0000 0.0000 0.8000 -105.6047
0.0000 -0.8000 0.0000 132.9655
0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -0.512
ras to voxel transform:
-1.2500 -0.0000 -0.0000 161.8314
-0.0000 -0.0000 -1.2500 166.2069
-0.0000 1.2500 -0.0000 132.0059
-0.0000 -0.0000 -0.0000 1.0000
****************************************
ERROR! FOV=258.400 > 256
Include the flag -cw256 with recon-all!
Inspect orig.mgz to ensure the head is fully visible.
****************************************
Linux 5d965cd3d4b8 5.15.0-134-generic #145~20.04.1-Ubuntu SMP Mon Feb 17 13:27:16 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s sub-02 exited with ERRORS at Mon Mar 31 12:59:48 UTC 2025
For more details, see the log file /out/sourcedata/freesurfer/sub-02/scripts/recon-all.log
To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
Sorry it’s a bit long, but I included all FOV occurrence. I can provide any additional from the log if it’s of any help.
Screenshots / relevant information:
Here is my bids/sub-02/anat/sub-02_T1w.nii.gz (defaced) that looks perfectly fine.
Thank you!