6794e8c75739e1c58957f1a5b5ed1bc6fb444133 chmalee Thu Aug 24 15:38:26 2023 -0700 Revert "Fix backwards compatibility bug I introduced when adding multiple pcr results, refs #32022" This reverts commit 4163e36238919a24e50cbd911aa52fa3a07a7796. diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index c3b3dc2..0ef8629 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -7138,48 +7138,44 @@ if (targetSearch) { /* 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) errAbort("doPcrResult: expected 3 |-sep'd words but got '%s'", item); targetSeqName = words[0]; if (endsWith(targetSeqName, "__")) targetSeqName[strlen(targetSeqName)-2] = '\0'; ampStart = atoi(words[1]), ampEnd = atoi(words[2]); // use the psl file to find the right primer pair pslFileGetPrimers(pslFileName, item, ampStart, ampEnd, &fPrimer, &rPrimer); } -else if (stringIn("_", item)) +else { // 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, NULL); - } 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 (targetSearch) printf("<B>Search target:</B> %s<BR>\n", target->description); struct psl *itemPsl = NULL, *otherPsls = NULL, *psl; if (targetSearch) { pcrResultGetPsl(pslFileName, target, targetSeqName, seqName, ampStart, ampEnd, &itemPsl, &otherPsls, fPrimer, rPrimer); printPcrTargetMatch(target, itemPsl, TRUE); } else {