To run a local gyrification index (LGI) for several runs in parallel

From Cheaha
Revision as of 23:25, 21 October 2016 by Mhanby@uab.edu (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


Attention: Research Computing Documentation has Moved
https://docs.rc.uab.edu/


Please use the new documentation url https://docs.rc.uab.edu/ for all Research Computing documentation needs.


As a result of this move, we have deprecated use of this wiki for documentation. We are providing read-only access to the content to facilitate migration of bookmarks and to serve as an historical record. All content updates should be made at the new documentation site. The original wiki will not receive further updates.

Thank you,

The Research Computing Team

#!/bin/bash

#Make a jobs directory in your scratch space to store all the job scripts and results 
mkdir /scratch/user/$USER/jobs

#Define some variables to be used later
jobs=/scratch/user/$USER/jobs
sub=PATH_TO_SUBJECTS_DIRECTORY

for patient in `ls -1 $sub`
do

SUBJECTS_DIR=PATH_TO_SUBJECTS_DIRECTORY

echo "#!/bin/bash
#$ -S /bin/bash
#$ -cwd
#
#$ -N recon-all-$patient
# Set the hard and soft run time limits (ex: 1hour/58 min)
#$ -l h_rt=36:00:00,s_rt=30:55:00,vf=3000M
#$ -j y
#$ -M YOUR_EMAIL_ADDRESS
#$ -m eas

module load matlab/R2012a
module load freesurfer/freesurfer-5.3.0
SUBJECTS_DIR=PATH_TO_SUBJECTS_DIRECTORY
recon-all -s $patient -localGI" >> $patient.job

qsub $patient.job
done

You can copy the above script in your Jobs Directory in the scratch space and put appropriate value in place of YOUR_EMAIL_ADDRESS and PATH_TO_SUBJECTS_DIRECTORY

NOTE: For PATH_TO_SUBJECTS_DIRECTORY, give the full path.