Repository navigation
Conversation
…h, card and Nearest Bead: pgp-iqon.9
…d frame budget Each check runs once more against a planted mistake: a search or Nearest that reads every finding, an Origin button that is on, and a 20 ms busy loop in draw() for the frame budget. Bead: pgp-iqon.9
…d and Nearest Bead: pgp-iqon.9
…er-level check Bead: pgp-iqon.9
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Collaborator
Author
|
@coderabbitai review |
Action not completed
|
# Conflicts: # CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
The genome map on a person's page stopped at the chromosome level. A reader could open a chromosome and zoom to about 10 Mb. The reader could not see which genes sit under a finding or where in a gene a change lies, and could not find a gene by its name. A click on a finding left the map at once. With no finding in view, the map gave no way to the next one.
The fix
The fix is in the map's browser files only (
assets/live/map.js,map.css). The map document andogdo not change.level()rule works by bases per pixel. The chromosome level is above 16,667, the region level goes down to 833, and the gene level is below that. A view under 50 kb is the reads level, drawn as the gene level for now. The view can now narrow to 100 bp./map/genes/<chrom>.json, whichog map genesalready serves). It draws every gene that fits in three rows. Each row has a strip for the bars and a strip for the names, so a name never covers another. The genes that a finding names come first, in bold, then the protein-coding genes, then the rest. At the gene level each gene is a model: a thin line with strand chevrons and the merged exon blocks inside its span. A finding there is a dashed tick down through every lane, with its HGVS under its gene. More than 4,000 genes in view draw as a density strip with "Dense here: zoom in to see each one".Genome › chr11 › 11p15.4 › 5.150-5.350M, and each step up is a button.[]and0work as before. Esc closes the card, then steps out one level at a time./puts the cursor in the search box, andLopens the layers. Tab steps through the findings in view (a ring on the map, the card in the margin), then leaves the map.#chr7:117.480-117.669M), and under 60 kb it keeps positions (#chr7:117480026-117668665). A link then opens the same close view.docs/genome-map.mdis new, in the nav under Guides after "Watch a Run Live". It says what the map shows, its levels, keys, search, layers, routes and the document format. The two live demo pictures are retaken, andCHANGELOG.mdhas one line for this change.The veil
Search, the card, Nearest and the bold names of the genes lane all read
drawn(), the list that the map already draws. That list passes every row through the page's own veil. So a closed result is never a search line or a card, Nearest never leads to it, and it never makes a gene bold. The search line of a gene comes from the names file only, so it is the same whether a closed result names that gene or not. When the page closes a result again, the card closes and the search lines are built again. The gene files are reference data, the same for every reader.Decisions
tests/test_live_demo.py, not in a newtests/test_map_perf.py. This wave adds no new Python file, and that test already builds the demo, so the frame check uses it.ogfrom the 200 MB synthetic ROH text would cost minutes of a CI shard for the same picture.window.PGP.state). It fetches nothing.Outputs
No pipeline output, option, config key or file name changes. On the live page, the map's address gains the finer forms above, and the old forms open the same views. A click on a finding now opens its card instead of the finding's page.
How it was checked
Each new check in
tests/test_live_demo.py(map_checks) also runs once against a planted mistake, and it must fail there:/opens search. A gene, a band and a finding are found, and Enter flies there (a finding with its card). The son's closed result is never a line, by its gene, id or titledraw()The frame check runs a scripted pan of 300 steps, 100 each at the chromosome, region and gene levels. It sends real mouse events through Chrome's DevTools protocol. The work of each frame is the pointer handlers plus
draw(), timed withperformance.now()inside the page, not the frame interval. The budget is 8 ms at the median and 16 ms at the 95th percentile. The first paint must come within 150 ms of the document arriving (parse 30 ms), and the JS heap must stay at 60 MB at most.Local measures came from a Mac mini with headless Chrome, on the genome-scale document. The work per frame was 0.60 ms at the median, 2.10 ms at p95 and 4.00 ms at most. The first paint took 47 ms, the parse 1 ms, and the heap was 5.5 MB. With the busy loop, the median was 20.60 ms and p95 22.20 ms, and the check failed, as it must.
Every map check passed locally: 42 PASS and no FAIL, with the existing veil, karyogram, fallback and 390 px checks. The person layout, phone, phone report and fold checks passed too. The docs build with
zensical build --strict, and the site check found 0 errors on 97 pages. The retaken pictures passcheck_pictures.py(chunks and OCR).CI runs: to follow on this head.
Bead: pgp-iqon.9