cf078156da3eb0042503c279d0c0bddb9786c355
hiram
  Thu Mar 5 12:01:59 2020 -0800
now running up Ensembl genes on assembly hubs refs #24963

diff --git src/hg/utils/automation/asmHubTrackDb.sh src/hg/utils/automation/asmHubTrackDb.sh
index b43b0fb..073a62c 100755
--- src/hg/utils/automation/asmHubTrackDb.sh
+++ src/hg/utils/automation/asmHubTrackDb.sh
@@ -678,57 +678,55 @@
 # ln -s ../trackData/gapOverlap/${asmId}.gapOverlap.bb ${buildDir}/bbi/${asmId}.gapOverlap.bb
 
 # printf "track gapOverlap
 # shortLabel Gap Overlaps
 # longLabel Exactly identical sequence on each side of a gap
 # group map
 # visibility hide
 # type bigBed 12 .
 # bigDataUrl bbi/%s.gapOverlap.bb
 # html html/%s.gapOverlap\n\n" "${asmId}" "${asmId}"
 
 # $scriptDir/asmHubGapOverlap.pl $asmId $buildDir/html/$asmId.names.tab $buildDir/bbi/$asmId > $buildDir/html/$asmId.gapOverlap.html
 
 # fi
 ###################################################################
-
-export assemblyId=`echo ${asmId} | cut -d_ -f1-2`
-
-###################################################################
 # Ensembl genes
-if [ -s ${buildDir}/trackData/ensGene/bbi/${assemblyId}.ensGene.bb ]; then
-ls -og ${buildDir}/trackData/ensGene/bbi/${assemblyId}.ensGene.bb 1>&2
-printf "# link: ${buildDir}/trackData/ensGene/process/bbi/${assemblyId}.ensGene.bb ${buildDir}/bbi/${asmId}.ensGene.bb\n" 1>&2
+if [ -s ${buildDir}/trackData/ensGene/bbi/${asmId}.ensGene.bb ]; then
+ls -og ${buildDir}/trackData/ensGene/bbi/${asmId}.ensGene.bb 1>&2
+printf "# link: ../trackData/ensGene/bbi/${asmId}.ensGene.bb ${buildDir}/bbi/${asmId}.ensGene.bb\n" 1>&2
 rm -f ${buildDir}/bbi/${asmId}.ensGene.bb
-ln -s ../trackData/ensGene/bbi/${assemblyId}.ensGene.bb ${buildDir}/bbi/${asmId}.ensGene.bb
+ln -s ../trackData/ensGene/bbi/${asmId}.ensGene.bb ${buildDir}/bbi/${asmId}.ensGene.bb
 rm -f ${buildDir}/ixIxx/${asmId}.ensGene.ix
 rm -f ${buildDir}/ixIxx/${asmId}.ensGene.ixx
 
-ln -s ../trackData/ensGene/process/${assemblyId}.ensGene.ix $buildDir/ixIxx/${asmId}.ensGene.ix
-ln -s ../trackData/ensGene/process/${assemblyId}.ensGene.ixx $buildDir/ixIxx/${asmId}.ensGene.ixx
+ln -s ../trackData/ensGene/process/${asmId}.ensGene.ix $buildDir/ixIxx/${asmId}.ensGene.ix
+ln -s ../trackData/ensGene/process/${asmId}.ensGene.ixx $buildDir/ixIxx/${asmId}.ensGene.ixx
 
 export ensVersion="v86"
 
 if [ -s ${buildDir}/trackData/ensGene/version.txt ]; then
   ensVersion=`cat "${buildDir}/trackData/ensGene/version.txt"`
 fi
 
 printf "track ensGene
 shortLabel Ensembl genes
 longLabel Ensembl genes %s
 group genes
 priority 40
 visibility pack
 color 150,0,0
 type bigBed 12 .
 bigDataUrl bbi/%s.ensGene.bb
 searchIndex name
 searchTrix ixIxx/%s.ensGene.ix
 html html/%s.ensGene\n\n" "${ensVersion}" "${asmId}" "${asmId}" "${asmId}"
 
 $scriptDir/asmHubEnsGene.pl $asmId $buildDir/html/$asmId.names.tab $buildDir/bbi/$asmId > $buildDir/html/$asmId.ensGene.html "${ensVersion}"
 
+else
+  printf "# no ensGene found\n" 1>&2
 fi
 
 if [ -s ${hubLinks}/${asmId}/rnaSeqData/$asmId.trackDb.txt ]; then
   printf "include rnaSeqData/%s.trackDb.txt\n\n" "${asmId}"
 fi