f9ce722d011fb87c9f61a4d892b9140ef7fa9047 hiram Mon Sep 12 20:38:56 2022 -0700 now working through step chromAlias and fixup that procedure to work correctly on ucsc names refs #29811 diff --git src/hg/utils/automation/oneAndDoneBrowser.sh src/hg/utils/automation/oneAndDoneBrowser.sh index 935459e..52f9387 100755 --- src/hg/utils/automation/oneAndDoneBrowser.sh +++ src/hg/utils/automation/oneAndDoneBrowser.sh @@ -114,62 +114,72 @@ esac printf "# ==== %s ====\n" "`date '+%F %T %s'`" 1>&2 printf "# working in %s\n" "${buildDir}" 1>&2 printf "# building %s - %s\n" "${organism}" "${sciName}" 1>&2 printf "# dbName: %s\n" "${dbName}" 1>&2 printf "# ucscNames: %s\n" "${ucscNames}" 1>&2 printf "# rmskSpecies: %s\n" "${rmskSpecies}" 1>&2 printf "# augustusSpecies: %s\n" "${augustusSpecies}" 1>&2 printf "# ncbiRmsk: %s\n" "${ncbiRmsk}" 1>&2 if [ "x${noRmsk}y" != "xy" ]; then printf "# noRmsk: '%s'\n" "${noRmsk}" 1>&2 fi printf "\n" 1>&2 -export stepStart="download" -export stepEnd="sequence" +## export stepStart="download" +## export stepEnd="sequence" +export stepStart="chromAlias" +export stepEnd="chromAlias" printf "cd \"${buildDir}\"\n" 1>&2 cd "${buildDir}" printf "\$HOME/kent/src/hg/utils/automation/doAssemblyHub.pl \\ -continue=\"${stepStart}\" -stop=\"${stepEnd}\" -dbName=\"${dbName}\" \\ -rmskSpecies=\"${rmskSpecies}\" -bigClusterHub=ku -buildDir=\`pwd\` \\ -fileServer=hgwdev -smallClusterHub=hgwdev \\ ${noRmsk} ${ncbiRmsk} ${ucscNames} ${augustusSpecies} \\ -workhorse=hgwdev \"${asmId}\" >> build.log 2>&1\n" 1>&2 $HOME/kent/src/hg/utils/automation/doAssemblyHub.pl \ -continue="${stepStart}" -stop="${stepEnd}" -dbName="${dbName}" \ -rmskSpecies="${rmskSpecies}" -bigClusterHub=ku -buildDir=`pwd` \ -fileServer=hgwdev -smallClusterHub=hgwdev \ ${noRmsk} ${ncbiRmsk} ${ucscNames} ${augustusSpecies} \ -workhorse=hgwdev "${asmId}" >> build.log 2>&1 cd "${buildDir}" + +if [ "download/${asmId}_assembly_report.txt" -nt "${dbName}.config.ra" ]; then + $HOME/kent/src/hg/utils/automation/prepConfig.pl "${dbName}" \ "${hgCentralClade}" "${trackDbDir}" download/${asmId}_assembly_report.txt \ > ${dbName}.config.ra export taxId=`grep "^taxId" ${dbName}.config.ra | awk '{print $NF}'` export asmDate=`grep "^assemblyDate" ${dbName}.config.ra | sed -e "s/assemblyDate \+//"` export asmName=`grep "^ncbiAssemblyName" ${dbName}.config.ra | sed -e "s/ncbiAssemblyName \+//"` export comName=`grep "^commonName" ${dbName}.config.ra | sed -e "s/commonName \+//"` export sciName=`grep "^scientificName" ${dbName}.config.ra | sed -e "s/scientificName \+//"` export orderKey=`grep "^orderKey" ${dbName}.config.ra | sed -e "s/orderKey \+//"` export accessionID=`grep "^genBankAccessionID" ${dbName}.config.ra | sed -e "s/genBankAccessionID \+//"` export defaultPos=`head -1 $dbName.chrom.sizes | awk '{end=int($2/2)+9999; if (end > $2){end = $2}; printf "%s:%d-%d", $1, int($2/2), end}'` -printf "where is the invalid number\n" -echo "${dbName}" "${asmDate}" "${asmName}" "${dbName}" "${dbName}" "${comName}" "${defaultPos}" "${orderKey}" "${comName}" "${sciName}" "${dbName}" "${accessionID}" - printf "DELETE from dbDb where name = \"%s\";\n" "${dbName}" > dbDbInsert.sql printf "INSERT INTO dbDb (name, description, nibPath, organism, defaultPos, active, orderKey, genome, scientificName, htmlPath, hgNearOk, hgPbOk, sourceName, taxId) VALUES\n" >> dbDbInsert.sql printf "(\"%s\", \"%s (%s/%s)\", \"/gbdb/%s\", \"%s\", \"%s\", 1, %d, \"%s\", \"%s\", \"/gbdb/%s/html/description.html\", 0, 1, \"%s\", %d);\n" "${dbName}" "${asmDate}" "${asmName}" "${dbName}" "${dbName}" "${comName}" "${defaultPos}" "${orderKey}" "${comName}" "${sciName}" "${dbName}" "${accessionID}" "${taxId}" >> dbDbInsert.sql +fi + +printf "# dbDbInsert.sql statement is completed:\n" 1>&2 +cat dbDbInsert.sql 1>&2 + +if [ ! -s "chrom.sizes" ]; then + ln -s $dbName.chrom.sizes chrom.sizes +fi