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/jkOwnLib/gfPcrLib.c src/jkOwnLib/gfPcrLib.c index 1b0773a..3d20057 100644 --- src/jkOwnLib/gfPcrLib.c +++ src/jkOwnLib/gfPcrLib.c @@ -233,31 +233,36 @@ fprintf(f, "%d\t%d\t", out->fPos, out->rPos); fprintf(f, "0\t2\t%d,%d,\t0,%d\n", fPrimerSize, rPrimerSize, out->rPos - out->fPos - rPrimerSize); } static void outputPsl(struct gfPcrOutput *out, FILE *f, char *url) /* Output match in PSL format. */ { int match; int size = out->rPos - out->fPos; int fPrimerSize = strlen(out->fPrimer); int rPrimerSize = strlen(out->rPrimer); int bothSize = fPrimerSize + rPrimerSize; int gapSize = size - bothSize; char *name = out->name; -if (name == NULL) name = "n/a"; +if (name == NULL) + { + struct dyString *dy = dyStringNew(0); + dyStringPrintf(dy, "%s_%s", out->fPrimer, out->rPrimer); + name = dyStringCannibalize(&dy);; + } match = countMatch(out->dna, out->fPrimer, fPrimerSize); reverseComplement(out->rPrimer, rPrimerSize); assert(size > 0); match += countMatch(out->dna + size - rPrimerSize, out->rPrimer, rPrimerSize); reverseComplement(out->rPrimer, rPrimerSize); fprintf(f, "%d\t", match); fprintf(f, "%d\t", bothSize - match); fprintf(f, "0\t0\t"); /* repMatch, nCount. */ fprintf(f, "1\t%d\t", gapSize); /* qNumInsert, qBaseInsert */ fprintf(f, "1\t%d\t", gapSize); /* tNumInsert, tBaseInsert */ fprintf(f, "%c\t", out->strand); fprintf(f, "%s\t", name); fprintf(f, "%d\t", size); fprintf(f, "0\t%d\t", size); /* qStart, qEnd */