Preprocessing fMRI data
Preprocessing fMRI data#
The steps here are required if you want to fully rerun the analysis.
If you are not a SIMEXP member on Aliance Canada,
you will need to clone fMRIPrep-slurm and modify paths accordingly.
All scripts are under scripts/preprocessing
.
If you wish to use the produced metrics to generate the book, feel free to skip this section.
preprocessing/get_fmriprep.sh
:We need to build the fMRIPrep singularity containers version
20.2.1
(fMRIPrep-slurm default) and20.2.5
. For details, please find the documentation on niprep. Alternatively, you can execute the script preparedget_fmriprep.sh
. We recommend building the container in a tmux session. This will take a few hours! Run it before going home.preprocessing/get_datasets.sh
:While running Step 1 you can get the OpenNeuro datasets in parallel. Run the script in a tmux session. This will take an hour or so.
preprocessing/create_fmriprep_slurm_scripts.sh
:After the containers are built and datasets downloaded, we generate the slurm files using fMRIPrep-slurm.
Remember to check your script to make sure everything runs correctly. This will take the time of a coffee break.
Run fmriprep
fMRIPrep-slurm will give you the exact commands you need to run. It should be something looking like this:
find /scratch/${USER}/ds000228/UNIXTIME/.slurm/smriprep_sub-*.sh -type f | while read file; do sbatch "$file"; done
This process will take up a day.