81ed6a428f3655d2f32f1cc523993632955e2e6f chmalee Fri Jul 24 17:04:40 2020 -0700 Fix up LOVD otto script after code review, refs #25925 diff --git src/hg/utils/otto/lovd/download.sh src/hg/utils/otto/lovd/download.sh index 789821d..14c6be7 100755 --- src/hg/utils/otto/lovd/download.sh +++ src/hg/utils/otto/lovd/download.sh @@ -1,38 +1,29 @@ #!/bin/sh -e # Do not modify this script, modify the source tree copy: # src/utils/lovd/check.sh # This script is used via a cron job # cron jobs need to ensure this is true umask 002 WORKDIR="/hive/data/outside/otto/lovd" # this is where we are going to work if [ ! -d "${WORKDIR}" ]; then echo "ERROR in lovd release, Can not find the directory: ${WORKDIR}" exit 255 fi cd "${WORKDIR}" today=`date +%F` mkdir -p $today cd $today # http request needs to come from hgwdev IP address otherwise file not found error -wget -q 'http://varcache.lovd.nl/bed/hg38?add_id_ncbi=1&add_annotation=1' -O - | grep -v track | grep -v ^$ > lovd.hg38.bed -wget -q 'http://varcache.lovd.nl/bed/hg19?add_id_ncbi=1&add_annotation=1' -O - | grep -v track | grep -v ^$ > lovd.hg19.bed -wget -q 'http://varcache.lovd.nl/bed/hg18?add_id_ncbi=1&add_annotation=1' -O - | grep -v track | grep -v ^$ > lovd.hg18.bed - -sed -i s/^/chr/g lovd.hg38.bed -sed -i s/^/chr/g lovd.hg19.bed -sed -i s/^/chr/g lovd.hg18.bed - -# effect:;lovd_count:1 -sed -i 's/effect:/Variant Effect: /g' lovd.hg38.bed -sed -i 's/effect:/Variant Effect: /g' lovd.hg19.bed -sed -i 's/effect:/Variant Effect: /g' lovd.hg18.bed - -sed -i 's/;lovd_count:/<br>Number of LOVD Installations reporting this variant: /g' lovd.hg38.bed -sed -i 's/;lovd_count:/<br>Number of LOVD Installations reporting this variant: /g' lovd.hg19.bed -sed -i 's/;lovd_count:/<br>Number of LOVD Installations reporting this variant: /g' lovd.hg18.bed +for db in hg38 hg19 +do + wget -q 'http://varcache.lovd.nl/bed/'${db}'?add_id_ncbi=1&add_annotation=1' -O - | grep -v track | grep -v ^$ > lovd.${db}.bed + sed -i s/^/chr/g lovd.${db}.bed + sed -i 's/effect:/Variant Effect: /g' lovd.${db}.bed + sed -i 's/;lovd_count:/<br>Number of LOVD Installations reporting this variant: /g' lovd.${db}.bed +done