A two-part tutorial for the Pekosz Lab Nextstrain Influenza Builds
What is Nextstrain and how do we use it?
Nextstrain is a powerful open-source platform for building, hosting, and interacting with phylogenies. The Pekosz Lab leverages this platform to facilitate discussions surrounding emerging Influenza A and B variants during genomic surveillance each influenza season. Please refer to the extensive Nextstrain Documentation for a more comprehensive overview.
One Snakemake command turns influenza sequences from the Johns Hopkins Hospital (JHH) network into 24 segment builds (all 8 segments of H1N1, H3N2 and B/Victoria), 3 whole-genome builds, and a surveillance report.
Pekosz Lab Nextstrain Builds are hosted by the Nextstrain team at the following locations:
- A private site for internal surveillance meetings:
- https://nextstrain.org/groups/PekoszLab (contact apekosz1@jh.edu for access)
- A publicly hosted website for publications:
- All code necessary to run both this tutorial and the pipeline with “real world” data from the Mostafa Lab can be found here:
- The full documentation (setup, step-by-step guides, tutorials, best practices and data rules) lives on the project wiki:
Tutorial Resources
This tutorial runs on macOS (Apple Silicon or Intel) and on Windows through WSL2. Everything runs from one conda environment, pekosz-nextstrain, built by scripts/build_env.sh. The Nextstrain Docker runtime used in earlier versions of this tutorial is no longer supported.
The repository is public and contains no data. It processes licensed GISAID sequences and unpublished JHH sequences, which must never be committed or shared. Read Data Protection before using real data.
Tutorial Part 1 - Building your environment and running the tutorial dataset
Part 1 installs conda, clones the repository, builds and checks the pekosz-nextstrain environment, and runs the full pipeline on a small practice dataset, producing all 27 builds and the surveillance report.
Tutorial Part 2 - Adding new sequencing runs and running the production pipeline
Part 2 shows how to add a new Mostafa Lab sequencing run to the lab SharePoint, build JHH_sequences.fasta and JHH_metadata.txt with one script (scripts/prepare_source.py), prepare the GISAID vaccine.fasta, archive the previous build, run the production pipeline, and review builds before uploading them by hand. An appendix keeps the legacy manual method (cat + Excel) for reference.