cc5381e539ecba5b07109b194acf1d76b0c8f641 braney Thu Jul 23 06:22:48 2026 -0700 Guard hDbForTaxon() callers against curated hub (GenArk) db names. hDbForTaxon() can now return a GenArk-only assembly with no real SQL database, which would abort in sqlConnect()/"use "/cross-db sqlTableExists(). Treat a hubConnectIsCurated() db as no usable native db in uniProtAccToDb(), bacProbeInfo(), and getKnownGeneUrl(). refs #37909 diff --git src/hg/visiGene/hgVisiGene/probePage.c src/hg/visiGene/hgVisiGene/probePage.c index 6c132367289..906608f8af4 100644 --- src/hg/visiGene/hgVisiGene/probePage.c +++ src/hg/visiGene/hgVisiGene/probePage.c @@ -1,29 +1,30 @@ /* probePage - put up page of info on probe. */ /* Copyright (C) 2013 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "hash.h" #include "dystring.h" #include "jksql.h" #include "cart.h" #include "htmshell.h" #include "dnautil.h" #include "web.h" #include "hdb.h" +#include "hubConnect.h" #include "visiGene.h" #include "hgVisiGene.h" #include "probePage.h" static char *orgName(struct sqlConnection *conn, int taxon) /* Return organism name associated with taxon. */ { char *binomial; char query[256]; sqlSafef(query, sizeof(query), "select binomial from uniProt.taxon where id=%d", taxon); binomial = sqlQuickString(conn, query); return shortOrgName(binomial); } @@ -64,30 +65,36 @@ printf("
");
     writeSeqWithBreaks(stdout, seq, strlen(seq), 60);
     printf("
"); } } static void bacProbeInfo(struct sqlConnection *conn, int probeId, int taxon) /* Print out information about BAC probe. */ { char query[256]; int bacId; char *name = NULL; char *genomeDb = hDbForTaxon(taxon); boolean gotMapping = FALSE; +/* hDbForTaxon may return a curated hub (GenArk) assembly with no real SQL + * database; genomeDb is passed to sqlConnect() below, which would abort on a + * hub db name. Treat it as no usable native db. */ +if (genomeDb != NULL && hubConnectIsCurated(genomeDb)) + genomeDb = NULL; + /* Start new line. */ printf("
\n"); /* Lookup bacId and print name associated with it. */ sqlSafef(query, sizeof(query), "select bac from probe where id=%d", probeId); bacId = sqlQuickNum(conn, query); if (bacId != 0) { sqlSafef(query, sizeof(query), "select name from bac where id=%d", bacId); name = sqlQuickString(conn, query); } /* Find where bac lands in genome and print hyperlink to genome browser. */ if (genomeDb != NULL && name != NULL && name[0] != 0) {