46f246dc334a47ded8a439de133f6d94ef9dae81
hiram
  Thu May 7 14:40:00 2026 -0700
now working correctly with UCSC database assemblies for pushing the lift.over file out to hgdownload refs #31811

diff --git src/hg/utils/otto/userRequests/ottoRequestWatch.sh src/hg/utils/otto/userRequests/ottoRequestWatch.sh
index ad67f1b6422..95ec723df2e 100755
--- src/hg/utils/otto/userRequests/ottoRequestWatch.sh
+++ src/hg/utils/otto/userRequests/ottoRequestWatch.sh
@@ -300,56 +300,91 @@
 ############################################################################
 # phase 3: check for tracks done, setup symlinks set status=5 to indicate
 #          ready to push
 ############################################################################
 while IFS=$'\t' read -r reqId buildDir; do
   if [ ! -d "${buildDir}" ]; then
     printf "# WARNING: buildDir not found for request %s: %s\n" \
       "${reqId}" "${buildDir}" 1>&2
     continue
   fi
   source <(grep -E '^export (swapDir|targetDb|queryDb)=' "${buildDir}/kegAlign.sh")
   export trackData="$(dirname "${buildDir}")"
   export swapData="$(dirname "${swapDir}")"
   export workDir="$(basename "${buildDir}")"
   export swapWork="$(basename "${swapDir}")"
-  export doTdb="`dirname ${trackData}`/doTrackDb.bash"
-  export swapTdb="`dirname ${swapData}`/doTrackDb.bash"
+
+  # target direction: targetDb is target, queryDb is query, work in buildDir.
+  # GenArk targets use doTrackDb.bash sitting next to the trackData dir;
+  # UCSC native targets use chainNetTrackDb.pl which probes axtChain/*.bb
+  # in the build dir and writes a stanza into the otto kent clone.
+  rm -f "${trackData}/lastz.${queryDb}"
+  ln -s "${workDir}" "${trackData}/lastz.${queryDb}"
+  case "${targetDb}" in
+    GC[AF]_*)
+      doTdb="$(dirname "${trackData}")/doTrackDb.bash"
       if [ ! -x "${doTdb}" ]; then
         printf "ERROR: can not find %s\n" "${doTdb}" 1>&2
         setErrorStatus "${reqId}"
         continue
       fi
-  if [ ! -x "${swapTdb}" ]; then
-    printf "ERROR: can not find %s\n" "${swapTdb}" 1>&2
+      if ! "${doTdb}" >> /cluster/home/hiram/kent/src/hg/utils/otto/userRequests/doTdb.log 2>&1; then
+        printf "ERROR: %s failed\n" "${doTdb}" 1>&2
         setErrorStatus "${reqId}"
         continue
       fi
-  rm -f "${trackData}/lastz.${queryDb}"
-  ln -s "${workDir}" "${trackData}/lastz.${queryDb}"
-  if ! ${doTdb} > /dev/null 2>&1; then
-     printf "ERROR: %s failed\n" "${doTdb}" 1>&2
+      ;;
+    *)
+      if ! ( cd "${buildDir}" \
+             && "${scriptDir}/chainNetTrackDb.pl" \
+                  "${targetDb}" "${queryDb}" ); then
+        printf "ERROR: chainNetTrackDb.pl failed for %s/%s\n" \
+          "${targetDb}" "${queryDb}" 1>&2
         setErrorStatus "${reqId}"
         continue
       fi
+      ;;
+  esac
+
+  # swap direction: queryDb is target, targetDb is query, work in swapDir
   rm -f "${swapData}/lastz.${targetDb}"
   ln -s "${swapWork}" "${swapData}/lastz.${targetDb}"
-  if ! ${swapTdb} > /dev/null 2>&1; then
+  case "${queryDb}" in
+    GC[AF]_*)
+      swapTdb="$(dirname "${swapData}")/doTrackDb.bash"
+      if [ ! -x "${swapTdb}" ]; then
+        printf "ERROR: can not find %s\n" "${swapTdb}" 1>&2
+        setErrorStatus "${reqId}"
+        continue
+      fi
+      if ! "${swapTdb}" > /dev/null 2>&1; then
         printf "ERROR: %s failed\n" "${swapTdb}" 1>&2
         setErrorStatus "${reqId}"
         continue
       fi
+      ;;
+    *)
+      if ! ( cd "${swapDir}" \
+             && "${scriptDir}/chainNetTrackDb.pl" \
+                  "${queryDb}" "${targetDb}" ); then
+        printf "ERROR: chainNetTrackDb.pl failed for %s/%s\n" \
+          "${queryDb}" "${targetDb}" 1>&2
+        setErrorStatus "${reqId}"
+        continue
+      fi
+      ;;
+  esac
 
   # install liftOver and quickLift symlinks + register in hgcentraltest,
   # for both directions
   if ! installLinks "${targetDb}" "${queryDb}" "${buildDir}"; then
     setErrorStatus "${reqId}"
     continue
   fi
   if ! installLinks "${queryDb}" "${targetDb}" "${swapDir}"; then
     setErrorStatus "${reqId}"
     continue
   fi
 
   /cluster/bin/x86_64/hgsql -N -e \
       "UPDATE ottoRequest SET status = 5 WHERE id=${reqId};" hgcentraltest
 done < <(/cluster/bin/x86_64/hgsql -N -B -e \