3cc8e060d62a38f811bfe8b66f3a33c1ca5049fd
hiram
  Sat Sep 13 09:00:04 2025 -0700
temporary work around bugs in RepeatMasker code

diff --git src/hg/utils/automation/asmHubRepeatMasker.sh src/hg/utils/automation/asmHubRepeatMasker.sh
index 92e0225f4c5..878f116a7d6 100755
--- src/hg/utils/automation/asmHubRepeatMasker.sh
+++ src/hg/utils/automation/asmHubRepeatMasker.sh
@@ -39,32 +39,35 @@
 export RepeatMaskerPath="/hive/data/staging/data/RepeatMasker221107"
 
 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 "# using faAlign file: %s\n" "${faAlign}" 1>&2
     printf "time $RepeatMaskerPath/util/rmToTrackHub.pl -sizes \"${chrSizes}\" -genome \"${asmId}\" -hubname \"${asmId}\" -out \"${rmOutFile}\" -align \"${faAlign}\"\n" 1>&2
     time $RepeatMaskerPath/util/rmToTrackHub.pl -sizes "${chrSizes}" -genome "${asmId}" -hubname "${asmId}" -out "${rmOutFile}" -align "${faAlign}"
+    awk -F$'\t' '$15 > -1 && $13 > -1' "$asmId.fa.align.tsv" | sort -k1,1 -k2,2n > t.tsv
+    rm -f "$asmId.fa.align.tsv"
+    mv t.tsv "$asmId.fa.align.tsv"
     # in place same file sort using the -o output option
-    sort -k1,1 -k2,2n -o "${asmId}.fa.align.tsv" "${asmId}.fa.align.tsv" &
+#    sort -k1,1 -k2,2n -o "${asmId}.fa.align.tsv" "${asmId}.fa.align.tsv" &
   else
     printf "# there is no faAlign file\n" 1>&2
     printf "time $RepeatMaskerPath/util/rmToTrackHub.pl -sizes \"${chrSizes}\" -genome \"${asmId}\" -hubname \"${asmId}\" -out \"${rmOutFile}\"\n" 1>&2
     time $RepeatMaskerPath/util/rmToTrackHub.pl -sizes "${chrSizes}" -genome "${asmId}" -hubname "${asmId}" -out "${rmOutFile}"
   fi
   sort -k1,1 -k2,2n -o "${asmId}.sorted.fa.join.tsv" "${asmId}.sorted.fa.join.tsv" &
   wait
   printf "bedToBigBed -tab -as=$HOME/kent/src/hg/lib/bigRmskBed.as -type=bed9+5
     \"${asmId}.sorted.fa.join.tsv\" \"${chrSizes}\"
       \"${asmId}.rmsk.bb\" &\n" 1>&2
   bedToBigBed -tab -as=$HOME/kent/src/hg/lib/bigRmskBed.as -type=bed9+5 \
     "${asmId}.sorted.fa.join.tsv" "${chrSizes}" \
       "${asmId}.rmsk.bb" &
   if [ -s "${asmId}.fa.align.tsv" ]; then
     printf "bedToBigBed -tab -as=$HOME/kent/src/hg/lib/bigRmskAlignBed.as