304efa5344d37ba0f66bef4965047eff35fd3fcd
braney
  Tue Nov 29 12:46:32 2016 -0800
fix bug in "View details of alignment in window" for blat tracks that I
introduced in Februrary

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 9a2ed6f..c62daa7 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -7491,31 +7491,39 @@
     bioSeq *oSeqList = NULL, *oSeq = NULL;
     struct psl *psl;
     int start;
     enum gfType tt, qt;
     boolean isProt;
     char *ss = cartOptionalString(cart, "ss");
 
     if ((ss != NULL) && !ssFilesExist(ss))
 	{
 	ss = NULL;
 	cartRemove(cart, "ss");
 	errAbort("hgBlat temporary files not found");
 	}
 
     start = cartInt(cart, "o");
-    qName = acc;
+
+    // itemIn is three words, the first two are the ss files and the third is the accession
+    char *itemIn = cloneString(acc);
+    char *words[3];
+    int numWords = chopByWhite(itemIn, words, 3);
+    if (numWords != 3)
+        errAbort("ItemIn string doesn't have three words.");
+    qName = words[2];
+
     parseSs(ss, &pslName, &faName, NULL);
     pslxFileOpen(pslName, &qt, &tt, &lf);
     isProt = (qt == gftProt);
     if (isProt)
 	errAbort("hgBlat protein alignments not supported for htcCdnaAliInWindow");
     while ((psl = pslNext(lf)) != NULL)
 	{
         if (sameString(psl->tName, seqName)
 	 && sameString(psl->qName, qName)
          && psl->tStart == start
 	    )
 	    break;
 	pslFree(&psl);
 	}
     lineFileClose(&lf);