feat(website): predefined COVID variant signatures from collections (W-ASAP)#1229
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This comment was marked as outdated.
This comment was marked as outdated.
ef0f352 to
8246e5f
Compare
08a33ce to
160cebe
Compare
3428cc9 to
5727296
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support in the W-ASAP “Variant Explorer” for selecting curated, predefined COVID variant mutation signatures from Collections (in addition to the existing computed-from-clinical-signatures flow), including URL serialization and UI updates.
Changes:
- Extends WASAP config/types and URL state handling to support
signatureType: 'computed' | 'predefined'plus predefined-only params (collectionId,newMutationsOnly). - Adds a Downshift-based
CollectionComboboxand updates the Variant Explorer filter panel to switch between computed vs predefined signature sources. - Fetches predefined collections from the backend (by user + organism) and adds tests for URL round-tripping and the new filter UI.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/views/pageStateHandlers/WasapPageStateHandler.ts | Parse/serialize new predefined variant params into/from the URL. |
| website/src/views/pageStateHandlers/WasapPageStateHandler.spec.ts | Adds URL round-trip tests for predefined signature params. |
| website/src/types/wastewaterConfig.ts | Adds internalName and configures predefined variants source for COVID. |
| website/src/components/views/wasap/wasapPageConfig.ts | Adds internalName, SignatureType, and extends WasapVariantFilter. |
| website/src/components/views/wasap/WasapPage.tsx | Logs query errors; hides clinical fetch info for predefined signatures. |
| website/src/components/views/wasap/useWasapPageData.ts | Adds predefined-signature fetching via backend collections. |
| website/src/components/views/wasap/initialMeanProportionInterval.spec.ts | Updates test fixtures to include signatureType. |
| website/src/components/pageStateSelectors/wasap/WasapPageStateSelector.tsx | Prefetches matching collections and passes results/label into the variant filter. |
| website/src/components/pageStateSelectors/wasap/utils/CollectionCombobox.tsx | New Downshift combobox for selecting a predefined collection. |
| website/src/components/pageStateSelectors/wasap/utils/CollectionCombobox.browser.spec.tsx | Browser tests for combobox selection/clearing/blur behavior. |
| website/src/components/pageStateSelectors/wasap/InfoBlocks.tsx | Updates info text to describe both signature modes. |
| website/src/components/pageStateSelectors/wasap/filters/VariantExplorerFilter.tsx | UI to toggle computed vs predefined and pick a collection / new-mutations-only. |
| website/src/components/pageStateSelectors/wasap/filters/VariantExplorerFilter.browser.spec.tsx | Browser tests covering the predefined path in the filter panel. |
| website/src/backendApi/backendService.ts | Extends getCollectionSummaries to accept an optional userId filter. |
| website/package.json | Adds downshift dependency. |
| website/package-lock.json | Locks downshift and updates dependency metadata. |
Files not reviewed (1)
- website/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…t mode Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes the redundant collectionsOrganism field from predefinedVariantsSource and exposes it as internalName on the base config, where it was already implicitly known as the map key. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Falls back to the configured default when no collectionId is present in the URL, mirroring the existing default variant behaviour for computed mode. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ignatureType Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r behaviour Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ox tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…iantExplorerFilter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…f hardcoded value Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…in CollectionCombobox Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…obox Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on every keystroke Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…defined signatures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Selector.tsx Co-authored-by: Fabian Engelniederhammer <92720311+fengelniederhammer@users.noreply.github.com>
02c0bff to
e267af0
Compare
fengelniederhammer
approved these changes
Jun 8, 2026
fengelniederhammer
left a comment
Contributor
There was a problem hiding this comment.
LGTM (not sure why the diff shows 31 commits now, looks like something went wrong during the rebase)
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.
resolves #1199
Adds support for predefined variant signatures in the W-ASAP Variant Explorer mode, as an alternative to computing signatures from clinical sequences. For COVID, these come from a configured collections source (filtered by user ID, organism, and a tag in the description).
Summary
predefinedVariantsSourceconfig toWasapPageConfigspecifying where to fetch predefined variant collections from (userId, tag, label); the organism is taken from the newinternalNamefield on the base configgetCollectionSummariesand exposes them in a downshift autocomplete combobox in the filter panelWasapVariantFilterwith asignatureTypefield ('computed'|'predefined') and predefined-specific fields (collectionId,newMutationsOnly); serialised to/from URLsignatureTypedefaults to'computed'and is omitted from the URL for backwards compatibility with existing bookmarksWasapUntrackedFilter), removing the need to passcomputedDefaultsthrough the component treeSignatureTypetowasapPageConfig.tsalongside all other WASAP typesinternalNametoWasapPageConfigBaseso the organism key is accessible from the config directlyScreenshot
Testing
WasapPageStateHandler.spec.ts— URL round-trip tests for the predefinedsignatureType: serialising aWasapVariantFilterwithsignatureType: 'predefined',collectionId, andnewMutationsOnlyinto URL params and parsing them back produces the original state.CollectionCombobox.browser.spec.tsx(new file) — Browser tests for the autocomplete combobox used to pick a predefined collection: selecting a collection from the dropdown, clearing the selection via the clear button, and blur behaviour (committing a valid value on blur, rejecting an invalid one with an error state).VariantExplorerFilter.browser.spec.tsx— Browser tests for the predefined path in the filter panel: switching the "Variant definition source" dropdown from computed → predefined, selecting a collection, and toggling the "Mutation not in parent" checkbox.PR Checklist