-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathexample_run_maTT.sh
executable file
·74 lines (57 loc) · 2.41 KB
/
example_run_maTT.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# did you checkout the maTT2 example? because it does the same thing
# as maTT, but much faster. At this point, I'd really only recommend
# this old maTT version for people who _really_ know what they are
# doing and have decided this is the functionality they want...
####################################################################
####################################################################
# SETUP FSL HERE (however it is done on your system)
# export FSLDIR=/programs/fsl/
# source ${FSLDIR}/etc/fslconf/fsl.sh
# SETUP FREESUFER HERE (however it is done on your system)
# module load freesurfer/5.3.0
####################################################################
####################################################################
# export variables to maTT_main.sh
export atlasBaseDir=${PWD}/atlas_data/
export scriptBaseDir=${PWD}/
# make a list from these options:
# nspn500 gordon333 yeo17dil hcp-mmp-b schaefer100-yeo17
# schaefer200-yeo17 schaefer400-yeo17 schaefer600-yeo17 schaefer800-yeo17
export atlasList="schaefer100-yeo17 schaefer200-yeo17 yeo17"
####################################################################
####################################################################
# subject variables
subj="my_subject"
inputFSDir="/path/to/freesurfer/${subj}/"
outputDir="/output/to/somwhere/${subj}/"
mkdir -p ${outputDir}
####################################################################
####################################################################
# go into the folder where we also want output and setup notes file!
cd ${outputDir}
OUT="maTT_notes.txt"
touch $OUT
####################################################################
####################################################################
# run the script
# script inputs:
# -d inputFSDir --> input freesurfer directory
# -o outputDir ---> output directory, will also write temporary
# files here
# optional inputs:
# -r refBrain ----> file to be used as reference when transfering
# aparc+aseg.mgz to orginal (native) space.
# -n numThread ---> number of parallel processes to use when doing
# the label transfer
start=`date +%s`
cmd="${scriptBaseDir}/src/maTT_main.sh \
-d ${inputFSDir} \
-o ${outputDir} \
"
echo $cmd
eval $cmd | tee -a ${OUT}
# record how long that took!
end=`date +%s`
runtime=$((end-start))
echo "runtime: $runtime"