HW6: HCP Pipeline
Due 4/6. Members of the HCP presentation group are exempt from this homework as a course requirement.
Overview
Use singularity and the hcp container at /scratch/psyc5171/containers/hcpbids_4.0.sif
to preprocess some fMRI data.
You can apply hcp to either
- The example dataset at
/scratch/psyc5171/exercises/mbdata/bids
OR - The dataset that you have identified for your final presentation, provided your data meets the requirements of the HCP pipeline.
Demo Dataset
The demo dataset is adapted from ds001544 and contains a single subject and session with T1w, T2w, bold/sbref, and epi fieldmap modalities. Note that the scans have been renamed from the original dataset and some of the metadata has been modified.
Exercise
- Fork and clone this repository to the cluster.
- Edit the
sbatch_hcp.sh
script to run hcp. - Submit your job
- When hcp has successfully run, use git to add, commit, push, and pull request.
- Copy the
MNINonLinear
folder to your computer and check that you can open thesub-01.164k_fs_LR.wb.spec
file in Workbench Viewer.
You need to provide two directories for processing:
${BIDS_DIR}
is the full path to the BIDS folder. Since hcp does not modify the input BIDS folder, you do not need to copy the input data to your own directory.${OUT_DIR}
is the full path to a directory where the output files will go. This directory needs to be under your control and exist prior to running hcp (usemkdir
to create a new directory). For example, you might create the directory/scratch/${USER}/hw6/hcp
to store the output, and would replace the string${OUT_DIR}
with this path, so the line would read--bind /scratch/${USER}/hw6/hcp:/out
.- The command above needs to be in a SLURM script. You can adapt a script from your previous homework as a starting point. Don't forget to include the
module load singularity
command in your SLURM script. - See the slides for notes on resource needs.
git workarounds
-
To associate your clone with your GitHub username, run the command
git remote set-url origin \ https://${USER}@github.uconn.edu/${USER}/hw6.git
in your
hw6
directory. This will avoid theThe requested URL returned error: 403 Forbidden while accessing
error when pushing. -
Use the command
unset SSH_ASKPASS
prior to pushing to avoid the error(gnome-ssh-askpass:19484): Gtk-WARNING **: cannot open display:
-
When committing, you can specify a short commit message on the command line with the
-m
option:git commit -m 'commit message'
. If you do not do this, the default editor will open so you can write your commit message. The default is usuallyvi
.- Press
i
to enter insertion mode and write your message - Press
ctrl-c
oresc
to exit insertion mode - Type
:wq
to save and quit or:q!
to quite without saving
- Press
-
The command
git status
will show files that have changed since the last commit. -
The command
git log
will show the commit history
Resources
- The BIRC computing guide has some more detailed instructions on running fmriprep. The guide also provides instructions for downloading the container image, but this has already been done for you.
- The fmriprep webpage has additional documentation on the various options, and more detailed descriptions and references for various pipeline steps and outputs.
Troubleshooting
- Consult your sbatch log files for clues to the cause of errors, e.g. missing files.