FreeSurfer Software Suite is an open source software suite for processing and
analyzing (human) brain MRI images. FreeSurfer applications include: Skullstripping, Image Regisitration, Subcortical Segmentation, Cortical
Surface Reconstruction, Cortical Segmentatoin, Cortical Thickness Estimation,
Longitudinal Processing, fMRI Analysis, Tractography, FreeView Visualization
GUI, and much more!
This page is designed to show users how to submit batch jobs on the SCC for the FreeSurfer reconstruction application recon-all and how to access the FreeView
GUI for viewing/editing brains. For further instructions on FreeSurfer processing
pipelines, please see the tutorial materials on the Developer Site.
FreeSurfer versions 4.5, 5.1, 5.3, and 6.0 are available on SCC and scc-lite
through BU ENG-IT software distribution. Batch processing is only accessible
on SCC (not scc-lite). The FreeView GUI works best when using
VNC with OpenGL on SCC (details below).
Recon-all performs all, or any part of, the FreeSurfer cortical
reconstruction process. In order to call recon-all on multiple subjects
in parallel on SCC, a starter script recon-all.qsub has been provided
and should be called as:
[clarkdc@scc1:scv]$ qsub recon-all.qsub sessid
where sessid is a text file containing a list of subject IDs:
Please make sure to open recon-all.qsub and edit your Project (line 5),
number of subjects (line 21), and SUBJECTS_DIR (line 28) before submitting.
[clarkdc@scc1:scv]$ vim recon-all.qsub
1 #!/bin/bash -l
3 #<-- MANDATORY USER EDIT HERE -->
4 # Set SCC project
5 #$ -P scv
7 # Request a node with minimum 4 GB of memory per core as recommended by freesurfer
8 #$ -l mem_per_core=4G
10 # Send an email when the job finishes or if it is aborted (by default no email is sent).
11 #$ -m ea
13 # Give job a name
14 #$ -N recon-all
16 # Combine output and error files into a single file
17 #$ -j y
19 #<-- MANDATORY USER EDIT HERE -->
20 # Submit an array job with N tasks
21 #$ -t 1-2
23 # Load desired version of freesurfer
24 module load freesurfer/6.0
26 # <--- MANDATORY USER EDIT HERE --->
27 # Set environment variables
28 export SUBJECTS_DIR=/usr3/bustaff/clarkdc/freesurfer/SUBJECTS_DIR/
Note: This script calls recon-all from FreeSurfer 6.0. In order to
change versions, please change the module load freesurfer/6.0 command to the
Create a VNC Password
If you have not used VNC on SCC, you must create a password.
Create a VNC with OpenGL Session
From SCC, run the "qvgl" command to create VNC with OpenGL session. Read the
instructions and take special note of the command printed under "on your local
workstation run:" to be run in the next step.
Waiting for immediate job to be scheduled.
on your local workstation run:
ssh firstname.lastname@example.org -L XXXX:localhost:5911
then execute vncviewer to connect to localhost port XXXX
to run an OpenGL application on a hardware GPU use vglrun command
to quit the job please run:
Forward the VNC Port
From a local computer, open a new terminal and setup port forwarding for the
hostname and port advertised in the VirtualGL session info. Note that for the
local port, I have choosen port 7000 in place of "XXXX".
From your local computer, use a VNC client to connect to the forwarded port. Use
the password you created with "vncpasswd" in step 1 as the password. The image
below is "MobaXterm VNC" on Windows, but any standard client should work with similar settings.
In the VNC window, open "Terminal", load the FreeSurfer module to set up the
FreeSurfer environment, and use vglrun to run FreeView.
"Terminal" can be found in Applications > System Tools > Terminal
Document written by Dustin Clark on 10/13/2017. Last modified on 10/13/2017.
Note: Research Computing Services (RCS) example programs are provided
"as is" without any warranty of any kind. The user assumes the entire risk of
quality, performance, and repair of any defects. You are encouraged to copy
and modify any of the given examples for your own use.