Commit 2208db81 authored by Brent Womble's avatar Brent Womble
Browse files

Merge branch 'master' of gitlab.rc.uab.edu:brentwomble/vessels

parents edb77963 7dac1a8c
matlabbatch{1}.spm.spatial.preproc.channel.vols = {'/data/scratch/kecannon/brainhack2018/raw_data/MPRAGE GRAPPA2/NIFTI/MPRAGE_GRAPPA2.nii'};
%%Individual job for a Cheaha node
%%script needs to be in ~/matlab/
function cheaha_vessels_segment(sub_dir, sub)
%Segment in SPM12 using modified TPMs, input should be a directory and a subject ID
%Add SPM12 and Nifti tools to the path
addpath('/share/apps/vbc/matlab/toolbox/spm12');
sub_folder = [sub_dir,'/',sub,'/'];
matlabbatch{1}.spm.spatial.preproc.channel.vols = {[sub_folder,'r',sub,'_T1.nii,1']};
matlabbatch{1}.spm.spatial.preproc.channel.biasreg = 0.001;
matlabbatch{1}.spm.spatial.preproc.channel.biasfwhm = 60;
matlabbatch{1}.spm.spatial.preproc.channel.write = [0 0];
......
#!/bin/bash
jobs=/data/user/bwomble/jobs_old_segment
sub_dir=/data/user/bwomble/Input_old_segment
mkdir $jobs
cd $sub_dir
for sub in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
do
#Create job script files
cat > $jobs/old_segment_$sub.sh <<EOF
#!/bin/bash
cd $sub_dir/$subject/
module load rc/matlab/R2013a
matlab -nodesktop -nosplash -r "cheaha_old_segment('$sub_dir','$sub')"
EOF
done
for sub in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
do
#Submit jobs
pushd $jobs
echo "submitting segment job for $sub"
sbatch --job-name=old_segment_$sub --output=old_segment_$sub.txt --ntasks=1 --partition=long --mem-per-cpu=4096 --time=150:00:00 old_segment_$sub.sh
popd
done
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment