feat: regional plot frontend — Plotly Locus View on the gene page (#27)#38
Merged
Merged
Conversation
Closes #27. Wires the #25 backend into the gene page as a LocusZoom-style Plotly plot, styled to Liu Fei's mockup (#23). - gene.html: blue/slate palette; tissue + LD-population selectors; a Plotly scattergl of position vs −log10(p) colored by r² (first paint from /api/gene/{key}/regional); click a point to re-pick the lead (/api/ld, client-side re-color); genome-wide-significance line; LD legend + caveat. - viz.py: lead marker -> orange #f97316 (per Liu Fei), was purple. - web.py: gene page passes the tissue list to the selector. - Template-render tested; 100% coverage. Verified live: /gene/TP53 renders the plot UI with 25 real tissues. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gaojunbin
approved these changes
Jul 7, 2026
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.
What
Closes #27. The frontend of the regional plot: a LocusZoom-style Plotly "Locus View" on the gene page, wired to the shipped #25 backend and styled to Liu Fei's mockup (#23).
gene.html: her blue/slate palette; tissue + LD-population selectors; ascatterglof position vs −log₁₀(p) colored by r² (first paint from/api/gene/{key}/regional); click a point to re-pick the lead (/api/ld, client-side re-color); genome-wide-significance line; LD legend + honesty caveat.viz.py: lead marker → orange#f97316(per Liu Fei), was purple.web.py: gene page passes the tissue list to the selector.Stacked on #25
Base branch is
feat/plot-backend(#25), notmain— it needs those/apiendpoints. Rebase tomainonce #25 merges.Testing
ruff/mypy --strict/ 100% coverage. Template rendering is unit-tested (selectors, plot container, Plotly, endpoint wiring); the client JS isn't unit-tested (no JS harness). Verified live:/gene/TP53renders the plot UI with 25 real tissues; the backend returns 5,442 colored variants (#25).Review
@liufei-f — does the Locus View match your design? (palette, orange lead, layout). The app shell / cross-dataset view (#35/#36) are deferred per our reconciliation.