94041c12e043016875ebd340568bda0ccaf122f6 lrnassar Wed Jul 8 13:53:22 2026 -0700 Add db= to cross-CGI hgTracks/hgTrackUi/hgc links to prevent wrong-assembly errors. refs #37840 Completes the incomplete work from #26892: links from the browser to a different CGI omitted db=, so the target CGI fell back to the cart's db (often wrong), producing "Can't find <track> in track database <db>" errors and broken shared links. Adds the current-assembly db to link builders across hgTracks (chromGraphTrack, expRatioTracks, config ruler and per-track configure links, variation), hgVai, hgFileUi, hgGtexTrackSettings, hgBlat, hgGene, hgNear, the barChart/GTEx faceted UI (facetedBar, barChartUi, gtexUi), and the hgTrackUi group-configure link. diff --git src/hg/hgBlat/hgBlat.c src/hg/hgBlat/hgBlat.c index 2c58ecc9795..8a603a00fb0 100644 --- src/hg/hgBlat/hgBlat.c +++ src/hg/hgBlat/hgBlat.c @@ -1887,38 +1887,38 @@ if (++seqCount > maxSeqCount) { warn("More than %d input sequences, stopping at %s<br>(see also: cgi-bin/hg.conf hgBlat.maxSequenceCount setting).", maxSeqCount, seq->name); break; } if (oneSize > maxSingleSize) { warn("Sequence %s is %d letters long (max is %d), skipping", seq->name, oneSize, maxSingleSize); continue; } if (oneSize < minSuggested) { warn("Warning: Sequence %s is only %d letters long (%d is the recommended minimum).<br><br>" - "To search for short sequences in the browser window, use the <a href='hgTrackUi?%s=%s&g=oligoMatch&oligoMatch=pack'>Short Sequence Match</a> track. " + "To search for short sequences in the browser window, use the <a href='hgTrackUi?%s=%s&db=%s&g=oligoMatch&oligoMatch=pack'>Short Sequence Match</a> track. " "You can also use our commandline tool <tt>findMotifs</tt> " "(see the <a target=_blank href='https://hgdownload.soe.ucsc.edu/downloads.html#utilities_downloads'>utilities download page</a>) to " "search for sequences on the entire genome.<br><br>" "For primers, you can use the <a href='hgPcr?%s=%s'>In-silico PCR</a> tool. In-silico PCR can search the entire genome or a set of " "transcripts. In the latter case, it can find matches that straddle exon/intron boundaries.<br><br>" "<a href='../contacts.html'>Contact us</a> for additional help using BLAT or its related tools.", - seq->name, oneSize, minSuggested, cartSessionVarName(), cartSessionId(cart), cartSessionVarName(), cartSessionId(cart)); + seq->name, oneSize, minSuggested, cartSessionVarName(), cartSessionId(cart), database, cartSessionVarName(), cartSessionId(cart)); // we could use "continue;" here to actually enforce skipping, // but let's give the short sequence a chance, it might work. // minimum possible length = tileSize+stepSize, so mpl=16 for dna stepSize=5, mpl=10 for protein. if (qIsProt && oneSize < 1) // protein does not tolerate oneSize==0 continue; } totalSize += oneSize; if (totalSize > maxTotalSize) { warn("Sequence %s would take us over the %d letter limit, stopping here.", seq->name, maxTotalSize); break; } if (isTx) @@ -2122,34 +2122,34 @@ ); printf("<P>The <b>All Results</b> checkbox disables minimum matches filtering so all results are seen." " For example, with a human dna search, 20 is minimum matches required, based on the genome size, to filter out lower-quality results.\n" "This checkbox can be useful with short queries and with the tiny genomes of microorganisms. \n" ); printf("<P>If you are interested in programmatic BLAT use," " see our <a href=\"/FAQ/FAQblat.html#blat14\">BLAT FAQ</a>.</P>\n" ); if (hgPcrOk(db)) printf("<P>For locating PCR primers, use <A HREF=\"../cgi-bin/hgPcr?db=%s\">In-Silico PCR</A>" " for best results instead of BLAT. " "To search for short sequences < 20bp only in the sequence shown on the Genome Browser, " - "use our <a href='hgTrackUi?%s=%s&g=oligoMatch&oligoMatch=pack'>Short Sequence Match</a> track. " + "use our <a href='hgTrackUi?%s=%s&db=%s&g=oligoMatch&oligoMatch=pack'>Short Sequence Match</a> track. " "If you are using the command line and want to search the entire genome, try our command line tool <tt>findMotifs</tt>, from the " "<a target=_blank href='https://hgdownload.soe.ucsc.edu/downloads.html#utilities_downloads'>utilities download page</a>.</p>", - db, cartSessionVarName(), cartSessionId(cart)); + db, cartSessionVarName(), cartSessionId(cart), db); puts("</TD></TR></TABLE>\n"); printf("</FORM>\n"); webNewSection("About BLAT"); printf( "<P>BLAT on DNA is designed to\n" "quickly find sequences of 95%% and greater similarity of length 25 bases or\n" "more. It may miss more divergent or shorter sequence alignments. It will find\n" "perfect sequence matches of 20 bases.\n" "BLAT on proteins finds sequences of 80%% and greater similarity of length 20 amino\n" "acids or more. In practice DNA BLAT works well on primates, and protein\n" "BLAT on land vertebrates."