Skip to content

feat(website): rsv resistance mutations in wastewater dashboard#1257

Merged
fhennig merged 7 commits into
mainfrom
feat/rsv-resistance-mutations-dashboard
Jun 11, 2026
Merged

feat(website): rsv resistance mutations in wastewater dashboard#1257
fhennig merged 7 commits into
mainfrom
feat/rsv-resistance-mutations-dashboard

Conversation

@fhennig

@fhennig fhennig commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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.

  • Adds annotationMode: 'per-variant' | 'per-collection' (required, no default) to ResistanceMutationCollectionConfig
  • Updates buildResistanceData to branch on the mode: per-variant keeps existing COVID behaviour (one annotation per mutation, name = variant name); per-collection emits one annotation for the whole collection with all mutations flattened
  • Enables resistanceAnalysisModeEnabled on 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) via wastewaterOrganismStagingConfigs.
  • Sets annotationMode: 'per-variant' on all three existing COVID collections

Screenshot

image

Test plan

  • resistanceData.spec.ts — existing per-variant tests still pass; new per-collection describe block covers flattened annotation and query-variant skipping
  • TypeScript compiles cleanly (tsc --noEmit)
  • Verify resistance tab appears on RSV-A and RSV-B wastewater dashboard pages on staging

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboards Ready Ready Preview, Comment Jun 10, 2026 8:42am

Request Review

@fhennig fhennig self-assigned this Jun 9, 2026
@fhennig fhennig marked this pull request as draft June 9, 2026 07:54
@fhennig fhennig marked this pull request as ready for review June 9, 2026 08:57
@fhennig fhennig changed the title feat(website): RSV resistance mutations in wastewater dashboard feat(website): rsv resistance mutations in wastewater dashboard Jun 9, 2026
@fhennig fhennig force-pushed the feat/rsv-resistance-mutations-dashboard branch from 2b2edbb to dd3c21e Compare June 9, 2026 17:22

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.

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' to ResistanceMutationCollectionConfig.
  • Updated buildResistanceData to emit mutation annotations differently depending on annotationMode (per-mutation vs flattened per-collection).
  • Enabled resistance analysis for RSV-A/RSV-B in wastewaterConfig.ts and 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.

Comment thread website/src/components/views/wasap/resistanceData.ts
Comment thread website/src/types/wastewaterConfig.ts Outdated
Comment thread website/src/components/views/wasap/resistanceData.spec.ts
Comment thread website/src/types/wastewaterConfig.ts Outdated
Comment thread website/src/components/views/wasap/wasapPageConfig.ts Outdated
Comment thread website/src/components/views/wasap/resistanceData.ts Outdated
fhennig and others added 7 commits June 10, 2026 10:33
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>

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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

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,
});
}
@fhennig fhennig merged commit 2755cea into main Jun 11, 2026
12 checks passed
@fhennig fhennig deleted the feat/rsv-resistance-mutations-dashboard branch June 11, 2026 07:29
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.

Configure RSV resistance mutations in the wastewater dashboard

3 participants