fMRIPrep 25.0.0 and autorecon-2 and 3

I noticed that after running freesurfer through fMRIPrep, my pial surfaces have 0kb size and I read that fMRIPrep latest does not do autorecon-2 and 3 by default anymore. Is this true? If yes, does it mean we would have to do these two outside fMRIprep?

Hi @Divesh_Thaploo and welcome to neurostars!

In the future please use the software support post category and post template to provide us with information to help us help you.

I am not sure where you read that. fMRIPrep 25.0.0 Does do autorecon 2 and 3 as part of freesurfer.

Best,
Steven

Hi @Steven. Sure, I would do that. I am using the following script to run fMRIprep:

#!/bin/bash

# User inputs:
bids_root_dir="/mnt/c/Users/thaplood2/Documents/pre-post"
subj=04
nthreads=4
mem=12 #gb
container=docker #docker or singularity

# Begin:

# Convert virtual memory from gb to mb
mem=`echo "${mem//[!0-9]/}"` # remove gb at end
mem_mb=`echo $(((mem*1000)-5000))` # reduce some memory for buffer space during pre-processing

# export TEMPLATEFLOW_HOME=$HOME/.cache/templateflow
export FS_LICENSE="/mnt/c/Users/thaplood2/Documents/pre-post/derivatives/license.txt"

# Run fmriprep with Docker
if [ "$container" == "docker" ]; then
  unset PYTHONPATH; 
 docker run --rm -v $bids_root_dir:/data:ro -v $bids_root_dir/derivatives:/out:rw \
  -v $HOME/.cache/templateflow:/opt/templateflow:ro \
  -v /mnt/c/Users/thaplood2/Documents/pre-post/derivatives:/mnt/c/Users/thaplood2/Documents/pre-post/derivatives \
  -e FS_LICENSE=/mnt/c/Users/thaplood2/Documents/pre-post/derivatives/license.txt \
  nipreps/fmriprep:latest \
  /data /out participant \
  --participant-label $subj \
  --skip-bids-validation \
  --md-only-boilerplate \
  --fs-license-file /mnt/c/Users/thaplood2/Documents/pre-post/derivatives/license.txt \
  --output-spaces MNI152NLin2009cAsym:res-2 fsaverage fsnative \
  --nthreads $nthreads \
  --stop-on-first-crash \
  --mem $mem_mb

else
  echo "Singularity option selected, but Docker is being used."
fi

and my pial surfaces are not getting reconstructed. Both lh_pial and rh_pial are 0kb.

Hi @Divesh_Thaploo,

In the future, please format your code with the </> button in the text editor. You can see I edited it for you this time.

Does your code proceed to completion without errors? Do you get the freesurfer-surface bold outputs that you requested?

Best,
Steven

Yes, it works without errors, and I get the usual generated bold outputs.

What files (relative to your output path) are you looking at that are 0 kb? Is it possible they are symlinks?

Within this directory: /derivatives/sourcedata/freesurfer/sub-01/surf lh_pial and rh_pial are 0kb and no they are not symlinks.

Do other files have normal or abnormal file sizes? Have you tried running freesurfer separately?

Rest all other files are okay. Just these two files are different. I did not run freesurfer seperately. Is that what you would recommend or should I just re-run the autorecon 2 and 3?

I would try it just to try to isolate the issue.

[Node] Setting-up "fmriprep_25_0_wf.sub_04_wf.anat_fit_wf.surface_recon_wf.autorecon_resume_wf.autorecon2_vol" in "/tmp/work/fmriprep_25_0_wf/sub_04_wf/anat_fit_wf/surface_recon_wf/autorecon_resume_wf/autorecon2_vol".
250428-16:22:50,553 nipype.workflow INFO:
         [Node] Executing "autorecon2_vol" <smriprep.interfaces.freesurfer.ReconAll>
250428-16:22:50,572 nipype.interface INFO:
         resume recon-all : recon-all -autorecon2-volonly -openmp 3 -subjid sub-04 -sd /out/sourcedata/freesurfer -nogcareg
250428-16:22:50,591 nipype.interface INFO:
         resume recon-all : recon-all -autorecon2-volonly -openmp 3 -subjid sub-04 -sd /out/sourcedata/freesurfer -nogcareg

This is from current subject which is being run!!