fMRI Preprocessing via fMRIPrep
This pipeline is developed by the Poldrack lab at Stanford University for use at the Center for Reproducible Neuroscience (CRN), as well as for open-source software distribution.
There are two ways to install fMRIPrep:
- within a Manually Prepared Environment (Python 3.5+),
- using container technologies (RECOMMENDED), such as Running fMRIPrep via Docker containers or Running fMRIPrep via Singularity containers.
In this tutorial, we will present a quick overview of the installation via containers because the installation via a Manually Prepared Environment is not guaranteed on all Operator System (Windows OS in particular). Moreover, the use of containers has the huge advantage of promoting the reproducibility of MRI data pre-processing from one laboratory to another (since the development environment is the same). The disadvantage is that customization of pre-processing is sometimes not possible.
Running fMRIPrep via a Docker
fmriprep-docker is a light weight python wrapper for fmriprep module, allowing fMRI proprocessing to be run from within a Docker environment. It requires Docker and python to be installed. Additionally, as fmriprep is a BIDS app, the input image files must have BIDS-format filenames.
- Step1. Install the python 3.7 Anaconda Distribution.
- Step2. Install a Docker, OSF Distribution.
- Step3. Download a FreeSurfer Licence using registration form. FreeSurfer allows to reconstruct anatomical surfaces of the brain.
- Step4. Install or update the fmriprep-docker image on Windows PowerShell (admin) prompt:
python -m pip install --user --upgrade fmriprep-docker
- Step5. Download your raw dataset in BIDS format
- Step6. Control the data format with BIDS validator online
- Step7. Write your specific fmriprep-docker command using the Standford tutorial. Here, an example for the command ‘fmriprep-docker’.
fmriprep-docker <BIDS data input path> <fmriprep_output path>
participant # group-level analysis
--fs-license-file <freeSurfer Licence path> --fs-no-reconall # no brain segmentation via FreeSurfer --ignore slicetiming --skip_bids_validation --stop-on-first-crash
If you are not comfortable with the python language, you can consult the 2 following websites:
- Python: Intro to Python for Data Science.
- Jupyter Notebooks: Jupyter Notebook Definitive Guide.
sh code https://github.com/andrewjahn/OpenScience_Scripts/blob/master/fmriprep_singleSubj.sh
Running fMRIPrep via Mesocentre *
Mesocentre is a High-Performance Computing centre of the University of Aix Marseille. You have to submit a call for projects to benefit from access rights. In this section, we present an overview of the steps to install fMRIPREP on Mesocentre. Tests were made on Windows 10. For more information about the possibilities of Mesocenter, see the tutorials on their website.
The connection frontend is the gateway to the mesocenter, its address is login.mesocenter.univ-amu.fr, it is accessed through the secure SSH (Secure Shell) protocol. The port used is port 22 (standard).
Document écrit par Julien Sein:
1) se connecter à Mesocentre via une clé SSH:
singularity build /scratch/achanoine/my_images/fmriprep–1.5.0.simg docker://poldracklab/fmriprep:1.5.0
pscp H:\fMRI\SLIP\RawData\sub-01\* /scratch/achanoine/test
%userprofile%\AppData\Local\Packages\
Puis dans le dossier qui commence par : CanonicalGroupLimited.UbuntuonWindows_
Puis dans \LocalState\rootfs
Avec freesurfer installé ici : Freesurfer => usr\local\freesurfer Et Brainvisa => opt\brainvisa
- Thanks to Julien Sein for his valuable help.
smriprep
- Install or update the smriprep-docker on Ubuntu
python -m pip install --user --upgrade smriprep
- See the doc, here
smriprep <BIDS data input path> <smriprep_output path>
participant # level analysis
--participant-label # list of participant identifiers or a single identifier
--fs-license-file <freeSurfer Licence path>
--fs-subjects-dir <freeSurfer directory> --skip_bids_validation --stop-on-first-crash
posted byValérie Chanoine on 2020/04/07