c63be670d36d15c7b2d0ee04e04b38bfb49af222
hiram
  Tue May 16 11:00:25 2017 -0700
allow xenoRefGene table to be used refs #18969

diff --git src/utils/doLocusName src/utils/doLocusName
index d14ab6a..077e516 100755
--- src/utils/doLocusName
+++ src/utils/doLocusName
@@ -31,30 +31,32 @@
         yield line.rstrip("\n").split("\t")
 
 def runCmd(cmd, mustRun=True):
     " wrapper around os.system that prints error messages "
     print ("Running: "+ cmd)
     ret = os.system(cmd)
     if ret!=0 and mustRun:
         print "Could not run command %s" % cmd
         sys.exit(1)
     return ret
 
 def doLocusName(db, geneTableName, options):
     " create and fill the locusName table for db "
     if geneTableName=="ensGene":
         query = "SELECT * from ensemblToGeneName"
+    elif geneTableName=="xenoRefGene":
+        query = "SELECT name,name2 from xenoRefGene"
     elif geneTableName=="knownGene":
         query = "SELECT kgID, geneSymbol from kgXref where geneSymbol<>'' and geneSymbol not like '% %'"
     else:
         assert(False) # no support for this gene table yet
 
     tempFh = tempfile.NamedTemporaryFile()
     #tempFh = open("temp.tmp", "w")
     for row in runSql(db, query):
         tempFh.write("\t".join(row)+"\n")
     tempFh.flush()
     tempFname = tempFh.name
 
     chromSizesFname = "/cluster/data/%s/chrom.sizes" % db
     outTmp = "locusName.tmp.bed"