a074cd2a4d68363db2f1b6381bab63363df0bded hiram Tue Dec 6 13:56:52 2022 -0800 better detection of rmblastn path with new configuration file and allow chrom.sizes to be found in current directory no redmine diff --git src/hg/utils/automation/asmHubRepeatMasker.sh src/hg/utils/automation/asmHubRepeatMasker.sh index 02f2c92..99081f9 100755 --- src/hg/utils/automation/asmHubRepeatMasker.sh +++ src/hg/utils/automation/asmHubRepeatMasker.sh @@ -7,32 +7,38 @@ set -beEu -o pipefail # ensure sort functions properly despite kluster node environment export LC_COLLATE=C if [ $# -ne 3 ]; then printf "%s\n" "usage: asmHubRepeatMasker.sh <asmId> <pathTo/*fa.out.gz> <destinationDir/>" 1>&2 exit 255 fi export dateStamp=`date "+%FT%T %s"` export asmId=$1 export rmOutFile=$2 export destDir=$3 +export chrSizes="" + +if [ -s "$destDir/$asmId.chrom.sizes" ]; then + chrSizes="$destDir/$asmId.chrom.sizes" +elif [ -s "../../$admId.chrom.sizes" ]; then + chrSizes="../../$asmId.chrom.sizes" +fi -export chrSizes="../../$asmId.chrom.sizes" # assume this file name pattern export faAlign=`echo "${rmOutFile}" | sed -e 's/sorted.fa.out/fa.align/; s/.gz//;'` export RepeatMaskerPath="/hive/data/staging/data/RepeatMasker210401" if [ -d "${destDir}" ]; then cd "${destDir}" # might already be gzipped if [ ! -s "${faAlign}" ]; then faAlign="${faAlign}.gz" fi # align file only exists when RM has been run locally, not for NCBI version # it is OK if it is missing, can do this anyway without it if [ -s "${faAlign}" ]; then printf "$RepeatMaskerPath/util/rmToTrackHub.pl -out \"${rmOutFile}\" -align \"${faAlign}\"\n" 1>&2