073f999294e187d3ced854717e467a17098972d7 hiram Wed Apr 9 13:21:13 2025 -0700 do not look for genome chrom names/sizes in a database when it is a GenArk hub refs #35479 #34043 diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c index 63391ad7021..be2d9ceb980 100644 --- src/hg/lib/hdb.c +++ src/hg/lib/hdb.c @@ -38,30 +38,31 @@ #include "hubConnect.h" #include "customTrack.h" #include "hgFind.h" #endif /* GBROWSE */ #include "hui.h" #include "trackHub.h" #include "net.h" #include "udc.h" #include "paraFetch.h" #include "regexHelper.h" #include "filePath.h" #include "wikiLink.h" #include "cheapcgi.h" #include "chromAlias.h" #include "asmEquivalent.h" +#include "genark.h" #ifdef LOWELAB #define DEFAULT_PROTEINS "proteins060115" #define DEFAULT_GENOME "Pyrobaculum aerophilum" #else #define DEFAULT_PROTEINS "proteins" #define DEFAULT_GENOME "Human" #endif static struct sqlConnCache *hdbCc = NULL; /* cache for primary database connection */ static struct sqlConnCache *centralCc = NULL; static char *centralDb = NULL; static struct sqlConnCache *cartCc = NULL; /* cache for cart; normally same as centralCc */ static char *cartDb = NULL; @@ -1393,31 +1394,31 @@ touppers(seq->dna); } return seq; } struct dnaSeq *hLoadChrom(char *db, char *chromName) /* Fetch entire chromosome into memory. */ { int size = hChromSize(db, chromName); return hDnaFromSeq(db, chromName, 0, size, dnaLower); } struct slName *hAllChromNames(char *db) /* Get list of all chromosome names in database. */ { -if (trackHubDatabase(db) || hubConnectIsCurated(trackHubSkipHubName(db))) +if (trackHubDatabase(db) || hubConnectIsCurated(trackHubSkipHubName(db)) || isGenArk(db)) return trackHubAllChromNames(db); struct slName *list = NULL; struct sqlConnection *conn = hAllocConn(db); struct sqlResult *sr; char **row; char query[1024]; sqlSafef(query, sizeof query, "select chrom from chromInfo"); sr = sqlGetResult(conn, query); while ((row = sqlNextRow(sr)) != NULL) { struct slName *el = slNameNew(row[0]); slAddHead(&list, el); } sqlFreeResult(&sr);