feat(collection-seeder): add influenza resistance mutation collections#1316
Open
fhennig wants to merge 12 commits into
Open
feat(collection-seeder): add influenza resistance mutation collections#1316fhennig wants to merge 12 commits into
fhennig wants to merge 12 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
a72f603 to
e8b4e99
Compare
Adds four new Source classes (h1n1pdm, h3n2, h5n1, victoria) that fetch antiviral resistance mutation data from the BU-ISCIII flu_resistance repo and produce one Collection per antiviral per organism. NA inhibitors (Oseltamivir, Zanamivir, Peramivir, Laninamivir) are sourced from NA-inhibitors.json with NI/RI/HRI classification. Baloxavir is sourced from PA-inhibitors.json with fold-change values. NI-only and unknown (?, ?e) entries are excluded. Open questions about strain mapping, fold-change thresholds, LAPIS gene name conventions, and additional data files are documented in QUESTIONS.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Baloxavir variants now named by mutation (e.g. 'PA:I38T') with fold-change surfaced in the new variant description field - Add description field to Variant TypedDict (NotRequired[str]) - Remove QUESTIONS.md (all questions resolved) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Some entries in NA-inhibitors.json have leading spaces (e.g. " S227N"), which produced invalid strings like "NA: S227N" in aminoAcidMutations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ction descriptions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
56fbe3f to
c79db62
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new collection-seeding source that pulls influenza antiviral resistance mutations from the BU-ISCIII flu_resistance repository and generates seeded collections for the influenza dashboards (H1N1pdm, H3N2, H5N1, and B/Victoria), resolving #1272.
Changes:
- Introduces
influenza_resistance_mutationsseeding sources that fetch NA- and PA-inhibitor mutation datasets and build collections/variants per subtype. - Registers the new influenza sources in the seeder source registry so they run in the default seed flow.
- Extends the shared
Varianttyped model to allow an optionaldescription, and adds a dedicated test suite for the influenza sources and parsing.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| collection-seeding/sources/influenza_resistance_mutations.py | New influenza resistance mutation sources and JSON fetching/parsing to produce collections. |
| collection-seeding/sources/registry.py | Registers the new influenza sources in ALL_SOURCES. |
| collection-seeding/models.py | Makes Variant.description optional via NotRequired. |
| collection-seeding/tests/test_influenza_resistance_mutations.py | Adds unit tests for parsing and for collection/variant generation across influenza subtypes. |
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 #1272
Summary
Adds resistance mutations for all influenza viruses.
Screenshot
Screen.Recording.2026-07-14.at.15.10.05.mov
PR Checklist