97c67666efd79c8d87918466629ee1781138797c
braney
  Thu Jun 25 17:39:35 2020 -0700
ongoing work on gencodeV35

diff --git src/hg/hgGene/pathways.c src/hg/hgGene/pathways.c
index 03e4492..ca5c6bb 100644
--- src/hg/hgGene/pathways.c
+++ src/hg/hgGene/pathways.c
@@ -154,31 +154,31 @@
     {
     if (!sqlTableExists(conn, "rgdGene2Xref")) return;
     }
 else
     {
     if (!sqlTableExists(conn, "kgXref")) return;
     }
 if (isRgdGene(conn))
     {
     sqlSafefFrag(condStr, sizeof(condStr), "name='%s'", geneId);
     spID = sqlGetField(database, "rgdGene2ToUniProt", "value", condStr);
     }
 else
     {
     sqlSafefFrag(condStr, sizeof(condStr), "kgID='%s'", geneId);
-    spID = sqlGetField(database, "kgXref", "spID", condStr);
+    spID = sqlGetField(sqlGetDatabase(conn), "kgXref", "spID", condStr);
     }
 
 if (spID != NULL)
     {
     /* convert splice variant UniProt ID to its main root ID */
     chp = strstr(spID, "-");
     if (chp != NULL) *chp = '\0';
     
     hPrintf(
     "<BR>Protein %s (<A href=\"http://www.reactome.org/cgi-bin/link?SOURCE=UniProt&ID=%s\" TARGET=_blank>Reactome details)</A> participates in the following event(s):<BR><BR>" 
     , spID, spID);
 
     conn2= hAllocConn(database);
     sqlSafef(query2,sizeof(query2), 
     	  "select eventID, eventDesc from proteome.spReactomeEvent where spID='%s'", spID);