-
Notifications
You must be signed in to change notification settings - Fork 0
/
runGenSubjList.sh
executable file
·51 lines (41 loc) · 1.01 KB
/
runGenSubjList.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
#!/bin/bash
# if [ "$#" -lt 1 ]
# then
# echo "Usage: $0 < -f FEATURE > <subjids>"
# exit 0
# fi
while getopts "f:" options; do
case $options in
f ) echo " Using feature: $OPTARG"
Feature=$OPTARG;;
* ) usage
exit 1;;
esac
done
func_name=genSubjList
res=100um_5umPad
# Define required directories
data_dir=~/EpilepsyQuantHistology/proc
list_dir=~/EpilepsyQuantHistology/graham-histproc/subjects
searchpath=./code
#Load Matlab
module load matlab
# Print inputs
if [ -z "$Feature" ]
then
echo "Feature Map: Count (defualt)"
else
echo Feature Map: $Feature
fi
echo INPUT: $data_dir
echo OUTPUT DIRECTORY: $list_dir
outDir=$data_dir/${res}_SubjList
echo OUTPUT DIRECTORY: $outDir
# check if directory does not exist!
if [ ! -e $outDir ]
then
mkdir $outDir
fi
# Run Matlab
echo "addpath(genpath('$searchpath')); $func_name('$data_dir','$list_dir','$outDir','$Feature'); exit" | matlab -nosplash -nodesktop
echo ......................................... DONE ..............................................