79aa96ab96eaf59b3d4779e60b9e5a4f012884f3 braney Sun Sep 6 15:04:38 2026 -0700 docent: three scripts that assert a value rather than the shape of a page 34 scripts, all green. I told Brian this class had no coverage. That was wrong, and the correction matters more than the three scripts: rm36061 already asserts five fields off a Decipher hgc page, rm37615 asserts an exact lifted coordinate and names the source coordinate in noText:, and rm37326 asserts a CRISPR score triple. What is thin is not value assertions, it is value assertions anywhere other than an hgc page reached by clicking an item. These three are each somewhere else. rm37489 a lifted track printed the TEMPLATE of its dataVersion setting, "/gbdb/$D/bbi/clinvar/version.txt", where a release date belongs. The positive check is the prefix "ClinVar Release:" only -- the date after it changes every month and asserting it would fail on the next ClinVar update, which is not a regression. rm36810 trackDb's `urls` statement stopped turning data fields into links. The assertion is the HREF, a value the browser BUILT from the data rather than text it copied, and it asks for /clinvar/RCV specifically: every ClinVar hgc page carries NCBI links in its boilerplate, so a bare ncbi.nlm.nih.gov would have passed on the broken page. Measured: exactly one RCV link on the page, and it is the substituted one. rm35865 hgGene's Microarray Expression Data section was empty. The heading is on the page either way, so the two data set names under it are the check. First script here to open hgGene at all. Three things learned, all in the script comments. A lifted session cannot be reused: Gerardo's RM_37489 comes back as plain hg38 with no hub_ prefix on anything, because a lift dies with the trash it points at, so a script that needs one has to make it. A lifted composite has no hgTrackUi link for its subtrack -- every settings link points at the container, and there are four of them. And hgGene writes its sections with style='display:none', so expect: text cannot see the contents until the + is clicked; a has: written to dodge that would have passed on the empty page the ticket is about. Nothing in these three names a transcript accession or a variant accession. Those are data, and the next knownGene or ClinVar build can retire them. Items are taken by gene symbol or by position instead. refs #38252 diff --git src/hg/utils/docent/tests/regress/rm36810.docent.yaml src/hg/utils/docent/tests/regress/rm36810.docent.yaml new file mode 100644 index 00000000000..ff0a10574e1 --- /dev/null +++ src/hg/utils/docent/tests/regress/rm36810.docent.yaml @@ -0,0 +1,44 @@ +# #36810 -- trackDb's `urls` statement stopped turning data fields into links. +# +# ClinVar's trackDb carries +# +# urls rcvAcc="https://www.ncbi.nlm.nih.gov/clinvar/$$/" geneId=".../gene/$$" ... +# +# and hgc is supposed to substitute the item's own field value for $$ and print a link. +# Something between v487 and v491 broke that, so the accessions were printed as plain text +# and the reader had nowhere to go. Reported by Lou off #36808, fixed for v492. +# +# The assertion is the HREF, which is a value the browser BUILT from the data, not text it +# copied. That is what separates this from the rest of the suite: almost everything else +# here says a row was drawn or a page carries no error, and would be just as happy with an +# accession printed as dead text. +# +# It asks for RCV specifically, not merely for a link to NCBI. Every ClinVar hgc page has +# NCBI links in its description and boilerplate, so `a[href*="ncbi.nlm.nih.gov"]` would +# pass on the broken page too. /clinvar/RCV can only be there if an rcvAcc field went +# through the substitution. +# +# Nothing here names a variant. ClinVar is rebuilt every month and an accession that is on +# the page today may not be next time, so the item is taken by POSITION -- the box nearest +# the middle of a window in BRCA2 that is thick with variants -- and the assertion is on +# the SHAPE of the accession rather than on any particular one. +# +# has: rather than text:, because a href is not page text. This is the same reason rm38126 +# uses it, from the other direction: there the thing asserted was absent from innerText, here +# it never appears in innerText at all. +target: genome-test +db: hg38 +position: chr13:32396673-32400065 +reset: true +fast: true +steps: + - go: chr13:32396673-32400065 + - hide: all + - track: {clinvarMain: pack} + - expect: {rows: [clinvarMain], noText: "Warning/Error"} + + - click: {track: clinvarMain, frac: 0.5} + - expect: {url: "hgc", noText: "Warning/Error"} + + - expect: {has: 'a[href*="ncbi.nlm.nih.gov/clinvar/RCV"]'} + - expect: {has: 'a[href*="ncbi.nlm.nih.gov/gene/"]'}