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

From UABgrid Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> #!/bin/bash #Make a jobs directory in your scratch space to store all the job scripts and results mkdir /scratch/user/blazerid/jobs #Define some variables to be used ...")
 
Line 3: Line 3:
  
 
#Make a jobs directory in your scratch space to store all the job scripts and results  
 
#Make a jobs directory in your scratch space to store all the job scripts and results  
mkdir /scratch/user/blazerid/jobs
+
mkdir /scratch/user/$USER/jobs
  
 
#Define some variables to be used later
 
#Define some variables to be used later
jobs=/scratch/user/blazerid/jobs
+
jobs=/scratch/user/$USER/jobs
 
sub=PATH_TO_SUBJECTS_DIRECTORY
 
sub=PATH_TO_SUBJECTS_DIRECTORY
  

Revision as of 18:23, 21 October 2016

#!/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 blazerid@uab.edu
#$ -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 values in place of blazerid and PATH_TO_SUBJECTS_DIRECTORY

NOTE: For PATH_TO_SUBJECTS_DIRECTORY, give the full path.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox