7aba31f14aed7f2620e4746b54f9569a5c93e1ad
braney
Sat Sep 12 15:07:34 2026 -0700
docent: ten regression tests for quickLift, on hgTracks and on hgc, refs #38252
Fourteen scripts here already lift something -- they are the ones that call
`convert: {quicklift: true}` -- so these take the parts of the lift that had no
test. Five read the lifted image and five read a details page:
rm38032 the target keeps the source's track order. First use of `ordered:`,
which was added to expect: for this bug
rm38042 a ClinVar CNV running past the chains quickLift loads is clipped
rather than dropped, so the spanned-item merge still has it
rm37646 a lolly composite subtrack lifts, and its map boxes still carry its
own track name -- the string the stale pop pointer clobbered
rm36048 the spanned-item merge still works on a lifted DECIPHER track
rm37815 "Hide all default tracks on the target" hides all six of hs1's own
tracks and keeps the lifted one
rm36059 a lifted GENCODE Versions item gives the real details page, in
destination coordinates, with no "Can't start query"
rm36370 a lifted knownGene click renders GeneReviews and Methods, the two
sections the ticket says were missing
rm36125 a lifted RefSeq item's page, and its Predicted Protein link
returning SHH's peptide instead of a blank page
rm36942 the Alignment Differences description, reached from a difference
item: the four colors and the figure
rm38146 the same page with a GenArk assembly as the SOURCE, down to the base
alignment that reads query bases out of a two bit file
All ten are assertion-only: every fix shipped long ago. make test is 57 of 57
green in 10m18s, up from 7m34s -- each script costs a convert, about 17 seconds,
because no URL builds a quickLift hub.
README.txt gains what the batch cost. A lifted row and map box carry a per-run
hub_<n>_ prefix, so rows: matches by suffix and a has: selector must use a
substring. Never assert a count an otto reload can move: rm38042 and rm36048
both read the merged-item box and leave its count (45 for ClinVar today) to a
comment. And a details page prints the track's own labels whether or not it
worked, so each hgc assertion names something only the fixed page has.
Three candidates were rejected: #38033's "(N items could not be lifted)" label
is only in the drawn image and the page JSON, where no expect: check reaches it;
#37970 needs a broadPeak track and hg38 has none; #37974's center-label drag is
pixels.
diff --git src/hg/utils/docent/tests/regress/rm36125.docent.yaml src/hg/utils/docent/tests/regress/rm36125.docent.yaml
new file mode 100644
index 00000000000..c8dacb6b346
--- /dev/null
+++ src/hg/utils/docent/tests/regress/rm36125.docent.yaml
@@ -0,0 +1,72 @@
+# #36125 -- the list of things that went wrong on NCBI RefSeq tracks after a QuickLift.
+# The half asserted here is the one the ticket opens with: clicking an item in the UCSC
+# RefSeq subtrack came back with
+#
+# Couldn't set connection database to hub_25071_hs1
+# mySQL error 1049: Unknown database 'hub_25071_hs1'
+#
+# because hgc took the destination hub genome for a MySQL database. The ticket's note-4
+# adds the two links that were still broken after the first pass: Predicted Protein came
+# back blank and CDS FASTA alignment raised the same Unknown database error. Three
+# commits: 2654a3d8584 (subtrack selection, Predicted Protein and CDS FASTA links),
+# fabf13fff3e (the CCDS link routes to the source assembly with coordinates lifted back,
+# and Get Genomic Sequence Near Gene reads the destination assembly at the lifted exon
+# coordinates), and 1f88a89d5bb (the note on a quickLifted CCDS page).
+#
+# So this clicks the item and then follows the link the ticket's note-4 said came back
+# blank. Both pages are asserted the same way: a positive text that only the real page
+# has, and the ticket's own error string. The error page carries the track's labels in its
+# own header, so a positive check on those alone would pass on it.
+#
+# NM_000193 is named without its version on purpose. hgTracks writes the unversioned
+# accession into the map box (i=NM_000193) even though the label shows NM_000193.4, so the
+# script does not break when RefSeq bumps the version.
+proof:
+ - "assertion-only 2026-09-12 -- written from the ticket after the fix shipped"
+
+target: genome-test
+db: hg38
+position: chr7:155799529-155812871
+reset: true
+fast: true
+steps:
+ - go: chr7:155799529-155812871
+ - hide: all
+ - track: {refSeqComposite: pack, refGene: pack}
+ - expect: {rows: [refGene], noText: "Warning/Error"}
+
+ - convert: {to: hs1, quicklift: true, hideDefaults: true}
+ - open: lift
+ - expect: {rows: [refGene], noText: "Warning/Error"}
+
+ # The click the ticket was filed about. The position printed here is the destination
+ # one: NM_000193.4 is chr7:155,799,980-155,812,463 on hg38 and chr7:156,983,127-156,995,607
+ # on hs1, measured on genome-test on 2026-09-12. The CCDS link beside it is the other
+ # half of fabf13fff3e -- it has to point back at the SOURCE assembly, because the ccdsGene
+ # handler cannot open the destination hub genome as a database.
+ - click: {track: refGene, item: "NM_000193"}
+ - expect:
+ text: "RefSeq Gene SHH"
+ noText: "Unknown database"
+ - expect:
+ text: "chr7:156983127-156995607"
+ has: 'a[href*="ccdsGene"][href*="db=hg38"]'
+
+ # Two things about the links under the item. The CDS FASTA alignment link is gone on
+ # purpose -- hgPal would open the destination's hub-virtual db, and its coordinates are
+ # in destination space while the multiZ alignment lives in source coords, so hgc.c skips
+ # the link when liftDb is set. And Predicted Protein is routed to htcTranslatedPredMRna
+ # rather than htcTranslatedProtein, which is how the peptide comes from the lifted exons
+ # instead of the source assembly's refPep file.
+ - expect:
+ noText: "CDS FASTA alignment"
+ has: 'a[href*="htcTranslatedPredMRna"]'
+ - click: 'a:has-text("Predicted Protein")'
+
+ # The blank page the ticket's note-4 reported. Asserting the sequence itself and not
+ # merely that the page is not empty: SHH's N terminus is a fact about the gene, so this
+ # says the peptide was translated from the destination assembly at the lifted exon
+ # coordinates and is the right gene, which is what fabf13fff3e and 2654a3d8584 changed.
+ - expect:
+ text: "MLLLARCLLLVLVSSLLVCSGLACGPGRGFGKRRHPKK"
+ noText: "Unknown database"