feat(website): rsv resistance mutations in wastewater dashboard#1257
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2b2edbb to
dd3c21e
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for RSV resistance mutation annotations in the W‑ASAP (wastewater) dashboards by introducing an explicit annotationMode on resistance mutation collections and updating resistance annotation building logic to support both COVID-style (“per variant”) and RSV-style (“per collection”) annotations.
Changes:
- Added required
annotationMode: 'per-variant' | 'per-collection'toResistanceMutationCollectionConfig. - Updated
buildResistanceDatato emit mutation annotations differently depending onannotationMode(per-mutation vs flattened per-collection). - Enabled resistance analysis for RSV-A/RSV-B in
wastewaterConfig.tsand configured their resistance mutation collections + defaults; updated tests accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/views/pageStateHandlers/WasapPageStateHandler.spec.ts | Updates test config to include required annotationMode for resistance sets. |
| website/src/types/wastewaterConfig.ts | Adds RSV-A/RSV-B resistance mode + collection config; adds staging override mappings. |
| website/src/components/views/wasap/wasapPageConfig.ts | Extends resistance collection config type with required annotationMode. |
| website/src/components/views/wasap/resistanceData.ts | Implements annotationMode branching in resistance data/annotation building. |
| website/src/components/views/wasap/resistanceData.spec.ts | Adds/updates unit tests for both per-variant and per-collection annotation modes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds a `per-collection` annotation mode to `ResistanceMutationCollectionConfig` so RSV resistance data (already in protein coordinates) can be surfaced as one annotation per collection rather than one per mutation. Enables resistance analysis mode on the RSV-A and RSV-B wastewater dashboards using collection IDs 5001–5004 from the ViralZone seeder. Existing COVID configs explicitly opt in to the original `per-variant` behaviour so the refactor is backwards-compatible. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
573f451 to
2a5dc6e
Compare
Comment on lines
+55
to
+73
| if (setConfig.annotationMode === annotationMode.perVariant) { | ||
| filterVariants.forEach((variant) => { | ||
| (variant.filterObject.aminoAcidMutations ?? []).forEach((aminoAcidMutation) => { | ||
| mutationAnnotations.push({ | ||
| name: variant.name, | ||
| symbol: setConfig.annotationSymbol, | ||
| description: setConfig.description, | ||
| aminoAcidMutations: [aminoAcidMutation], | ||
| }); | ||
| }); | ||
| }); | ||
| } else { | ||
| mutationAnnotations.push({ | ||
| name: setConfig.name, | ||
| symbol: setConfig.annotationSymbol, | ||
| description: setConfig.description, | ||
| aminoAcidMutations: [aminoAcidMutation], | ||
| })), | ||
| ); | ||
| aminoAcidMutations: allMutations, | ||
| }); | ||
| } |
fengelniederhammer
approved these changes
Jun 11, 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.
Closes #1242
Summary
Adds RSV resistance mutation annotations. They are different from the covid annotations, in that we really use only one annotation for multiple mutations, whereas with covid we use one annotation per mutation. We do this because we want to name each mutation individually. This difference is now encoded with
annotationMode, see below.annotationMode: 'per-variant' | 'per-collection'(required, no default) toResistanceMutationCollectionConfigbuildResistanceDatato branch on the mode:per-variantkeeps existing COVID behaviour (one annotation per mutation, name = variant name);per-collectionemits one annotation for the whole collection with all mutations flattenedresistanceAnalysisModeEnabledon RSV-A and RSV-B. Prod collection IDs are 4983/4984 (RSV-A) and 4985/4986 (RSV-B); staging overrides these to 5001/5002 (RSV-A) and 5003/5004 (RSV-B) viawastewaterOrganismStagingConfigs.annotationMode: 'per-variant'on all three existing COVID collectionsScreenshot
Test plan
resistanceData.spec.ts— existing per-variant tests still pass; new per-collection describe block covers flattened annotation and query-variant skippingtsc --noEmit)🤖 Generated with Claude Code