102acb1e520a68eed9cca59f1a39a0cfc3de84ab max Fri Aug 5 14:57:31 2016 -0700 fixing gbib speed problem after refseq change, refs #17842 diff --git src/browserbox/root/updateBrowser.sh src/browserbox/root/updateBrowser.sh index 9203fd3..c3cc641 100755 --- src/browserbox/root/updateBrowser.sh +++ src/browserbox/root/updateBrowser.sh @@ -312,30 +312,37 @@ # July 2016: add the cram fetcher to root's crontab # this has to be done after the PUSHLOC directory has been copied over if grep -q fetchCramReference /var/spool/cron/crontabs/root; then true else crontab -l | awk '{print} END {print "\n# handle CRAM auto reference download\n*/1 * * * * /root/fetchCramReference.sh /data/cramCache/pending /data/cramCache/ /data/cramCache/error/\n"}' | crontab - fi # also create the directories for the cram files # cram also requires that the directories are writable by the apache user if [ ! -d /data/cramCache ]; then mkdir -p /data/cramCache/pending /data/cramCache/error chown -R www-data:www-data /data/cramCache fi # -- end July 2016 +# July 2016: genbank tables are now in hgFixed. By touching a few files, we make sure that at least refseqStatus +# is rsync'ed later, otherwise gbib is really slow, refs #17842 +touch /data/mysql/hgFixed/refSeqStatus.MYI /data/mysql/hgFixed/refSeqStatus.MYD /data/mysql/hgFixed/refSeqStatus.frm +touch /data/mysql/hgFixed/refLink.MYI /data/mysql/hgFixed/refLink.MYD /data/mysql/hgFixed/refLink.frm +# we can now remove the old tables +rm -f /data/mysql/hg19/refSeqStatus* + if [ "$1" != "hgwdev" ] ; then echo updating MYSQL files - browser will not work during the MYSQL update # inspired by http://forums.mysql.com/read.php?35,45577,47063#msg-47063 # it doesn't work if I use two mysql invocations, as 'flush tables with read lock' # is only valid as long as the session is open # so I use the SYSTEM command echo "FLUSH TABLES WITH READ LOCK; SYSTEM rsync $RSYNCOPTS --existing rsync://hgdownload.cse.ucsc.edu/mysql/ /data/mysql/; SYSTEM chown -R mysql.mysql /data/mysql/; UNLOCK TABLES;" | mysql echo updating hgcentral database, make sure to always overwrite echo "FLUSH TABLES WITH READ LOCK; SYSTEM rsync -vrz --existing rsync://hgdownload.cse.ucsc.edu/mysql/hgcentral/ /data/mysql/hgcentral/; SYSTEM chown -R mysql.mysql /data/mysql/hgcentral; UNLOCK TABLES;" | mysql # update blat servers mysql hgcentral -e 'UPDATE blatServers SET host=CONCAT(host,".cse.ucsc.edu") WHERE host not like "%ucsc.edu"' # the box does not officially support the HAL right now, remove the ecoli hubs mysql hgcentral -e 'delete from hubPublic where hubUrl like "%nknguyen%"' fi