74f7bf30603c7dfe869afcbe63adb6ddd74e9898
angie
  Wed Jan 10 12:58:38 2018 -0800
Link to NCBI's Genome Data Viewer (GDV) using GCA_ accessions from dbDb.sourceName instead of hardcoded GCF_ ids.  refs #18671

diff --git src/hg/hgTracks/extTools.c src/hg/hgTracks/extTools.c
index e25493e..e8dfffa 100644
--- src/hg/hgTracks/extTools.c
+++ src/hg/hgTracks/extTools.c
@@ -261,30 +261,39 @@
         safef(buf, sizeof(buf), "%d", len/2);
         val = replaceChars(val, "$halfLen", buf);
         }
     else if (sameWord(val, "$seq") || sameWord(val, "$faSeq"))
         {
         static struct dnaSeq *seq = NULL;
         seq = hDnaFromSeq(db, chromName, winStart, winEnd, dnaLower);
         if (sameWord(val, "$seq"))
             val = seq->dna;
         else
             {
             val = catTwoStrings(">sequence\n",seq->dna);
             freez(&seq);
             }
         }
+    else if (sameWord(val, "$ncbiGca"))
+        {
+        char *gca = hNcbiGcaId(db);
+        if (gca)
+            val = gca;
+        else
+            // Really we shouldn't be making this entire form... pass db as hail-mary
+            val = db;
+        }
     else if (sameWord(val, "$ncbiGcf"))
         {
         char *gcf = hNcbiGcfId(db);
         if (gcf)
             val = gcf;
         else
             // Really we shouldn't be making this entire form... pass db as hail-mary
             val = db;
         }
     // any remaining $-expression might be one of the general ones
     else if (stringIn("$", val))
         {
         val = replaceInUrl(val, "", cart, db, chromName, winStart, winEnd, NULL, TRUE);
         }