Repository navigation
Tutorial 3 Updating Vaccine Strains
Follow along! You'll download the current seasonal vaccine strains from
GISAID, reformat their headers, and save them as source/vaccine.fasta, so
vaccine strains appear as reference points in every tree. About 30 minutes
the first time; usually done by the maintainer when WHO announces new
vaccine strains.
You need your own GISAID account (credentials are individual and never shared). GISAID data may never be committed, shared publicly or given to anyone without their own GISAID access (Data Protection).
flowchart LR
A["Log in to GISAID"] --> B["Vaccine Reference<br/>Sequences"]
B --> C["Copy all segments<br/>to a workset"]
C --> D["Download FASTA"]
D --> E["Reformat every<br/>header (7 fields)"]
E --> F["Check, save as<br/>source/vaccine.fasta"]
The header reformatting in the fifth box is the step that matters most.
Go to the GISAID website and log in with your individual credentials.
Create a GISAID workset named:
seasonal influenza vaccine strains
A dedicated workset makes it easier to track which vaccine strains are
selected, download all their segments together, update vaccine.fasta in
future cycles, and avoid mixing vaccine references with clinical sequences.
Within GISAID, navigate to Vaccine Reference Sequences (seasonal influenza vaccine reference strains).
For each vaccine strain to include:
- Click the strain name or accession number.
- In the strain menu, find the Sequence section.
- Select all available segments.
- Click Copy to and add them to
seasonal influenza vaccine strains.
(Downloading segments one at a time also works, but the workset reduces the chance of missing one.) Influenza has 8 segments: select all available ones so the strain appears in every segment build.
Open the workset, confirm the expected strains and segments are there, and download the sequences in FASTA format.
Caution
This is the most important step. Every header must be changed to this exact 7-field format before the pipeline runs. Otherwise strains fail to load into fludb, get wrong metadata, or silently drop out of the builds.
Make each header look like this (spaces around | are fine):
>A/Wisconsin/67/2022-E2/E3 | EPI_ISL_XXXXXXXX | 2022-03-15 | E2/E3 | 4 | A | H1N1
ATG...TAA
That is: isolate name with passage history appended, isolate ID,
collection date, passage history again, segment number, type, lineage.
Use the real values from GISAID for each sequence (the example is
illustrative). Field-by-field rules and why passage appears twice:
Step 1: vaccine.fasta headers.
Important
Do not remove passage history from the strain name: field 1 must be
Isolate name-Passage details/history.
Before saving, check that:
- Every record has a header starting with
>. - Every header has exactly 7 fields separated by
|, in the required order. - Field 1 has isolate name + passage; field 4 has passage.
- Segment numbers, type (
AorB) and lineage (H1N1,H3N2,Victoria) are present.
A quick automatic check (prints nothing when all headers have 7 fields):
grep '^>' vaccine.fasta | awk -F'|' 'NF != 7'Save the file as source/vaccine.fasta. Replace an existing one only after
confirming the new file contains every vaccine strain and segment needed for
the current build.
ls source/vaccine.fasta
grep "^>" source/vaccine.fastaRecord the download date, workset name, the EPI_SET ID GISAID gives for the
selection, and your name in source/README.md (kept with the data, never
committed; provenance). Then run the
pipeline (Step 2). Vaccine records are loaded
by fludb/scripts/upload_vaccine.py (rule upload_vaccines in ingest.smk).
Vaccine strains now appear in your trees (look for the vaccine markers in Auspice).
-
A strain is missing from the trees. Check
.run/logs/upload_vaccines/for "Skipped record" lines: usually a header with too few fields, a bad segment number, or an unrecognised type/lineage. - Yamagata strains: they load into fludb but there is no Yamagata build.
-
Can I send my
vaccine.fastato a labmate? Only if they have their own GISAID account; better, they download their own. -
Which strains are current? The WHO recommendation for the season; the
selection dates used in trees are in
config/{subtype}/vaccine.json.
Next step → Step 2: Running the Pipeline
Pekosz Lab Seasonal Influenza Nextstrain · Repository · Builds · Never post GISAID or unpublished JHH data on this wiki (why) · Found an error? Fix it in the same PR as your code (how).
Written with support from Opus 5.5.
Start here
The pipeline, in order
- Source Data Preparation
- Running the Pipeline
- Filtering & QC
- Reports & Outputs
- Reviewing & Publishing
🧪 Tutorials
🤖 Coding with Agents
📚 Reference