d7d1c06cce94bfb5abced6d45f2f6ad3e2dbd2db hiram Wed Dec 29 12:47:26 2021 -0800 updated scripts to tolerate database assemblies in the listings no redmine diff --git src/hg/makeDb/doc/asmHubs/verifyOnDownload.sh src/hg/makeDb/doc/asmHubs/verifyOnDownload.sh index bf03807..45a8e30 100755 --- src/hg/makeDb/doc/asmHubs/verifyOnDownload.sh +++ src/hg/makeDb/doc/asmHubs/verifyOnDownload.sh @@ -7,49 +7,58 @@ printf "where is something like:\n" 1>&2 printf "api-test.gi.ucsc.edu - to use the hgwdev server\n" 1>&2 printf "apibeta.soe.ucsc.edu - to use the hgwbeta server\n" 1>&2 exit 255 fi # printf "usage: ./verifyOnDownload.sh \n" 1>&2 # ${toolsDir}/mkSendList.pl ${orderList} | while read F; do \ # ${toolsDir}/verifyOnDownload.sh $$F < /dev/null; done export host=$1 export orderList=$2 export successCount=0 export doneCount=0 +export dbHost="localhost" export hubSource="hgdownload-test.gi.ucsc.edu" if [ "${host}" = "apibeta.soe.ucsc.edu" ]; then hubSource="hgdownload.soe.ucsc.edu" fi for dirPath in `~/kent/src/hg/makeDb/doc/asmHubs/mkSendList.pl "${orderList}"` do ((doneCount=doneCount+1)) export genome=`basename $dirPath` -# hubCount=`wget -O- https://hgdownload.soe.ucsc.edu/hubs/${dirPath}/hub.txt 2> /dev/null | wc -l` -# if [ "${hubCount}" -lt 200 ]; then -# printf "%d\t%s\tWARNING\n" "${hubCount}" "${dirPath}" -# fi -# else -# printf "%d\t%s/hub.txt line count\n" "${hubCount}" "${dirPath}" - + case $genome in + GC*) trackCount=`curl -L "https://$host/list/tracks?genome=$genome;trackLeavesOnly=1;hubUrl=https://$hubSource/hubs/${dirPath}/hub.txt" \ 2> /dev/null | python -mjson.tool | egrep ": {$" \ | tr -d '"' | sed -e 's/^ \+//; s/ {//;' | xargs echo | wc -w` if [ "${trackCount}" -gt 14 ]; then ((successCount=successCount+1)) fi printf "%03d\t%s\t%d tracks:\t" "${doneCount}" "${genome}" "${trackCount}" curl -L "https://$host/list/hubGenomes?hubUrl=https://$hubSource/hubs/${dirPath}/hub.txt" 2> /dev/null \ | python -mjson.tool | egrep "organism\":|description\":" | sed -e "s/'/_/g;" \ | tr -d '"' | xargs echo \ | sed -e 's/genomes: //; s/description: //; s/organism: //; s/{ //g;' -# fi + ;; + *) + db=`echo $genome | tr -d '_'` + trackCount=`curl -L "https://$host/list/tracks?genome=$db;trackLeavesOnly=1" \ + 2> /dev/null | python -mjson.tool | egrep ": {$" \ + | egrep -v '"'$db'":' | tr -d '"' \ + | sed -e 's/^ \+//; s/ {//;' | xargs echo | wc -w` + if [ "${trackCount}" -gt 14 ]; then + ((successCount=successCount+1)) + fi + printf "%03d\t%s\t%d tracks:\t" "${doneCount}" "${db}" "${trackCount}" +hgsql -N -e "select organism,description,\",\",scientificName from dbDb where name=\"$db\";" hgcentraltest | tr "'" '_' | xargs echo | sed -e 's/ ,/,/;' + ;; + esac done export failCount=`echo $doneCount $successCount | awk '{printf "%d", $1-$2}'` printf "# checked %3d hubs, %3d success, %3d fail\n" "${doneCount}" "${successCount}" "${failCount}"