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:
name: fmriprep
channels:
- https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/public/
- conda-forge
# Update this ~yearly; last updated Jan 2024
dependencies:
- python=3.11
# Needed for svgo and bids-validator; consider moving to deno
- nodejs=20
# Intel Math Kernel Library for numpy
- mkl=2023.2.0
- mkl-service=2.4.0
# git-annex for templateflow users with DataLad superdatasets
- git-annex=*=alldep*
# Base scientific python stack; required by FSL, so pinned here
- numpy=1.26
- scipy=1.13
- matplotlib=3.9
- pandas=2.2
- h5py=3.11
This file has been truncated. show original
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!