Commit 148e8aa0 authored by Brent Womble's avatar Brent Womble
Browse files

Change segment parameters. Update file names and paths. Set for loop to try 6 subjects as a test.

parent 2208db81
......@@ -9,42 +9,42 @@ 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.vols = {[sub_folder,'T1w_acpc_dc.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];
matlabbatch{1}.spm.spatial.preproc.tissue(1).tpm = {'/data/scratch/kecannon/brainhack2018/Blood/TPM-blood.nii,1'};
matlabbatch{1}.spm.spatial.preproc.tissue(1).ngaus = 1;
matlabbatch{1}.spm.spatial.preproc.tissue(1).native = [1 0];
matlabbatch{1}.spm.spatial.preproc.tissue(1).warped = [0 0];
matlabbatch{1}.spm.spatial.preproc.tissue(1).warped = [0 1];
matlabbatch{1}.spm.spatial.preproc.tissue(2).tpm = {'/data/scratch/kecannon/brainhack2018/Blood/TPM-blood.nii,2'};
matlabbatch{1}.spm.spatial.preproc.tissue(2).ngaus = 1;
matlabbatch{1}.spm.spatial.preproc.tissue(2).native = [1 0];
matlabbatch{1}.spm.spatial.preproc.tissue(2).warped = [0 0];
matlabbatch{1}.spm.spatial.preproc.tissue(2).warped = [0 1];
matlabbatch{1}.spm.spatial.preproc.tissue(3).tpm = {'/data/scratch/kecannon/brainhack2018/Blood/TPM-blood.nii,3'};
matlabbatch{1}.spm.spatial.preproc.tissue(3).ngaus = 2;
matlabbatch{1}.spm.spatial.preproc.tissue(3).native = [1 0];
matlabbatch{1}.spm.spatial.preproc.tissue(3).warped = [0 0];
matlabbatch{1}.spm.spatial.preproc.tissue(3).warped = [0 1];
matlabbatch{1}.spm.spatial.preproc.tissue(4).tpm = {'/data/scratch/kecannon/brainhack2018/Blood/TPM-blood.nii,4'};
matlabbatch{1}.spm.spatial.preproc.tissue(4).ngaus = 3;
matlabbatch{1}.spm.spatial.preproc.tissue(4).native = [1 0];
matlabbatch{1}.spm.spatial.preproc.tissue(4).warped = [0 0];
matlabbatch{1}.spm.spatial.preproc.tissue(4).warped = [0 1];
matlabbatch{1}.spm.spatial.preproc.tissue(5).tpm = {'/data/scratch/kecannon/brainhack2018/Blood/TPM-blood.nii,5'};
matlabbatch{1}.spm.spatial.preproc.tissue(5).ngaus = 4;
matlabbatch{1}.spm.spatial.preproc.tissue(5).native = [1 0];
matlabbatch{1}.spm.spatial.preproc.tissue(5).warped = [0 0];
matlabbatch{1}.spm.spatial.preproc.tissue(5).warped = [0 1];
matlabbatch{1}.spm.spatial.preproc.tissue(6).tpm = {'/data/scratch/kecannon/brainhack2018/Blood/TPM-blood.nii,6'};
matlabbatch{1}.spm.spatial.preproc.tissue(6).ngaus = 2;
matlabbatch{1}.spm.spatial.preproc.tissue(6).native = [1 0];
matlabbatch{1}.spm.spatial.preproc.tissue(6).warped = [0 0];
matlabbatch{1}.spm.spatial.preproc.tissue(6).warped = [0 1];
matlabbatch{1}.spm.spatial.preproc.tissue(7).tpm = {'/data/scratch/kecannon/brainhack2018/Blood/TPM-blood.nii,7'};
matlabbatch{1}.spm.spatial.preproc.tissue(7).ngaus = 1;
matlabbatch{1}.spm.spatial.preproc.tissue(7).ngaus = Inf;
matlabbatch{1}.spm.spatial.preproc.tissue(7).native = [1 0];
matlabbatch{1}.spm.spatial.preproc.tissue(7).warped = [0 0];
matlabbatch{1}.spm.spatial.preproc.tissue(7).warped = [0 1];
matlabbatch{1}.spm.spatial.preproc.warp.mrf = 1;
matlabbatch{1}.spm.spatial.preproc.warp.cleanup = 1;
matlabbatch{1}.spm.spatial.preproc.warp.cleanup = 0;
matlabbatch{1}.spm.spatial.preproc.warp.reg = [0 0.001 0.5 0.05 0.2];
matlabbatch{1}.spm.spatial.preproc.warp.affreg = 'mni';
matlabbatch{1}.spm.spatial.preproc.warp.fwhm = 0;
matlabbatch{1}.spm.spatial.preproc.warp.samp = 1;
matlabbatch{1}.spm.spatial.preproc.warp.write = [0 0];
\ No newline at end of file
matlabbatch{1}.spm.spatial.preproc.warp.write = [0 0];
#!/bin/bash
jobs=/data/user/bwomble/jobs_old_segment
sub_dir=/data/user/bwomble/Input_old_segment
jobs=/data/scratch/kecannon/brainhack2018/HCP_jobs1
sub_dir=/data/scratch/kecannon/brainhack2018/HCP
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
for sub in `find 99*`
#Test with 6 folders
do
#Create job script files
cat > $jobs/old_segment_$sub.sh <<EOF
cat > $jobs/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')"
matlab -nodesktop -nosplash -r "cheaha_vessels_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
for sub in `find 99*`
#Test with 6 folders
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
sbatch --job-name=segment_$sub --output=segment_$sub.txt --ntasks=1 --partition=long --mem-per-cpu=4096 --time=150:00:00 segment_$sub.sh
popd
done
\ No newline at end of file
done
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