Part 2: Safely preparing the three Pekosz Lab input files
2026-08-10
By the end of this tutorial, you will be able to prepare:
sequences.fasta — all JHH influenza segment sequences;metadata.txt — one tab-delimited row per sequenced strain; andvaccines.fasta — authorized vaccine/reference sequences from GISAID.For the current production workflow, place them in source/ using these names:
This tutorial covers input preparation only—not running or uploading a build.
Warning
Use only data you are authorized to access. JHH sequences that have not been released on GISAID are private. GISAID credentials and downloaded data must not be shared publicly.
JH00001, in screenshots and teaching notes.sequences.fastaRun files follow the pattern IV25Run1.fasta:
IV = influenza virus25 = yearRun1 = run number within that yearWhen Run 3 arrives, go back to the original run files and rebuild from Runs 1–3:
Use the complete, ordered list of original runs every time. Do not use >> to append a new run to an old concatenated file.
Record the run filenames in the lab build record and retain the original files.
Every record begins with > and uses:
Synthetic example:
JH00001 must match sequence_ID in the metadata. The final number is 1–8.
| Segment | Influenza A | Influenza B |
|---|---|---|
| 1 | PB2 | PB1 |
| 2 | PB1 | PB2 |
| 3–8 | PA, HA, NP, NA, MP, NS | PA, HA, NP, NA, MP, NS |
Open sequences.fasta in a plain-text editor and carefully confirm:
> and end in _1 through _8;Keep the previous known-good file until this review and the metadata review are complete. Then place the final file at:
The repository includes scripts/jhh_unique_strains.py. It removes the trailing segment number, deduplicates the strain IDs, and writes a one-column TSV headed sequence_ID.
From the repository’s top-level nextstrain/ directory, run:
The printed Final unique strains count is the expected number of metadata rows, excluding the header.
metadata.txt manually in ExcelOpen unique_sequence_IDs.tsv in Excel. Do not edit the extracted ID list until you save a working .xlsx copy in the approved location.
Add the remaining four column names so the columns appear in this exact order:
| Required column | What to enter |
|---|---|
sequence_ID |
Already supplied by the extraction script |
sample_ID |
Sample ID; often the same as sequence_ID |
sequencing_run |
Run ID, such as IV25Run3 |
date |
Sequencing run date in YYYY-MM-DD format |
passage_history |
Use vtm for original sequencing material |
The displayed spacing is illustrative; the exported file must contain tabs.
Complete the four added fields manually, one strain at a time:
sequence_ID matches the strain name without its segment suffix.sample_ID from the laboratory record.IV##Run#—for example, IV25Run3.vtm for original sequencing material.Warning
Do not fill a column by guessing from neighboring rows. Verify each value against the run sheet or approved laboratory record.
Each row represents one strain with at least one sequence in sequences.fasta— not one row per influenza segment.
Before entering dates:
date column.yyyy-mm-dd as the format.Keep sequence_ID, sample_ID, sequencing_run, and passage_history formatted as Text so Excel does not reinterpret identifiers.
Important
Displaying YYYY-MM-DD is not enough if the value was entered incorrectly. Check each date against the approved run record.
In Excel, carefully perform these manual checks:
sequence_ID cells and confirm the count matches the script’s Final unique strains count.sequence_ID; resolve every highlighted duplicate.sequencing_run follows IV##Run# and every date displays as YYYY-MM-DD.Have a second reviewer inspect the workbook when possible. Save the reviewed .xlsx file before creating the pipeline copy.
metadata.txtmetadata.txt..xlsx file as the master copy.metadata.txt in a plain-text editor.YYYY-MM-DD dates.Only after this manual review should the file become:
vaccines.fasta only through authorized GISAID accessUsing your individual GISAID account, follow the full Pekosz Lab GISAID tutorial while you:
seasonal influenza vaccine strains.Important
Do not merge clinical headers into this file. Vaccine headers use a different, seven-field format required by the vaccine ingest script.
Synthetic example:
Passage history appears twice: appended to the isolate name in field 1 and again as field 4.
Manually review every header and confirm:
Save the validated result as source/vaccines.fasta.
Before the build:
JHH_sequences.fasta was rebuilt from the complete ordered run list.JHH_metadata.tsv was manually curated and reviewed in Excel.YYYY-MM-DD.Only after every check passes should the three files replace the previous known-good inputs.