e23fb89fb5db425125e18013e6be747164d0599f
jcasper
  Thu May 12 20:36:14 2022 -0700
Updating DECIPHER otto pipeline for new retrieval method, refs #29130

diff --git src/hg/utils/otto/decipher/checkDecipher.sh src/hg/utils/otto/decipher/checkDecipher.sh
index 6496a2a..c885ee4 100755
--- src/hg/utils/otto/decipher/checkDecipher.sh
+++ src/hg/utils/otto/decipher/checkDecipher.sh
@@ -1,82 +1,67 @@
 #!/bin/sh -e
 set -eEu -o pipefail
 #	Do not modify this script, modify the source tree copy:
 #	src/utils/decipher/checkDecipher.sh
 #	This script is used via a cron job and kept in $HOME/bin/scripts/
 
 #	cron jobs need to ensure this is true
 #       current login requires the user be braney
 umask 002
 
 trap reportErr ERR
 
 function reportErr
 {
     echo "ERROR: DECIPHER pipeline failed"
     exit 1;
 }
 
 
 WORKDIR="/hive/data/outside/otto/decipher"
 export WORKDIR
 
 #	this is where we are going to work
 if [ ! -d "${WORKDIR}" ]; then
     echo "ERROR in DECIPHER release watch, Can not find the directory:
     ${WORKDIR}" 
     exit 255
 fi
 
 cd "${WORKDIR}"
+curl --silent -K curl.config -o decipher-variants-grch38.bed
 
-#ftppass=`cat ftp.pwd`
-#gpgpass=`cat gpg.pwd`
-
-perl login.perl > /dev/null 2>&1
-
-if test decipher-variants*.gpg -nt lastUpdate
+if [ ! -s decipher-variants-grch38.md5 ] || ! md5sum -c --status decipher-variants-grch38.md5
 then
+    mkdir -p ${WORKDIR}/release/hg38
+
     today=`date +%F`
     mkdir -p $today
-
-    CNV=decipher-cnvs*.gpg
-    SNV=decipher-snvs*.gpg
-    cp -p $CNV $SNV $today
-
+    cp -p decipher-variants-grch38.bed $today
     cd $today
 
-    # unpack the gpg encrypted file
-    gpg --batch --passphrase-file "../gpg.pwd.new" ${CNV}
-    gpg --batch --passphrase-file "../gpg.pwd.new" ${SNV}
-
-    mkdir -p ${WORKDIR}/release/{hg38,hg19}
-
     # build the new DECIPHER track tables (builds bigBed for cnv's)
-    # THIS NEEDS TO CHANGE - NEW ARGUMENT IS JUST ONE VARIANT FILE FROM DECIPHER,
-    # BUT FIRST WE'LL NEED TO FIX THE FETCH SCRIPT
-    ../buildDecipher `basename $CNV .gpg` `basename $SNV .gpg`
-    ../validateDecipher.sh hg38
-    #../validateDecipher.sh hg19
+    ../buildDecipher decipher-variants-grch38.bed
+    ../validateDecipher.sh
 
     # now install
-    #for db in hg38 hg19
     for db in hg38
     do
         for i in `cat ../decipher.tables`
         do 
         n=$i"New"
         o=$i"Old"
         hgsqlSwapTables $db $n $i $o -dropTable3
         done
     done
+    cp -p --remove-destination decipherCnv.bb ../release/hg38/decipherCnv.bb
 
     echo "DECIPHER Installed `date`" 
 
-    # Variants BED will be updated for both CNV and SNV updates
     cd ${WORKDIR}
-    cp -p decipher-var*.gpg lastUpdate
+    # Update our md5sum record
+    md5sum decipher-variants-grch38.bed > decipher-variants-grch38.md5
 else
     echo "No update"
 fi
 
-rm decipher-*
+rm decipher-variants-grch38.bed