-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsampling.sh
executable file
·79 lines (72 loc) · 1.77 KB
/
sampling.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
73
74
75
76
77
78
79
#!/bin/bash
. ./set_env.sh
OUTPUTDIR=$RESEARCH/output_files
INPUTDIR=$RESEARCH/input_files
sampling_num=20
OPTIND=1
directory=0
file=0
echo $2
while getopts "df" opts; do
case "${opts}" in
d)
directory=1
;;
f)
file=1
d=$2
;;
*)
:
;;
esac
done
shift $((OPTIND-1))
if [ $directory -eq 1 ]; then
for d in $INPUTDIR/*.fa; do
temp=0
name=${d%.*}
name=${name##*/}
FILENAME=$OUTPUTDIR/$name
while [ $temp -lt $sampling_num ]; do
if [ $temp -eq 0 ]; then
echo Iteration $temp : $name
echo Iteration $temp > $FILENAME
echo '' >> $FILENAME
`bash $RESEARCH/run_ht.sh -r $d >> $FILENAME`
else
echo Iteration $temp : $name
echo '' >> $FILENAME
echo '' >> $FILENAME
echo Iteration $temp >> $FILENAME
echo '' >> $FILENAME
echo '' >> $FILENAME
`bash $RESEARCH/run_ht.sh $d >> $FILENAME`
fi
temp=$[$temp+1]
done
done
fi
if [ $file -eq 1 ]; then
temp=0
name=${d%.*}
name=${name##*/}
FILENAME=$OUTPUTDIR/$name
while [ $temp -lt $sampling_num ]; do
if [ $temp -eq 0 ]; then
echo Iteration $temp : $name
echo Iteration $temp > $FILENAME
echo '' >> $FILENAME
`bash $RESEARCH/run_ht.sh -r $d >> $FILENAME`
else
echo Iteration $temp : $name
echo '' >> $FILENAME
echo '' >> $FILENAME
echo Iteration $temp >> $FILENAME
echo '' >> $FILENAME
echo '' >> $FILENAME
`bash $RESEARCH/run_ht.sh $d >> $FILENAME`
fi
temp=$[$temp+1]
done
fi