Running func preproc only based on preproced anat results

Summary of what happened:

I’m planning to conduct a 2-step preprocessing workflow. The 1st step involves anatomical preprocessing (anat preproc), where transformation data is created for all potential spaces to be utilized later. The 2nd step focuses on functional preprocessing (func preproc), which is limited to producing functional data in a specific space. Despite the ‘recon-all’ results from the 1st step being acknowledged and not redone, it seems the 2nd step inadvertently repeats some processes already completed in the 1st step. Is there a way to efficiently run the 2nd step based on the outcomes of the 1st step, to avoid this redundancy?

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

# 1st step
fmriprep-docker ${data_dir} ${data_dir}/derivatives --fs-license-file ${fs_license_f} \
    --output-spaces anat MNI152NLin2009cAsym fsnative fsaverage fsLR --anat-only
# 2nd step
fmriprep-docker ${data_dir} ${data_dir}/derivatives --fs-license-file ${fs_license_f} \
    -cifti-output 170k

Version:

23.1.4

Environment (Docker, Singularity, custom installation):

docker

Thank you very much!
Best,
Xingyu

Hi @Xingyu_Liu and welcome to neurostars!

  1. you’ll want to specify a working directory (-w argument) and use the same one for both steps if you want fmriprep to reuse files.

  2. in your version you can use the —anat-derivatives flag to reuse anatomical outputs, but this is being refactored in the upcoming release, which you can try now (23.2.0a2). In that release and future releases, you can change the —level to only do minimal or full pipelines.

Best,
Steven

Got it. Thank you so much Steven!
Best,
Xingyu