cff41d740a8e5ee4bbc5a3f4385b7e939f42841f
chmalee
  Tue Apr 18 15:54:01 2023 -0700
Put the forward and reverse hgPcr primers into the qName of the psl so when we have multiple results, we are sure to show the primer pair for the right psl, refs #30925

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 8025f6c..2655d87 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -7082,30 +7082,42 @@
 faWriteNext(stdout, NULL, dna, productSize);
 printf("</PRE></TT>");
 }
 
 void doPcrResult(char *track, char *item)
 /* Process click on PCR of user's primers. */
 {
 struct trackDb *tdb = pcrResultFakeTdb();
 char *pslFileName, *primerFileName;
 struct targetDb *target;
 cartWebStart(cart, database, "PCR Results");
 if (! pcrResultParseCart(database, cart, &pslFileName, &primerFileName, &target))
     errAbort("PCR Result track has disappeared!");
 
 char *fPrimer, *rPrimer;
+// the item name contains the forward and reverse primers
+int maxSplits = 2;
+char *splitQName[maxSplits];
+int numSplits = chopString(cloneString(item), "_", splitQName, sizeof(splitQName));
+if (numSplits == maxSplits)
+    {
+    fPrimer = splitQName[0];
+    touppers(fPrimer);
+    rPrimer = splitQName[1];
+    touppers(rPrimer);
+    }
+else
     pcrResultGetPrimers(primerFileName, &fPrimer, &rPrimer);
 printf("<H2>PCR Results (<TT>%s %s</TT>)</H2>\n", fPrimer, rPrimer);
 printf("<B>Forward primer:</B> 5' <TT>%s</TT> 3'<BR>\n", fPrimer);
 printf("<B>Reverse primer:</B> 5' <TT>%s</TT> 3'<BR>\n", rPrimer);
 if (target != NULL)
     printf("<B>Search target:</B> %s<BR>\n", target->description);
 
 struct psl *itemPsl = NULL, *otherPsls = NULL, *psl;
 if (target != NULL)
     {
     /* item (from hgTracks) is |-separated: target sequence name,
      * amplicon start offset in target sequence, and amplicon end offset. */
     char *words[3];
     int wordCount = chopByChar(cloneString(item), '|', words, ArraySize(words));
     if (wordCount != 3)