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__ 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/rm38042.docent.yaml src/hg/utils/docent/tests/regress/rm38042.docent.yaml new file mode 100644 index 00000000000..0735b8486e9 --- /dev/null +++ src/hg/utils/docent/tests/regress/rm38042.docent.yaml @@ -0,0 +1,53 @@ +# #38042 -- an item whose ends fall outside the chains quickLift loads was dropped, even +# when the part inside the window mapped fine. In one ClinVar window that removed 44 of +# the 46 copy number variants. +# +# quickLift loads chains for the window plus padding, capped at 1 Mb (QUICKLIFT_RANGE_PAD, +# hg/lib/quickLift.c). A ClinVar CNV can run to 159 Mb, so both of its ends sit where no +# chain reaches, remapRangeList can place neither, and the whole item goes. 7f65d3da8f2 +# pulls the ends in to the nearest aligned base before mapping -- snapToBlock() and +# clipBedToChains() in quickLift.c, gated by quickLiftClipToChains, on by default. +# +# What the assertion reads is the spanned-item merge. clinvarCnv sets mergeSpannedItems, +# so every item that spans the whole window is collapsed into one synthetic "mergedItem" +# box whose tooltip counts them. An item that fails to lift is dropped before it can reach +# that merge, so on a build without the fix the spanning CNVs are gone and there is no +# merged box at all: the two survivors sit inside the window and nothing spans it. The +# box is therefore the whole signature, and it is read on the source as well so that the +# step says the lift preserved something rather than that the track exists. +# +# The COUNT is deliberately not asserted. It was 45 on both sides on 2026-09-12, but +# ClinVar is reloaded by an otto cron and the number moves with the data, which would turn +# a nightly red into news about ClinVar instead of about quickLift. +# +# `data-tooltip` and not `title`: hgTracks writes both on a map box and the page's own +# tooltip code moves the title out of the DOM once its JavaScript has run. +proof: + - "assertion-only 2026-09-12 -- written from the ticket and from 7f65d3da8f2, 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: {clinvar: pack, clinvarMain: hide, clinvarSubLolly: hide, clinvarCnv: pack} + + # The source: the spanning CNVs are there and the merge has collapsed them. + - expect: + rows: [ruler, clinvarCnv] + exact: true + has: 'area[data-tooltip^="Merged "]' + + - convert: {to: hs1, quicklift: true, hideDefaults: true} + - open: lift + + # And after the lift. The other two ClinVar subtracks come back on the target even + # though they were hidden on the source, which is #38044 and is not this test's business, + # so the row list is not exact here. + - expect: + rows: [clinvarCnv] + has: 'area[data-tooltip^="Merged "]' + noText: "Warning/Error"