Is there any way to run freesurfer with any configuration using the fMRIPrep singularity container?

Dear fMRIPrep experts,

I have one application that needs to run additional freesurfer processing (e.g. brain stem segmentation or hippocampus segmentation) based on the existing fMRIPrep freesurfer results. I am wondering whether I can use the the fMRIPrep singularity container to run these additional processing since I want to keep the preprocessing and processing tools are exactly the same.

Here is the situation:

  1. The additional freesurfer brainstem segmentation can be run based on the existing freesurfer outputs using standalone freesurfer 6.0 with recon-all -s <SUB> -brainstem-structures;
  2. I have finished fMRIPrep 20.2.7 preproc and the freesurfer output folder is ready;
  3. How can I tell fMRIPrep to run only recon-all -s <SUB> -brainstem-structures instead of the standard fMRIPrep and freesurfer anat preproc workflows, do you have any recommendations?

Thanks,
Vincent

Hello,

Perhaps you should recon-all outside fMRIPrep, and then rerun fMRIprep; I would not mess with the fMRIPrep source code. If you are worried about version differences, you can do singularity exec -e -B /path/to/important/drives /path/to/fmriprep.img recon-all $arguments.

Best,
Steven

Great thanks! I was thinking of using freesurfer from the fMRIPrep container directly as well, and I also remembered that fMRIPrep provides some validation functions for these freesurfer outputs, and rerun the specific freesurfer steps if necessary . Do you think running these functions before any further processing will be useful?

I do not know how these functions work, sorry. And now that I think about it, you shouldn’t need to run fmriprep again because it likely doesn’t use brainstem information. So unless the brainstem outputs are in a different anatomical space, I think you would be fine just doing the additional brainstem segmentation (but if you want to be extra safe, you can rerun fmriprep inputting the output freesurfer folder).

Thanks, very helpful suggestions!