4163e36238919a24e50cbd911aa52fa3a07a7796 chmalee Thu Aug 24 10:58:38 2023 -0700 Fix backwards compatibility bug I introduced when adding multiple pcr results, refs #32022 diff --git src/hg/hgTracks/cds.c src/hg/hgTracks/cds.c index 79bfd4f..dab510d 100644 --- src/hg/hgTracks/cds.c +++ src/hg/hgTracks/cds.c @@ -964,45 +964,38 @@ #endif } #ifndef GBROWSE static struct dnaSeq *maybeGetPcrResultSeq(struct linkedFeatures *lf) /* Return (if possible) the primer sequences concatenated with the * target sequence between where they match. */ { struct dnaSeq *seq = NULL; char *pslFileName, *primerFileName; struct targetDb *target; if (! pcrResultParseCart(database, cart, &pslFileName, &primerFileName, &target)) return NULL; char *fPrimer = NULL, *rPrimer = NULL, *nonCompRPrimer = NULL; char *primerKey = NULL; -if (lf->original) +if (lf->original && stringIn("_", ((struct psl *)lf->original)->qName)) { // we can use the qName to extract the primer sequence, which // may be different from the primers the user pasted in! struct psl *psl = (struct psl *)lf->original; fPrimer = cloneString(psl->qName); char *under = strchr(fPrimer, '_'); - if (under) *under = 0; - else - { - errAbort("Badly formatted qName ('%s', missing '_' character. " - "Please send an email to genome-www@soe.ucsc.edu with the assembly, " - "forward and reverse primers, and other PCR settings.", psl->qName); - } rPrimer = under + 1; } else pcrResultGetPrimers(primerFileName, &fPrimer, &rPrimer, primerKey); if ((fPrimer == NULL) || (rPrimer == NULL)) return NULL; int fPrimerSize = strlen(fPrimer); int rPrimerSize = strlen(rPrimer); // we need to reverse complement the sequence for the display, but we // don't want to when we do the lookup in the psl file nonCompRPrimer = cloneString(rPrimer); reverseComplement(rPrimer, rPrimerSize); if (lf->name && isNotEmpty(lf->name)) { struct psl *tpsl;