Skip to content

Support for selecting multiple origins in geneVariant term - #5083

Open
gavrielm wants to merge 15 commits into
masterfrom
genev_origin_sampletype
Open

gavrielm wants to merge 15 commits into
masterfrom
genev_origin_sampletype

Conversation

@gavrielm

@gavrielm gavrielm commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR supports selection of one or more mutation origins for geneVariant term. In the geneVariant search handler,
if a mutation type (e.g. SNV/indel) has multiple origins (e.g. somatic and germline), then checkboxes are rendered to select one or more of these origins. The selected origins are stored on tw.term.origins[].

Since now origin is a dynamic property, dtTerms and predefined groupsets that were defined by origin have been removed. Legacy geneVariant termwrapper structure is still supported.

Labels for selected origins and sample types are stored on term.originLabel and term.sampleTypeLabel, respectively, and then concatenated into term.label. The term.label is displayed along with term.name in the plot title and in the term pill.

Please test using DISCOVER portal.

Checklist

Check each task that has been performed or verified to be not applicable.

  • Tests: Added and/or passed unit and integration tests, or N/A
  • Todos: Commented or documented, or N/A
  • Notable Changes: updated release.txt, prefixed a commit message with "fix:" or "feat:", added to an internal tracking document, or N/A
  • Rust: Checked to see whether Rust needs to be re-compiled because of this PR, or N/A

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several state-reset, label-generation, compatibility, and legacy-migration defects can produce incorrect filtering or failing tests.

Review effort: Balanced
Findings: 2 High severity · 4 Medium severity

Open (6)
What changed in this PR

Adds multi-origin selection and labeling for geneVariant terms across client and server processing.

Changes:

  • Makes mutation data-type terms origin-agnostic.
  • Adds reusable origin/sample-type selectors and labels.
  • Filters and aggregates variants across selected origins.
File Description
shared/​utils/​src/​test/​terms.unit.spec.ts Tests origin-agnostic data-type terms.
shared/​utils/​src/​common.ts Simplifies shared data-type terms.
shared/​types/​src/​terms/​geneVariant.ts Updates current and legacy origin types.
server/​src/​test/​mds3.init.unit.spec.js Tests server-side origin filtering.
server/​src/​termdb.matrix.ts Adjusts sample-type labels.
server/​src/​termdb.barchart.js Attaches origins to chart terms.
server/​src/​routes/​termdb.categories.ts Supports dynamic origin categories.
server/​src/​mds3.init.js Filters variants and availability by origins.
client/​tw/​test/​geneVariant.integration.spec.ts Tests term-wrapper migration.
client/​tw/​geneVariant.ts Migrates legacy terms and updates groupsets.
client/​termsetting/​handlers/​geneVariant.ts Displays combined labels.
client/​termdb/​handlers/​test/​rememberedGvQ.unit.spec.ts Updates remembered-setting expectations.
client/​termdb/​handlers/​test/​geneVariant.integration.spec.ts Tests origin and label selection.
client/​termdb/​handlers/​test/​geneExpression.unit.spec.ts Tests sample-type labels.
client/​termdb/​handlers/​rememberedGvQ.ts Matches settings by data type.
client/​termdb/​handlers/​geneVariant.ts Implements origin selection and submission.
client/​termdb/​handlers/​geneExpression.ts Reuses sample-type labeling.
client/​filter/​tvs.dt.js Merges selected-origin values.
client/​filter/​test/​tvs.dt.unit.spec.ts Tests origin value merging.
client/​dom/​test/​checkboxSelect.unit.spec.ts Tests the checkbox selector.
client/​dom/​sampleTypeSelect.ts Generalizes sample-type selection and labels.
client/​dom/​index.ts Exports checkbox utilities.
client/​dom/​checkboxSelect.ts Adds reusable checkbox selection UI.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread client/termdb/handlers/geneVariant.ts Outdated
Comment thread client/tw/geneVariant.ts Outdated
Comment thread client/dom/sampleTypeSelect.ts Outdated
Comment thread client/termdb/handlers/geneVariant.ts Outdated
Comment thread client/tw/geneVariant.ts
Comment thread server/src/termdb.matrix.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Legacy saved sessions can be misinterpreted, and current label, matrix, and type-definition issues cause incorrect behavior or test/type-check failures.

Review effort: Balanced
Findings: 3 High severity · 2 Medium severity

Open (5)
Resolved since last review (3)

Comment thread client/tw/geneVariant.ts Outdated
Comment thread shared/types/src/terms/geneVariant.ts
@gavrielm
gavrielm force-pushed the genev_origin_sampletype branch 2 times, most recently from 9199647 to bddf844 Compare October 2, 2026 21:18
@gavrielm
gavrielm marked this pull request as ready for review October 2, 2026 21:49
@gavrielm
gavrielm requested review from congyu-lu and xzhou82 October 2, 2026 21:50
@xzhou82
xzhou82 force-pushed the genev_origin_sampletype branch from 72f6d5f to 0294117 Compare October 3, 2026 15:37
@xzhou82
xzhou82 force-pushed the genev_origin_sampletype branch from 0294117 to 92e075f Compare October 4, 2026 14:36

This branch has not been deployed

No deployments
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.

2 participants