98874f1656202cd5781466a5d9b25f47da1f104d
hiram
  Mon Feb 13 16:03:53 2023 -0800
a bit closer to correct NCBI links, not perfect, but better than it was no redmine

diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index f8b0436..94ca972 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -590,83 +590,83 @@
 sqlSafef(query, sizeof query, "select count(*) from chromInfo");
 int count = sqlQuickNum(conn, query);
 hFreeConn(&conn);
 return count;
 }
 
 // This maps db names to the latest NCBI RefSeq assembly+annotation GCF_ IDs as of
 // 12/19/2017.
 struct dbToGcf
     {
     char *db;
     char *gcf;
     };
 static struct dbToGcf dbToGcf[] =
     {
-    { "hg38", "GCF_000001405.37" },
+    { "hg38", "GCF_000001405.40" },
     { "hg19", "GCF_000001405.25" },
     { "mm10", "GCF_000001635.26" },
     { "danRer11", "GCF_000002035.6" },
     { "galGal5", "GCF_000002315.4" },
     { "canFam3", "GCF_000002285.3" },
     { "rheMac8", "GCF_000772875.2" },
     { "panTro5", "GCF_000001515.7" },
     { "bosTau8", "GCF_000003055.6" },
     { "rn6", "GCF_000001895.5" },
     { "xenTro9", "GCF_000004195.3" },
     { "susScr11", "GCF_000003025.6" },
     { "equCab2", "GCF_000002305.2" },
     { NULL, NULL }
     };
 
 char *hNcbiGcfId(char *db)
 /* Return the NCBI RefSeq assembly+annotations ID (GCF_...) for db, or NULL if we don't know it. */
 {
 char *gcf = NULL;
 int i;
 for (i = 0;  dbToGcf[i].db != NULL;  i++)
     if (sameString(db, dbToGcf[i].db))
         {
         gcf = cloneString(dbToGcf[i].gcf);
         break;
         }
 if (NULL == gcf)
-    gcf = asmEquivalentUcscToNCBI(db);
+    gcf = asmEquivalentUcscToNCBI(db, "refseq");
 return gcf;
 }
 
 char *hNcbiGcaId(char *db)
 /* Return the NCBI GenBank assembly id (GCA_...) for db, or NULL if we don't know it. */
 {
 char *gca = NULL;
 if (! trackHubDatabase(db))
     {
     struct sqlConnection *conn = hConnectCentral();
     char query[1024];
     sqlSafef(query, sizeof(query), "select sourceName from dbDb where name = '%s'", db);
     char sourceName[2048];
     sqlQuickQuery(conn, query, sourceName, sizeof(sourceName));
     regmatch_t substrs[2];
     if (isNotEmpty(sourceName) &&
         regexMatchSubstr(sourceName, "GCA_[0-9]+\\.[0-9]+", substrs, ArraySize(substrs)))
         {
         gca = regexSubstringClone(sourceName, substrs[0]);
         }
     hDisconnectCentral(&conn);
     }
 if (NULL == gca)
-    gca = asmEquivalentUcscToNCBI(db);
+    gca = asmEquivalentUcscToNCBI(db, "genbank");
 return gca;
 }
 
 struct sqlConnection *hAllocConn(char *db)
 /* Get free connection if possible. If not allocate a new one. */
 {
 if (hdbCc == NULL)
     hdbCc = sqlConnCacheNew();
 return sqlConnCacheAlloc(hdbCc, db);
 }
 
 struct sqlConnection *hAllocConnMaybe(char *db)
 /* Get free connection if possible. If not allocate a new one. Return
  * NULL if db doesn't exist or can't be connected to. */
 {