Using Freesurfer on Apple Xgrid


Under development.


Freesurfer jobs can be run on the XGrid. The advantage of this approach is that you can submit hundreds of jobs to run and the controller will automatically allocate each freesurfer instance to an available processor. This will maximize processing power and get the total number of jobs completed in the least amount of time.

Generic Script

To begin, copy the script example below and save the file somewhere handy. Call the file xgridFS_submit.sh.

export NO_FSFAST=1

#setup Freesurfer
export FREESURFER_HOME=/usr/local/freesurfer
#source $FREESURFER_HOME/SetUpFreeSurfer.sh
. $FREESURFER_HOME/SetUpFreeSurfer.sh

SUBJECTS_DIR=$(pwd)

for FS in $*
do
   subjectID=$(/bin/echo $FS | /usr/bin/sed 's/.nii//')
   recon-all -s $subjectID -i $FS -all
done

Submitting Jobs