d2482e22232f8a2296fcc6706b2630f5499f7a83 braney Wed Jul 17 13:45:02 2024 -0700 change chroms to chromAuthority names in hgBlat and hgPcr diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 9e1ea2f..71c1f64 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -6515,34 +6515,35 @@ for (isClicked = 1; isClicked >= 0; isClicked -= 1) { for (psl = pslList; psl != NULL; psl = psl->next) { if (isPslToPrintByClick(psl, startFirst, isClicked)) { char otherString[512]; char *qName = itemIn; if (sameString(itemIn, "PrintAllSequences")) qName = psl->qName; safef(otherString, sizeof(otherString), "%d&aliTable=%s", psl->tStart, tableName); printf("<A HREF=\"%s&db=%s&position=%s%%3A%d-%d\">browser</A> | ", hgTracksPathAndSettings(), database, psl->tName, psl->tStart+1, psl->tEnd); if (psl->qSize <= MAX_DISPLAY_QUERY_SEQ_SIZE) // Only anchor if small enough hgcAnchorWindow(hgcCommand, qName, psl->tStart, psl->tEnd, otherString, psl->tName); + char *displayChromName = chromAliasGetDisplayChrom(database, cart, psl->tName); printf("%5d %5.1f%% %9s %s %9d %9d %20s %5d %5d %5d", psl->match + psl->misMatch + psl->repMatch, 100.0 - pslCalcMilliBad(psl, TRUE) * 0.1, - skipChr(psl->tName), psl->strand, psl->tStart + 1, psl->tEnd, + skipChr(displayChromName), psl->strand, psl->tStart + 1, psl->tEnd, psl->qName, psl->qStart+1, psl->qEnd, psl->qSize); if (psl->qSize <= MAX_DISPLAY_QUERY_SEQ_SIZE) printf("</A>"); printf("\n"); } } } printf("</TT></PRE>"); } void printAlignmentsExtra(struct psl *pslList, int startFirst, char *hgcCommand, char *hgcCommandInWindow, char *tableName, char *itemIn) /* Print list of mRNA alignments with special "in window" alignment function. */ { if (pslList == NULL || tableName == NULL) @@ -7793,38 +7794,39 @@ int rnaStart = 0; int rnaEnd = rnaSize; if (restrictToWindow) { /* Find start/end in ffAli, which is clipped to target from PSL and maybe RC'd */ ffStartEndQ(rna, ffAli, &rnaStart, &rnaEnd); /* Add 100 bases either side if possible */ if (rnaStart >= 100) rnaStart -= 100; if (rnaEnd + 100 <= rnaSize) rnaEnd += 100; } /* Write body heading info. */ +char *displayChromName = chromAliasGetDisplayChrom(database, cart, psl->tName); fprintf(body, "<H2>Alignment of %s and %s:%d-%d</H2>\n", - psl->qName, psl->tName, partTStart+1, partTEnd); + psl->qName, displayChromName, partTStart+1, partTEnd); fprintf(body, "Click on links in the frame to the left to navigate through " "the alignment.\n"); blockCount = ffShAliPart(body, ffAli, wholePsl->qName, rna + rnaStart, rnaEnd - rnaStart, rnaStart, - dnaSeq->name, dnaSeq->dna, dnaSeq->size, + displayChromName, dnaSeq->dna, dnaSeq->size, wholeTStart, 8, FALSE, isRc, FALSE, TRUE, TRUE, TRUE, TRUE, cdsS, cdsE, partTStart, partTEnd); return blockCount; } void showSomeAlignment(struct psl *psl, bioSeq *oSeq, enum gfType qType, int qStart, int qEnd, char *qName, int cdsS, int cdsE) /* Display protein or DNA alignment in a frame. */ { int blockCount, i; struct tempName indexTn, bodyTn; FILE *index, *body; @@ -7837,31 +7839,32 @@ if (qType == gftRna || qType == gftDna) blockCount = showPartialDnaAlignment(psl, oSeq, body, cdsS, cdsE, FALSE); else blockCount = showGfAlignment(psl, oSeq, body, qType, qStart, qEnd, qName); htmEnd(body); fclose(body); chmod(bodyTn.forCgi, 0666); /* Write index. */ index = mustOpen(indexTn.forCgi, "w"); if (qName == NULL) qName = psl->qName; htmStartDirDepth(index, qName, 2); fprintf(index, "<H3>Alignment of %s</H3>", qName); fprintf(index, "<A HREF=\"../%s#cDNA\" TARGET=\"body\">%s</A><BR>\n", bodyTn.forCgi, qName); -fprintf(index, "<A HREF=\"../%s#genomic\" TARGET=\"body\">%s.%s</A><BR>\n", bodyTn.forCgi, hOrganism(database), psl->tName); +char *displayChromName = chromAliasGetDisplayChrom(database, cart, psl->tName); +fprintf(index, "<A HREF=\"../%s#genomic\" TARGET=\"body\">%s.%s</A><BR>\n", bodyTn.forCgi, hOrganism(database), displayChromName); for (i=1; i<=blockCount; ++i) { fprintf(index, "<A HREF=\"../%s#%d\" TARGET=\"body\">block%d</A><BR>\n", bodyTn.forCgi, i, i); } fprintf(index, "<A HREF=\"../%s#ali\" TARGET=\"body\">together</A><BR>\n", bodyTn.forCgi); htmEnd(index); fclose(index); chmod(indexTn.forCgi, 0666); /* Write (to stdout) the main html page containing just the frame info. */ puts("<FRAMESET COLS = \"13%,87% \" >"); printf(" <FRAME SRC=\"%s\" NAME=\"index\">\n", indexTn.forCgi); printf(" <FRAME SRC=\"%s\" NAME=\"body\">\n", bodyTn.forCgi); puts("<NOFRAMES><BODY></BODY></NOFRAMES>");