a6931e479d3f8415a57fb979b759537cbc6e0ab0
hiram
  Thu Aug 8 22:16:57 2019 -0700
xenoRefGene ready to go refs #23734

diff --git src/hg/utils/automation/asmHubTrackDb.sh src/hg/utils/automation/asmHubTrackDb.sh
index 89b5ccf..5b20d0e 100755
--- src/hg/utils/automation/asmHubTrackDb.sh
+++ src/hg/utils/automation/asmHubTrackDb.sh
@@ -347,68 +347,74 @@
 ln -s $buildDir/trackData/ncbiGene/$asmId.ncbiGene.ix $buildDir/ixIxx/${asmId}.ncbiGene.ix
 ln -s $buildDir/trackData/ncbiGene/$asmId.ncbiGene.ixx $buildDir/ixIxx/${asmId}.ncbiGene.ixx
   printf "track ncbiGene
 longLabel NCBI gene predictions
 shortLabel NCBI Genes
 visibility pack
 color 0,80,150
 altColor 150,80,0
 colorByStrand 0,80,150 150,80,0
 bigDataUrl bbi/%s.ncbiGene.bb
 type bigGenePred
 html html/%s.ncbiGene
 searchIndex name%s
 url https://www.ncbi.nlm.nih.gov/gene/?term=\$\$
 urlLabel Entrez gene
+labelFields=geneName,geneName2,name
 group genes\n\n" "${asmId}" "${asmId}" "${searchTrix}"
 
   $scriptDir/asmHubNcbiGene.pl $asmId $buildDir/html/$asmId.names.tab $buildDir/trackData > $buildDir/html/$asmId.ncbiGene.html
 
 haveNcbiGene="yes"
 fi
 
 ###################################################################
 # CpG Islands composite
+export cpgVis="hide"
+# if there is no unmasked track, then set cpgVis to pack
+if [ ! -s ${buildDir}/trackData/cpgIslands/unmasked/${asmId}.cpgIslandExtUnmasked.bb ]; then
+  cpgVis="pack"
+fi
 if [ -s ${buildDir}/trackData/cpgIslands/unmasked/${asmId}.cpgIslandExtUnmasked.bb -o -s ${buildDir}/trackData/cpgIslands/masked/${asmId}.cpgIslandExt.bb ]; then
 rm -f ${buildDir}/bbi/${asmId}.cpgIslandExtUnmasked.bb ${buildDir}/bbi/${asmId}.cpgIslandExt.bb
 
 printf "track cpgIslands
 compositeTrack on
 shortLabel CpG Islands
 longLabel CpG Islands (Islands < 300 Bases are Light Green)
 group regulation
 visibility pack
 type bed 3 .
 noInherit on
 html html/%s.cpgIslands\n\n" "${asmId}"
 fi
 
 if [ -s ${buildDir}/trackData/cpgIslands/masked/${asmId}.cpgIslandExt.bb ]; then
 ln -s ${buildDir}/trackData/cpgIslands/masked/${asmId}.cpgIslandExt.bb ${buildDir}/bbi/${asmId}.cpgIslandExt.bb
 printf "    track cpgIslandExt
-    parent cpgIslands
+    parent cpgIslands %s
     shortLabel CpG Islands
     longLabel CpG Islands (Islands < 300 Bases are Light Green)
     priority 1
     type bigBed 4 +
-    bigDataUrl bbi/%s.cpgIslandExt.bb\n\n" "${asmId}"
+    bigDataUrl bbi/%s.cpgIslandExt.bb\n\n" "${cpgVis}" "${asmId}"
 fi
 
 if [ -s ${buildDir}/trackData/cpgIslands/unmasked/${asmId}.cpgIslandExtUnmasked.bb ]; then
 ln -s ${buildDir}/trackData/cpgIslands/unmasked/${asmId}.cpgIslandExtUnmasked.bb ${buildDir}/bbi/${asmId}.cpgIslandExtUnmasked.bb
 printf "    track cpgIslandExtUnmasked
-    parent cpgIslands
+    parent cpgIslands pack
     shortLabel Unmasked CpG
     longLabel CpG Islands on All Sequence (Islands < 300 Bases are Light Green)
     priority 2
     type bigBed 4 +
     bigDataUrl bbi/%s.cpgIslandExtUnmasked.bb\n\n" "${asmId}"
 fi
 
 if [ -s ${buildDir}/trackData/cpgIslands/unmasked/${asmId}.cpgIslandExtUnmasked.bb -o -s ${buildDir}/trackData/cpgIslands/masked/${asmId}.cpgIslandExt.bb ]; then
   $scriptDir/asmHubCpG.pl $asmId $buildDir/html/$asmId.names.tab $buildDir/bbi/$asmId > $buildDir/html/$asmId.cpgIslands.html
 fi
 
 ###################################################################
 # windowMasker
 if [ -s ${buildDir}/trackData/windowMasker/${asmId}.windowMasker.bb ]; then
 rm -f ${buildDir}/bbi/${asmId}.windowMasker.bb
@@ -454,30 +460,49 @@
    augustusVis="pack"
 fi
 printf "track augustus
 shortLabel Augustus
 longLabel Augustus Gene Predictions
 group genes
 visibility %s
 color 180,0,0
 type bigGenePred
 bigDataUrl bbi/%s.augustus.bb
 html html/%s.augustus\n\n" "${augustusVis}" "${asmId}" "${asmId}"
 $scriptDir/asmHubAugustusGene.pl $asmId $buildDir/html/$asmId.names.tab $buildDir/bbi/$asmId > $buildDir/html/$asmId.augustus.html
 fi
 
 ###################################################################
+# xenoRefGene genes
+if [ -s ${buildDir}/trackData/xenoRefGene/${asmId}.xenoRefGene.bb ]; then
+rm -f ${buildDir}/bbi/${asmId}.xenoRefGene.bb
+ln -s ${buildDir}/trackData/xenoRefGene/${asmId}.xenoRefGene.bb ${buildDir}/bbi/${asmId}.xenoRefGene.bb
+
+printf "track xenoRefGene
+shortLabel GenBank mRNAs
+longLabel GenBank mRNAs mapped to this assembly with blat procedure
+group rna
+visibility pack
+color 180,0,0
+type bigGenePred
+bigDataUrl bbi/%s.xenoRefGene.bb
+labelFields=geneName,geneName2,name
+html html/%s.xenoRefGene\n\n" "${asmId}" "${asmId}"
+$scriptDir/asmHubXenoRefGene.pl $asmId $buildDir/html/$asmId.names.tab $buildDir/trackData > $buildDir/html/$asmId.xenoRefGene.html
+fi
+
+###################################################################
 # gapOverlap
 # if [ -s ${buildDir}/trackData/gapOverlap/${asmId}.gapOverlap.bb ]; then
 # rm -f ${buildDir}/bbi/${asmId}.gapOverlap.bb
 # ln -s ${buildDir}/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