69485aeccc760b6d9db9e6ed6be817272f279635 max Sat Feb 13 03:23:32 2021 -0800 fixing fetchChromSizes for hg19-hg38 patch levels, no redmine, email from Beagon/Ana diff --git src/utils/userApps/fetchChromSizes src/utils/userApps/fetchChromSizes index ba15111..d58ddb8 100755 --- src/utils/userApps/fetchChromSizes +++ src/utils/userApps/fetchChromSizes @@ -16,30 +16,35 @@ Example: fetchChromSizes hg38 > hg38.chrom.sizes\n" 1>&2 exit 255 } DB=$1 export DB if [ -z "${DB}" ]; then usage fi DONE=0 export DONE url="http://hgdownload.soe.ucsc.edu/goldenPath/${DB}/bigZips/${DB}.chrom.sizes" +if [ "$DB" == "hg19" -o "$DB" == "hg38" ] ; then + printf "INFO: Using latest patch release of genome for hg19/hg38\n" 1>&2 + url="http://hgdownload.soe.ucsc.edu/goldenPath/${DB}/bigZips/latest/${DB}.chrom.sizes" +fi + printf "INFO: trying CURL ${CURL} for database ${DB}\n" 1>&2 printf "url: %s\n" "${url}" 1>&2 tmpResult=${DB}.tmp.sizes$$ curl ${url} \ -s > ${tmpResult} 2> /dev/null if [ $? -ne 0 -o ! -s "${tmpResult}" ]; then printf "WARNING: curl command failed\n" 1>&2 rm -f "${tmpResult}" else cat ${tmpResult} rm -f "${tmpResult}" DONE=1 fi if [ "${DONE}" -eq 1 ]; then