-
Notifications
You must be signed in to change notification settings - Fork 0
/
single_species_build.sh
executable file
·95 lines (73 loc) · 2.02 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
88
89
90
91
92
93
#!/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
#if [ -z "$UPDATE_ONLY" ]
#then
# SKIPFLATFILE=" --skipflatfile "
# ONLYTRACKLIST=" --onlytracklist "
#else
# SLIPFLATFILE=" "
# ONLYTRACKLIST=" "
#fi
MAKEPATH=/website-genome-browsers/jbrowse/bin/make_jbrowse.pl
CONFPATH=/website-genome-browsers/jbrowse/conf/c_elegans.jbrowse.conf
LOGFILE=$SPECIES
LOGFILE+=".log"
#this is by far the longest running portion of the script (typically a few hours)
#$MAKEPATH $SKIPFLATFILE --conf $CONFPATH --quiet --species $SPECIES 2>1 | grep -v "Deep recursion"; mv 1 $LOGFILE
$MAKEPATH --conf $CONFPATH --quiet --species $SPECIES 2>1 | grep -v "Deep recursion"; mv 1 $LOGFILE
INLINEINCLUDEPATH=/website-genome-browsers/jbrowse/bin/inline_includes.pl
DATADIR=/jbrowse/data
cd $DATADIR
cp $SPECIES/trackList.json $SPECIES/trackList.json.orig
$INLINEINCLUDEPATH --bio $SPECIES --rel "$RELEASE" --file $SPECIES/trackList.json > $SPECIES/trackList.json.new
cp $SPECIES/trackList.json.new $SPECIES/trackList.json
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="test/WS$RELEASE/$SPECIES"
#$UPLOADTOS3PATH $ONLYTRACKLIST --bucket $AWSBUCKET --local "$SPECIES/" --remote $REMOTEPATH --AWSACCESS $AWSACCESS --AWSSECRET $AWSSECRET
$UPLOADTOS3PATH --bucket $AWSBUCKET --local "$SPECIES/" --remote $REMOTEPATH --AWSACCESS $AWSACCESS --AWSSECRET $AWSSECRET