How can I run only the isolation bold image preprocessing step in a manually prepared environment?

Hi everyone,

Our experiment requires us to isolate the pre-processing step of fMRIPrep for BOLD images. Is this possible? Specifically, I would like to run the preprocessing step independently (Head motion, Slice timing and Susceptibility Distortion Correction), without relying on Docker or other containers, directly in Python code or Bash, such as using a def. As I’m new to this field and not very familiar with workflow, I would really appreciate any guidance or help.

Thanks in advance!

To install a manually prepared environment

There are docs here: Installation — fmriprep version documentation

Several components can be installed in a single step by using conda/mamba to construct the pinned environment from the version you plan to use:

There are some relevant instructions here: Update development environment docs · Issue #3188 · nipreps/fmriprep · GitHub

Those are for development. You would probably want a specific version:

git clone https://github.com/nipreps/fmriprep.git
cd fmriprep
git checkout 24.1.1  # Or whatever version
mamba env create -f env.yml
mamba env config vars set -n fmriprep FSLDIR=$CONDA_PREFIX
mamba activate fmriprep
pip install .

You will still need the other tools, such as FreeSurfer.

To only perform head motion/slice-timing/distortion correction

There isn’t a way to skip the anatomical processing, but you can strip it down to bare bones:

fmriprep $INPUT $OUTPUT participant --output-space func --fs-no-reconall

Thank you, this really helps me a lot!