579d4220eec5e357b78dc0deb459db6d1858af20
chmalee
  Mon Sep 14 12:06:57 2020 -0700
Add ClinGen Gene Disease validity track to new clingen composite, refs Ana email

diff --git src/hg/utils/otto/clinGen/makeGeneValidity.sh src/hg/utils/otto/clinGen/makeGeneValidity.sh
new file mode 100755
index 0000000..03472db
--- /dev/null
+++ src/hg/utils/otto/clinGen/makeGeneValidity.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# downloads and builds the ClinGen Gene Validity track
+# assumes running in the build directory:
+# /hive/data/outside/otto/clinGen/
+set -beEu -o pipefail
+
+WORKDIR=$1
+mkdir -p ${WORKDIR}/clinGenGeneValidity
+cd ${WORKDIR}/clinGenGeneValidity
+
+# the release directory, where gbdb symlinks will point
+if [ ! -d release ]; then
+    mkdir -p ${WORKDIR}/release/{hg19,hg38}
+fi
+
+#	see if anything is changing, if so, email notify, download, and build
+wget -q https://raw.githubusercontent.com/RedRiver1816/ClinGen_UCSC_Hub/master/hg19/hg19ClinGenBigBed.bb -O tempUpdate
+if [[ ! -e lastUpdate || tempUpdate -nt lastUpdate ]]; then
+    printf "New ClinGen Gene-Disease tracks hub:\nhttps://github.com/RedRiver1816/ClinGen_UCSC_Hub\n"
+    today=`date +%F`
+    mkdir -p $today
+    cd $today
+    hubClone -download https://raw.githubusercontent.com/RedRiver1816/ClinGen_UCSC_Hub/master/hub.txt
+    cp ClinGenHub/hg19/hg19ClinGenBigBed.bb ${WORKDIR}/release/hg19/clinGenGeneDisease.bb
+    cp ClinGenHub/hg38/hg38ClinGenBigBed.bb ${WORKDIR}/release/hg38/clinGenGeneDisease.bb
+    cd ..
+    mv tempUpdate lastUpdate
+    echo "ClinGen Gene-Disease update done: `date`"
+else
+    rm tempUpdate
+    echo "No update"
+fi