90552b46adcb6b1641a0e027e1cf722e411c9664
hiram
  Mon Aug 17 10:23:57 2026 -0700
now running the oneLftp.sh to fetch the NCBI files for the build of the assembly refs #32596

diff --git src/hg/makeDb/doc/asmHubs/runBuild src/hg/makeDb/doc/asmHubs/runBuild
index 9d8c917efe0..241c6e7f305 100755
--- src/hg/makeDb/doc/asmHubs/runBuild
+++ src/hg/makeDb/doc/asmHubs/runBuild
@@ -1,23 +1,23 @@
 #!/bin/bash
 
 set -beEu -o pipefail
 
 export LANG=C
 export asmId=$1
 export clade=$2
-export sciName=$3
+export sciName="${3}"
 ### the 'clade' is used to establish specific options for the build
 
 ### start seconds
 export startT=`date "+%s"`
 
 export bigHub="hgwdev"
 export smallHub="hgwdev"
 export fileServer="hgwdev"
 export workHorse="hgwdev"
 # export bigHub="ku"
 # export smallHub="ku"
 
 export rmskSpecies="xy"
 
 ### This ucscNames decision needs to be an automatic process since
@@ -25,30 +25,34 @@
 ### This is important for track updates, such as ncbiRefSeq
 ### export ucscNames="-ucscNames"
 export ucscNames=""
 export augustusSpecies="-augustusSpecies=human"
 
 export ncbiRmsk="-ncbiRmsk"
 export noRmsk=""
 export RMSK=""
 export subGroup="vertebrate_other"
 
 # sleep 5 to 25 seconds to avoid the ssh overload of a bunch of jobs
 # all starting at the same time.
 export sleepTime=$((RANDOM % 21 + 5))
 sleep "${sleepTime}"
 
+export fetchLog="/dev/shm/fetch.$$.log"
+# make sure the NCBI source is here:
+/hive/data/outside/ncbi/genomes/oneLftp.sh "${asmId}" > "${fetchLog}"
+
 if [ "${clade}" = "primates" ]; then
   subGroup="vertebrate_mammalian"
   rmskSpecies=`/hive/data/genomes/asmHubs/allBuild/rmCheck/findTaxon.pl "${sciName}" 2> /dev/null`
 elif [ "${clade}" = "mammals" ]; then
   subGroup="vertebrate_mammalian"
   rmskSpecies=`/hive/data/genomes/asmHubs/allBuild/rmCheck/findTaxon.pl "${sciName}" 2> /dev/null`
 elif [ "${clade}" = "fishes" ]; then
   subGroup="vertebrate_other"
   augustusSpecies="-augustusSpecies=zebrafish"
   rmskSpecies=`/hive/data/genomes/asmHubs/allBuild/rmCheck/findTaxon.pl "${sciName}" 2> /dev/null`
 elif [ "${clade}" = "fish" ]; then
   subGroup="vertebrate_other"
   augustusSpecies="-augustusSpecies=zebrafish"
   rmskSpecies=`/hive/data/genomes/asmHubs/allBuild/rmCheck/findTaxon.pl "${sciName}" 2> /dev/null`
 elif [ "${clade}" = "birds" ]; then
@@ -106,33 +110,33 @@
   noRmsk="-noRmsk"
   augustusSpecies="-noAugustus -noXenoRefSeq"
 elif [ "${clade}" = "bacteria" ]; then
   subGroup="bacteria"
   noRmsk="-noRmsk"
   augustusSpecies="-noAugustus -noXenoRefSeq"
 else
   printf "ERROR: unrecognized clade: '%s'\n" "${clade}" 1>&2
   exit 255
 fi
 
 if [ "${rmskSpecies}" = "xy" ]; then
     noRmsk="-noRmsk"
 elif [ "x${rmskSpecies}y" = "xy" ]; then
   export RMSK="-runRepeatModeler"
-  printf "# rmskSpecies: $sciName NOT FOUND, running RepeatModeler\n" 1>&2
+  printf "# rmskSpecies: ${sciName} NOT FOUND, running RepeatModeler\n" 1>&2
 else
-  printf "# rmskSpecies: $sciName -> $rmskSpecies\n" 1>&2
+  printf "# rmskSpecies: ${sciName} -> $rmskSpecies\n" 1>&2
   RMSK='-rmskSpecies="'"${rmskSpecies}"'"'
 #  RMSK='-runRepeatModeler -rmskSpecies="'"${rmskSpecies}"'"'
 fi
 
 export stepStart="download"
 ## export stepStart="sequence"
 ## export stepStart="gatewayPage"
 ## export stepStart="chromAlias"
 ## export stepStart="cytoBand"
 ## export stepStart="repeatModeler"
 ## export stepStart="repeatMasker"
 ## export stepStart="simpleRepeat"
 ## export stepStart="allGaps"
 ## export stepStart="windowMasker"
 ## export stepStart="addMask"
@@ -200,31 +204,35 @@
 export logFile="${TOP0}/${topBuild}/buildLogs/${subGroup}/${asmId}.log"
 
 if [ ! -d "${buildDir}" ]; then
   mkdir -p "${buildDir}"
 fi
 if [ ! -d "${linkDir}" ]; then
   mkdir -p "${linkDir}"
 fi
 if [ ! -L "${linkDir}/${asmId}" ]; then
   printf "@ ln -s \"${buildDir}\" \"${linkDir}\"\n" 1>&2
   ln -s "${buildDir}" "${linkDir}"
 fi
 ls -d "${buildDir}" "${linkDir}/${asmId}"
 
 echo "========================= "`date "+%F %T"` >> "${logFile}"
+echo "=== NCBI fetch: ====" >> "${logFile}"
+echo "/hive/data/outside/ncbi/genomes/oneLftp.sh \"${asmId}\"" >> "${logFile}"
+cat "${fetchLog}" >> "${logFile}"
 
+echo "=== doIdKeys: ==== "`date "+%F %T"` >> "${logFile}"
 echo "/hive/data/genomes/asmHubs/${genbankRefseq}Build/doIdKeys \"${asmId}\" &" >> "${logFile}"
 
 /hive/data/genomes/asmHubs/${genbankRefseq}Build/doIdKeys "${asmId}" >> "${logFile}" 2>&1 &
 
 echo "### \$HOME/kent/src/hg/utils/automation/doAssemblyHub.pl \
   -continue=\"${stepStart}\" -stop=\"${stepEnd}\" \
     ${RMSK} -bigClusterHub="${bigHub}" -buildDir=\`pwd\` \
       -fileServer=${fileServer} -smallClusterHub=${smallHub} \
         ${noRmsk} ${ncbiRmsk} ${ucscNames} ${augustusSpecies} -workhorse=${workHorse} \"${asmId}\"" >> "${logFile}"
 
 cd "${buildDir}"
 if [ ! -s "${buildDir}/build.log" ]; then
   symLinkPath=`readlink "${buildDir}/build.log" || true`
   if [ "x${symLinkPath}y" != "xy" ]; then	# empty symLink
      rm -f "${buildDir}/build.log"