-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_ht.sh
executable file
·60 lines (54 loc) · 996 Bytes
/
run_ht.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
#!/bin/bash
usage() {
echo "Usage: $0 [-r] input_sequence_file" 1>&2
echo " *input_sequence_file(located in research parent directory) must be provided"
echo " *-r option re-runs sfold first"
exit 1; }
rerun=0
OPTIND=1
while getopts "rh" opts; do
case "${opts}" in
h)
usage
;;
r)
rerun=1
;;
*)
usage
;;
esac
done
shift $((OPTIND-1))
if [ $# -ne 1 ]; then
usage
fi
#initialize env variables
echo "setting environment up"
. ./set_env.sh
if [ $? -ne 0 ]
then
exit 1
fi
sequence=$RESEARCH/$1
if [ -f $RESEARCH ]; then
:
else
sequence=$1
fi
#run sfold
if [ $rerun -eq 1 ]; then
echo "running sfold binary"
$RESEARCH/sfold-2.2/bin/sfold $sequence
if [ $? -ne 0 ]
then
exit 1
fi
fi
#run sampling algorithm on sfold output
echo "running sampling algorithm"
python3 ht_sampling.py output/sample_1000.out $sequence
if [ $? -ne 0 ]
then
exit 1
fi