-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle_species_build.sh
executable file
·89 lines (68 loc) · 1.6 KB
/
single_species_build.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
80
81
82
83
84
85
86
87
#!/bin/bash
set -e
RELEASE=282
while getopts r:s:a:k: option
do
case "${option}"
in
r)
RELEASE=${OPTARG}
;;
s)
SPECIES=${OPTARG}
;;
a)
AWSACCESS=${OPTARG}
;;
k)
AWSSECRET=${OPTARG}
;;
esac
done
if [ -z "$RELEASE" ]
then
RELEASE=${WB_RELEASE}
fi
if [ -z "$SPECIES" ]
then
SPECIES=${WB_SPECIES}
fi
if [ -z "$AWSACCESS" ]
then
AWSACCESS=${AWS_ACCESS_KEY}
fi
if [ -z "$AWSSECRET" ]
then
AWSSECRET=${AWS_SECRET_KEY}
fi
if [ -z "$AWSBUCKET" ]
then
if [ -z "${AWS_S3_BUCKET}" ]
then
AWSBUCKET=agrjbrowse
else
AWSBUCKET=${AWS_S3_BUCKET}
fi
fi
echo "awsbucket:"
echo $AWSBUCKET
echo "species"
echo $SPECIES
echo "release"
echo $RELEASE
MAKEPATH=/website-genome-browsers/protein_schematic/bin/make_schematic.pl
CONFPATH=/website-genome-browsers/protein_schematic/bin/protein_build.conf
LOGFILE=$SPECIES
LOGFILE+=".log"
#this is by far the longest running portion of the script (typically a few hours)
echo "running build script"
$MAKEPATH --conf $CONFPATH --release $RELEASE --species $SPECIES
echo "finished running build script"
DATADIR=/jbrowse/data
cd $DATADIR
UPLOADTOS3PATH=/agr_jbrowse_config/scripts/upload_to_S3.pl
# this path will need to be fixed for "real" releases. Something like:
# REMOTEPATH="MOD-jbrowses/WormBase/WS$RELEASE/$SPECIES"
REMOTEPATH="MOD-jbrowses/WormBase/WS$RELEASE/protein/$SPECIES"
echo "$UPLOADTOS3PATH --bucket $AWSBUCKET --local $SPECIES --remote $REMOTEPATH --AWSACCESS $AWSACCESS --AWSSECRET $AWSSECRET"
$UPLOADTOS3PATH --bucket $AWSBUCKET --local $SPECIES --remote $REMOTEPATH --AWSACCESS $AWSACCESS --AWSSECRET $AWSSECRET