Skip to content

feat: regional plot frontend — Plotly Locus View on the gene page (#27)#38

Merged
GhostAnderson merged 1 commit into
feat/plot-backendfrom
feat/plot-frontend
Jul 7, 2026
Merged

feat: regional plot frontend — Plotly Locus View on the gene page (#27)#38
GhostAnderson merged 1 commit into
feat/plot-backendfrom
feat/plot-frontend

Conversation

@boxiangliu

Copy link
Copy Markdown
Contributor

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; a scattergl of 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), not main — it needs those /api endpoints. Rebase to main once #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/TP53 renders 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.

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>
@GhostAnderson GhostAnderson merged commit 24362a8 into feat/plot-backend Jul 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants