Skip to content

Commit 255fd20

Browse files
committed
debug and improve how to run fmriprep
1 parent f27d200 commit 255fd20

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

doc/cpp_fmriprep.slurm

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
#SBATCH --mail-user=marco.barilari@uclouvain.be
1212
#SBATCH --mail-type=ALL
13-
#SBATCH --output=/home/ucl/irsp/marcobar/jobs_report/fmriprep_job-%j.txt
13+
#SBATCH --output=/home/ucl/cosy/marcobar/jobs_report/fmriprep_job-%j.txt
1414

1515
#SBATCH --comment=project-name
1616

1717
#export OMP_NUM_THREADS=4
1818
#export MKL_NUM_THREADS=4
1919

20-
## CPP frmiprep script for CECI cluster v0.2.0
20+
## CPP frmiprep script for CECI cluster v0.3.0
2121
#
2222
# writtent by CPP people
2323
#
@@ -70,11 +70,15 @@ ceci_username="marcobar"
7070
# set fmriprep arguments
7171
nb_dummy_scans=0
7272

73+
# cluster paths
7374
path_to_singularity_image="$HOME/tools/containers/images/bids/bids-fmriprep--${FMRIPREP_VERSION}.sing"
74-
scratch_dir="/scratch/users/m/a/${ceci_username}"
75-
bids_dir="$HOME/fmriprep_trial/raw"
76-
output_dir="$HOME/fmriprep_trial/derivatives/fmriprep"
77-
freesurfer_license_folder="$HOME/tools/freesurfer_license"
75+
scratch_dir=$GLOBALSCRATCH
76+
freesurfer_license_folder="$HOME/tools"
77+
78+
# data paths
79+
root_dir="$HOME/path-to-project-yoda-fodler"
80+
bids_dir="$root_dir/inputs/raw"
81+
output_dir="$root_dir/outputs/derivatives/fmriprep"
7882

7983
# make the scratch folder, here there is no limit space and fmriprep can store stuff in case of crash and do not start from zero again
8084
mkdir -p "${scratch_dir}"/work-fmriprep
@@ -99,3 +103,8 @@ singularity run --cleanenv \
99103
--notrack \
100104
--skip_bids_validation \
101105
--stop-on-first-crash
106+
107+
108+
# more useful options to keep in mind:
109+
#
110+
# --fs-no-reconall # skip freesurfer segmentation

doc/run_fmriprep.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ To contribute see [here](https://cpp-lln-lab.github.io/CPP_HPC/contributing/)
1515

1616
## Prepare to run fmriprep on the cluster
1717

18-
- have your data on the cluster
18+
- have your data on the cluster and unlock them if they are managed by datalad
19+
- get your `freesurfer` license (user specific) for free [here](https://surfer.nmr.mgh.harvard.edu/registration.html) and move it to the cluster at `~/tools`
1920
- install datalad on your user (see [here](https://github.com/cpp-lln-lab/CPP_HPC/install_datalad))
2021
- get the fmriprep singularity image as follow:
2122

@@ -38,14 +39,12 @@ cd path/to/containers
3839
datald update --merge
3940
``````
4041

41-
Depending on the cluster “unlock” is needed or not. No need for `lemaitre3`. !!! TO CHECK ON LEMAITRE4
42+
Depending on the cluster “unlock” is needed or not. No need for `lemaitre4`.
4243

4344
```bash
4445
datalad unlock containers/images/bids/bids-fmriprep--24.0.0.sing
4546
```
4647

47-
- get your `freesurfer` license (user specific) for free [here](https://surfer.nmr.mgh.harvard.edu/registration.html) and move it to the cluster
48-
4948
## Submit a fmriprep job via a `slurm` script
5049

5150
- pros:
@@ -60,7 +59,7 @@ Content of the `cpp_fmriprep.slurm` file (download and edit from [here](cpp_fmri
6059
!!! Warning
6160

6261
1. Read the fmriprep documentation to know what you are doing and how the arguments of the run call effects the results
63-
2. All the paths and email are set afte Marco's users for demosntration.
62+
2. All the paths and email are set afte Marco's users for demosntration. Change them for your user.
6463
3. Edit the scripts with the info you need to make it run for your user from top to buttom of the script, do not over look the first "commented" chunk cause it is not a real commented section (check the email and job report path, data paths and the `username` etc.).
6564
6665
```bash

0 commit comments

Comments
 (0)