87f551dfb14925f9e7e1d6f23d798fef313fd73c
hiram
  Mon Sep 1 23:25:33 2025 -0700
new chain net construction and update genePred names

diff --git src/hg/utils/automation/asmHubTrackDb.sh src/hg/utils/automation/asmHubTrackDb.sh
index 42f35aa3bd0..3613f74ee6a 100755
--- src/hg/utils/automation/asmHubTrackDb.sh
+++ src/hg/utils/automation/asmHubTrackDb.sh
@@ -474,30 +474,45 @@
 html html/%s.simpleRepeat\n\n" "${asmId}" "${asmId}"
 $scriptDir/asmHubSimpleRepeat.pl $asmId $buildDir/html/$asmId.names.tab $buildDir > $buildDir/html/$asmId.simpleRepeat.html
 fi
 
 ### assume there is no ncbiRefSeq track
 ### when there is, this will eliminate the ncbiGene track
 ### and it figures into setting the visibility of the augustus gene track
 export haveNcbiRefSeq="no"
 
 ###################################################################
 # ncbiRefSeq composite track
 if [ -s ${buildDir}/trackData/ncbiRefSeq/$asmId.ncbiRefSeq.bb ]; then
 rm -f $buildDir/bbi/${asmId}.ncbiRefSeq.bb
 rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeq.ix
 rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeq.ixx
+#  also remove all these other ones, they may not exist and their if 'exist'
+#    statements below will not remove them if they were there before
+rm -f $buildDir/bbi/${asmId}.ncbiRefSeqCurated.bb
+rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeqCurated.ix
+rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeqCurated.ixx
+rm -f $buildDir/bbi/${asmId}.ncbiRefSeqPredicted.bb
+rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeqPredicted.ix
+rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeqPredicted.ixx
+rm -f $buildDir/bbi/${asmId}.ncbiRefSeqOther.bb
+rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeqOther.ix
+rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeqOther.ixx
+rm -f $buildDir/bbi/${asmId}.bigPsl.bb
+rm -f $buildDir/bbi/${asmId}.ncbiRefSeqSelectCurated.bb
+rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeqSelectCurated.ix
+rm -f $buildDir/ixIxx/${asmId}.ncbiRefSeqSelectCurated.ixx
 ln -s ../trackData/ncbiRefSeq/$asmId.ncbiRefSeq.bb $buildDir/bbi/${asmId}.ncbiRefSeq.bb
 ln -s ../trackData/ncbiRefSeq/$asmId.ncbiRefSeq.ix $buildDir/ixIxx/${asmId}.ncbiRefSeq.ix
 ln -s ../trackData/ncbiRefSeq/$asmId.ncbiRefSeq.ixx $buildDir/ixIxx/${asmId}.ncbiRefSeq.ixx
 if [ -s ${buildDir}/trackData/ncbiRefSeq/${asmId}*.ncbiRefSeq.gtf.gz ]; then
     mkdir -p $buildDir/genes
     rm -f ${buildDir}/genes/${asmId}.ncbiRefSeq.gtf.gz
     gtfFile=`ls ${buildDir}/trackData/ncbiRefSeq/${asmId}*.ncbiRefSeq.gtf.gz|tail -1|sed -e 's#.*/##;'`
     ln -s ../trackData/ncbiRefSeq/${gtfFile} ${buildDir}/genes/${asmId}.ncbiRefSeq.gtf.gz
 fi
 
   export dataVersion="html/ncbiRefSeqVersion.txt"
   if [ -s ${buildDir}/trackData/ncbiRefSeq/$asmId.ncbiRefSeqVersion.txt ]; then
    dataVersion=`cat ${buildDir}/trackData/ncbiRefSeq/$asmId.ncbiRefSeqVersion.txt`
   fi
 
@@ -702,35 +717,35 @@
 fi
 ln -s ../trackData/ncbiGene/$asmId.ncbiGene.bb $buildDir/bbi/${asmId}.ncbiGene.bb
 if [ -s  $buildDir/ixIxx/${asmId}.ncbiGene.ix ]; then
   ln -s ../trackData/ncbiGene/$asmId.ncbiGene.ix $buildDir/ixIxx/${asmId}.ncbiGene.ix
   ln -s ../trackData/ncbiGene/$asmId.ncbiGene.ixx $buildDir/ixIxx/${asmId}.ncbiGene.ixx
 fi
   printf "track ncbiGene
 longLabel $longLabel
 shortLabel $shortLabel
 visibility pack
 color 0,80,150
 altColor 150,80,0
 colorByStrand 0,80,150 150,80,0
 bigDataUrl bbi/%s.ncbiGene.bb
 type bigGenePred
+urls name2=\"https://www.ncbi.nlm.nih.gov/gene/?term=\$\$\" geneName=\"https://www.ncbi.nlm.nih.gov/gene/\$\$\" geneName2=\"https://www.ncbi.nlm.nih.gov/nuccore/\$\$\"
 html html/%s.ncbiGene
 searchIndex name%s
-url https://www.ncbi.nlm.nih.gov/gene/?term=\$\$
 urlLabel Entrez gene:
-labelFields geneName,geneName2
+labelFields name,geneName,geneName2
 defaultLabelFields geneName2
 group genes\n\n" "${asmId}" "${asmId}" "${searchTrix}"
 
   $scriptDir/asmHubNcbiGene.pl $asmId $ncbiAsmId $buildDir/html/$asmId.names.tab $buildDir/trackData > $buildDir/html/$asmId.ncbiGene.html
 
 haveNcbiGene="yes"
 fi	#	if [ -s ${buildDir}/trackData/ncbiGene/$asmId.ncbiGene.bb ]
 fi	#	if [ "${haveNcbiRefSeq}" = "no" ]
 ###################################################################
 
 ###################################################################
 # CpG Islands composite
 export cpgVis="off"
 # if there is no unmasked track, then set cpgVis to pack
 if [ ! -s ${buildDir}/trackData/cpgIslands/unmasked/${asmId}.cpgIslandExtUnmasked.bb ]; then