-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrun-beagle.sh
executable file
·50 lines (45 loc) · 1.15 KB
/
run-beagle.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
# Written 2013 by Peter Ralph and Graham Coop
#
# contact: [email protected]
#
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
#
#
# Run beagle.
# remove previous lock file
if [[ -e run-beagle-finished ]]
then
rm run-beagle-finished
fi
DATAFILE=$1
if ! [[ -e $DATAFILE ]]
then
echo "File" $DATAFILE "does not exist."
echo "Usage: ./run-beagle.sh DATAFILE [NRUNS]"
exit 1
fi
if [[ $# -gt 1 ]]
then
NRUNS=$2
else
NRUNS=1
fi
if [[ -e /home/tmp ]]
then
JAVA="java -Djava.io.tmpdir=/home/tmp"
else
JAVA="java"
fi
echo "using" $JAVA
for k in $(seq $NRUNS)
do
BFIX=$RANDOM
nice -19 $JAVA -Xmx1500m -jar /usr/local/beagle/beagle.jar \
unphased=$DATAFILE missing=0 fastibd=true seed=$BFIX gprobs=false \
out=$BFIX &>$BFIX-beagle.log
done
touch run-beagle-finished
exit 0