80ef5aceda1a2e29e3e1e654c8de191848405cda
hiram
  Fri Apr 7 10:23:32 2023 -0700
tolerate ebiGene for HPRC project refs #30508

diff --git src/hg/utils/automation/asmHubTrackDb.sh src/hg/utils/automation/asmHubTrackDb.sh
index 726496f..3345310 100755
--- src/hg/utils/automation/asmHubTrackDb.sh
+++ src/hg/utils/automation/asmHubTrackDb.sh
@@ -815,30 +815,60 @@
 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
 
+###################################################################
+# Ensembl/ebiGene for HPRC project
+if [ -d ${buildDir}/trackData/ebiGene ]; then
+ export ebiGeneBb=`ls ${buildDir}/trackData/ebiGene/*.bb 2> /dev/null || true | head -1`
+ if [ -s "${ebiGeneBb}" ]; then
+    export ebiGeneLink=`echo $ebiGeneBb | sed -e 's#.*trackData#../trackData#;'`
+    printf "# link: $ebiGeneLink ${buildDir}/bbi/${asmId}.ebiGene.bb\n" 1>&2
+    rm -f ${buildDir}/bbi/${asmId}.ebiGene.bb
+    ln -s $ebiGeneLink ${buildDir}/bbi/${asmId}.ebiGene.bb
+
+    printf "track ebiGene
+shortLabel Ensembl v2
+longLabel Ensembl annotation v2
+group genes
+visibility pack
+color 150,0,0
+type bigGenePred
+bigDataUrl bbi/%s.ebiGene.bb
+searchIndex name,name2,txId,geneName,parentTranscript
+labelFields name,name2,txId,geneName,parentTranscript
+defaultLabelFields name
+labelSeperator \" \"
+html html/%s.ebiGene\n\n" "${asmId}" "${asmId}"
+
+# $scriptDir/asmHubEnsGene.pl $asmId $buildDir/html/$asmId.names.tab $buildDir/bbi/$asmId > $buildDir/html/$asmId.ensGene.html "${ensVersion}"
+ fi
+
+fi
+
+###################################################################
 # hubLinks is for mouseStrains specific hub only
 export hubLinks="/hive/data/genomes/asmHubs/hubLinks"
 if [ -s ${hubLinks}/${asmId}/rnaSeqData/$asmId.trackDb.txt ]; then
   printf "include rnaSeqData/%s.trackDb.txt\n\n" "${asmId}"
 fi
 ##  for mouse strain hubs only
 ## turned off 2022-11-02 until these can be correctly translated
 ## to GenArk naming schemes
 ### if [ -s "${buildDir}/$asmId.bigMaf.trackDb.txt" ]; then
 ###   printf "include %s.bigMaf.trackDb.txt\n\n" "${asmId}"
 ### fi
 
 ###################################################################
 # check for blat sameSpecies liftOver, then link to lift over chain file
 export lo=`ls -d ${buildDir}/trackData/blat.* 2> /dev/null | wc -l`