Repository navigation
Portal pages in the app's style, the lab's plot controls, and a gene query dialog (prototype) - #46
Merged
Merged
Conversation
…ewHead The Results and Comparison pages now look like the rest of the app while keeping cBioPortal's tab layout. The page header is the lab's own app header. A summary card holds the study, the query (genes as chips), the headline altered count with its share of queried patients, and the groups with their figure swatch and size, plus what the page left out for this study. On the Results page, "Modify query" opens the study/genes form in that card. The page tabs use the lab's tab style, now shared as PAGE_TAB in toolbar.ts. Sub-tabs and the Mutations tab's gene choice are segmented tabs in a toolbar row. Every card renders through ViewHead (title, groups drawn, help, timing, participation). Loading shows skeletons. The legacy .portal-* rules are removed and the new chrome is Tailwind (data-tw). Verified: screenshots of the Oncoprint, Mutations and Survival tabs, the comparison page, the open query form and a 390px viewport (no horizontal scroll, no console errors); scripts/gate.sh green, including the Results page's table and lollipop e2e checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TyVfAhLnjshk2kWewGnLum
…atient
The plot view's settings bar (both axes with log, a box plot's colour and ring, highlight,
unit, swap) moves out of the lab's PlotCard into app/lab/plot-controls.tsx. The lab's card and
the portal pages' plot view now render the same toolbar, and each edit goes into the document,
so a link reproduces it.
The Results page's Plots tab handed the plot [Altered, Unaltered], but a plot draws only its
first cohort, so the tab showed the altered patients alone. As on cBioPortal, it now plots
every queried patient ("All patients"), with Altered highlighted. Its card is titled "Plot",
since a fixed "<gene> copy number vs mRNA" was wrong as soon as an axis changed.
Verified: on brca_tcga KRAS/NRAS/BRAF the tab draws 526 of 1,101 patients with the 33 altered
ones highlighted; switching unit to samples re-ran once (529 of 1,108 samples) and wrote the
document to the URL; the lab's plot card renders unchanged; no page errors; scripts/gate.sh
green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TyVfAhLnjshk2kWewGnLum
…e's study list One dialog for entering genes, meant to become the standard everywhere a page asks for them (app/_genes/GeneQueryDialog.tsx): - Search over genes, their aliases and the warehouse's gene sets (a set over 30 genes is offered disabled, with the reason). - The query as text, checked line by line as it is typed: what each entry selects, in words, or what is wrong with it. Symbols are checked against the gene and gene_alias tables: an alias (p53, HER2, MLL) is caught and replaced in one click; an unknown symbol, unsupported OQL (GAIN, HETLOSS, …) or a count outside the place's limits blocks Apply, and Apply's title says what it waits for. - Recent and saved lists in this browser (app/_genes/gene-lists.ts, localStorage), and clickable OQL help. - Two modes: "oql" (each entry a gene and what counts as altered in it) and "genes" (the portal's gene list; [A B] merged rows only where the oncoprint can draw them). Used by: - The lab's gene views (compare, oncoprint, co-occurrence, co-expression, lollipop) and the oncoprint card's genes button, in place of the chip editor (GeneListEditor, removed). - The Results page's query (app/portal/query-editor.tsx): Explore's study list, single-select, beside the gene query. The page now reads ?genes= as OQL as the portal does (genes split by spaces or commas; "TP53 KRAS: MUT" is two entries), so old links mean what they did. Each entry decides the Altered/Unaltered groups; the page says that the oncoprint and gene tabs still draw every alteration of the genes. Supporting changes: - lib/oql-parse.ts: the OQL parser alone, browser-safe; lib/oql.ts re-exports it. - lib/gene-query.ts: the pure line-by-line checker; POST /api/genes (lib/genes.ts) for symbol checks, search and gene-set members, reference data only. - app/_studies/study-list.tsx: Explore's search, capability filters and rows, shared by its picker and the Results page; the portal layout gets the lab's query cache. - e2e: the three checks that drove the chip editor now edit the dialog's text and Apply. Verified: the dialog on brca_tcga (aliases fixed, FOOBAR1 and GAIN blocked, a list saved, applied); KRAS: G12C / TP53 / ERBB2: AMP gives 381 altered patients; old comma links render; Explore's picker unchanged; 9 unit tests; scripts/gate.sh green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TyVfAhLnjshk2kWewGnLum
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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 portal Results and Comparison pages restyled to match the rest of the app, the Plots tab given the lab's controls, and a prototype of one gene/OQL entry dialog for every place a page asks for genes.
What changes for a researcher
gene/gene_aliastables: an alias (p53 → TP53, HER2 → ERBB2) is fixed in one click. An unknown symbol, unsupported OQL (GAIN, HETLOSS, …) or a count past the place's limit blocks Apply, and Apply says why.?genes=as OQL, soKRAS: G12C,ERBB2: AMPetc. decide who is Altered. Genes split by spaces or commas as on the portal, so existinggenes=KRAS,NRAS,BRAFlinks mean what they did. The page says that OQL decides the groups while the oncoprint and gene tabs draw every alteration of the genes.How
app/portal/portal-chrome.tsx(header, summary card) andapp/portal/query-editor.tsx.PortalTabsrenders cards throughViewHeadand draws figures throughfigureView, as the lab's kind cards do. The lab's page-tab class is shared asPAGE_TABinapp/_ui/toolbar.ts. The legacy.portal-*CSS is removed and the new chrome is Tailwind (data-tw).app/lab/plot-controls.tsx: the plot toolbar, moved out of the lab'sPlotCardso the lab and the portal render the same one.app/_studies/study-list.tsx: Explore's study search, filters and rows, now shared by Explore's picker and the Results query. The portal layout gets the lab's query cache.app/_genes/GeneQueryDialog.tsx, withlib/gene-query.ts(the pure line-by-line checker) andlib/oql-parse.ts(the OQL parser, split out oflib/oql.tsso it runs in the browser;lib/oql.tsre-exports it).POST /api/genes(lib/genes.ts): symbol checks, gene and gene-set search, gene-set members. Reference data only, no patient rows.Not in this PR
?doc=a portal page writes) is a known issue, left for separate work.Verification
GATE_PORT=4109 scripts/gate.shpasses on this branch rebased onto current master: lint (eslint, knip, ruff), build, 1,325 unit, 47 Postgres, 6/6 planted access bugs, 465/465 portal comparisons, 266 e2e checks. The three e2e checks that drove the old chip editor now edit the dialog's text and Apply; there are 9 new unit tests for the query checker. Checked by hand against the live warehouse:KRAS: G12C / TP53 / ERBB2: AMPgives 381 altered patients.Preview
No deploy preview: this repo deploys to Vercel from
master. Try it on a branch checkout at/portal/results?study=brca_tcga&genes=KRAS,NRAS,BRAF.🤖 Generated with Claude Code
https://claude.ai/code/session_01TyVfAhLnjshk2kWewGnLum