This guide teaches you to run every tool in the suite from start to finish, using real, public sequencing data that you can copy and paste straight into each tool. No prior command-line experience is assumed β everything happens in the web dashboard.
Work through it top to bottom the first time. After that, each module stands on its own, so you can jump to the tool you need.
π Slides: vSNP3 β the whole process covers Modules 4β5 at a glance. For hands-on practice in the vSNP3 GUI, vSNP3 GUI training: find where two outbreaks came from is a step-by-step guide (an SOP), from the first install to reading the tree.
What you will learn
| Module | Tool | You will⦠| Data used |
|---|---|---|---|
| 1 | IRMA | Assemble influenza genomes from raw reads and read the QC report | Influenza A reads |
| 2 | GenoFLU | Genotype an assembled H5 influenza genome (clade 2.3.4.4b) | IRMA output from Module 1 |
| 3 | Kraken ID-Parse | See what is really in a sample, then extract one taxon's reads | TB reads, clean and contaminated |
| 4 | vSNP3 (intro) | Learn the two-step SNP workflow on M. tuberculosis/M. bovis | TB reads |
| 5 | vSNP3 (phylogeny) | Build a SNP tree across the whole M. tuberculosis complex | MTBC lineage panel |
| 6 | AMRFinderPlus | Find antimicrobial-resistance genes in a bacterial isolate | Pasteurella, E. coli reads |
| 7 | MLST | Assign a sequence type (ST) to an isolate | Pasteurella reads |
| 8 | kSNP | Build a reference-free SNP tree from finished genomes | MTBC genome accessions |
β± Time: Modules 1, 3, 6, 7, 8 take ~10β30 min each β plus another hour if you run Module 3's optional BLAST part. vSNP3 (Modules 4β5) takes longer because it aligns every read β budget an hour, most of it unattended while the job runs.
Part A β Before you begin (read once)
A.1 Open the dashboard
Everything starts from the dashboard β a home page listing your installed tools.
- Desktop launcher (if one was made for you): double-click
Kapur Lab Dashboard β on your Desktop (macOS) or in your applications menu
(Linux/WSL). No terminal window appears; your browser just opens. If you don't
have it yet, run
bin/bdtools make-launcheronce, or - macOS: double-click
Open Dashboard.commandin thebioinformatic_diagnostic_toolsfolder, or - Any system (Terminal):
cd <path to repo>/bioinformatic_diagnostic_tools bin/bdtools dashboard
Your browser opens to http://127.0.0.1:8080/. Each tool is a card β click Launch and the tool opens in a new tab. Leave the small dashboard window open while you work.
On an Open OnDemand cluster there is no local dashboard β your tools appear as cards in your institution's OOD portal instead. The in-tool steps below are identical.
A.2 Three tools need reference databases first
Most tools are ready to go. Three need a one-time database download:
| Tool | Needs | Set up with |
|---|---|---|
| Kraken ID-Parse (Module 3) | Kraken2 DB (required) | bin/bdtools setup-databases kraken |
| Kraken ID-Parse (Module 3) | BLAST DB (only for the full BLAST mode β optional) | bin/bdtools setup-databases blast |
| vSNP3 (Modules 4β5) | vSNP3 reference set | bin/bdtools setup-databases vsnp-refs vsnp-deps |
| AMRFinderPlus (Module 6) | AMRFinderPlus database (required β the conda package ships the program only) | bin/bdtools setup-databases amrfinder |
| AMRFinderPlus (Module 6) | Kraken2 DB (only for automatic organism detection β optional) | bin/bdtools setup-databases kraken |
Run those before the relevant module. The Kraken2 DB is shared: set it up once
and both Kraken ID-Parse and AMRFinderPlus use it. If you skip it, AMRFinderPlus
still works β you just pick the organism by hand β but Kraken ID-Parse cannot run
at all without it. The AMRFinderPlus database is not optional either: without
it the run finishes, writes a report, and contains no AMR calls (amrfinder
exits 1 with No valid AMRFinder database is found). If a tool card shows a
"needs setup" badge, that's what it's telling you, and bin/bdtools doctor amr_plus_gui names which database is missing.
Check anything at any time with
bin/bdtools doctorβ it lists each tool, what it needs, and the exact command to fix a gap.
A.3 How every tool works β the shared layout
All the tools share the same screen layout. Learn it once here and every module will feel familiar. From top to bottom you'll see:
- Settings (collapsible) β database paths and where your projects are saved. Defaults are fine; you rarely touch this.
- Projects & Samples β on the left, create and open a project (a named folder that holds your data and results). Expand a project to see its samples, each with a checkbox.
- Inputs β on the right, this is how you get data into a project.
Every tool offers the same four ways:
- Choose Files / drag-and-drop β upload files from your computer.
- Link β point at a folder already on the server (no copying).
- SRA Download β paste accession numbers (SRR/ERR/DRR) and the tool downloads the reads for you. β the reads-based tools use this. When it finishes, a per-sample status list shows which accessions downloaded and which failed, so a partial batch is obvious.
- Download genome FASTA by accession (kSNP, MLST, GenoFLU) β paste
GenBank/RefSeq genome accessions (e.g.
NC_000962) or assembly accessions (GCA_/GCF_); the tool fetches assembled FASTA. GenoFLU also accepts a BioSample (e.g.SAMN60641678) and pulls that isolate's 8 influenza segments as one genome. (GenoFLU uses this instead of an SRA read download, since it genotypes assembled genomes.)
- Run β¦ β pick your options and click βΆ Run selected (N), where N is the number of samples you checked.
- Pipeline Log (collapsible) β live output while the job runs. It ends with
[DONE]. - Results β tables, trees, reports, and download links appear here when the run finishes. Click a sample to load its results.
The universal recipe β every module below is a variation of these five steps:
β Create a project β β‘ paste accessions into SRA Download β β’ check the samples β β£ Run selected β β€ read the Results.
A.4 A note on the data in this guide
Every accession below is a public record from NCBI's Sequence Read Archive (SRA) or GenBank. The tools download them for you β you never handle files by hand. The very first download of a sample can take a few minutes depending on its size and your connection; downloads are cached, so re-running is instant.
How the data tables work. Each dataset is shown as a two-column,
tab-delimited table β an Accession column and a label. Two ways to use it:
- Into Excel: select the whole block (including the header row) and paste it into a worksheet β the tab between the columns drops each value into its own cell, so you get a tidy accession + label spreadsheet.
- Into a tool: paste just the
Accessioncolumn into the tool's SRA Download box (or, for kSNP, its accession box). The label column is only there for your reference β leave it out when loading a tool.
Module 1 β IRMA: assemble an influenza genome
What it does. IRMA (the CDC's Iterative Refinement Meta-Assembler) takes raw influenza sequencing reads and reconstructs the eight genome segments, reports per-segment coverage and quality, predicts the subtype (e.g. H5N1), and can build submission-ready FASTA headers.
Input. Raw reads (FASTQ) β exactly what SRA gives you.
The data
Accession Organism
SRR36749644 Influenza A virus
SRR36749648 Influenza A virus
SRR36749650 Influenza A virus
SRR36749472 Influenza A virus
SRR37580742 Influenza A virus
Influenza A virus (IAV) whole-genome sequencing runs. We'll use the same set for GenoFLU in Module 2.
Steps
-
On the dashboard, Launch IRMA.
-
In Projects & Samples (left), type a project name β e.g.
IAV_trainingβ and click Create. -
In Inputs (right), make sure
IAV_trainingis selected in the dropdown. -
Find the SRA Download box, paste the five accessions above (one per line), and click Download. Watch the Pipeline Log β each run appears in the project when it finishes downloading.
-
(Optional) Open Sample Metadata to build submission-ready FASTA headers. Every field is optional and each shows an example: host (e.g.
chicken), state (California), collection_year (2023), subtype (H5N1). The tool builds each defline asA/host/state/sample/year(subtype); anything you leave blank becomesunknown_host,unknown_subtype, etc. (Note the field is subtype β e.g.H5N1β not "strain";H5N1is a subtype.) The result is an NCBI-submission-style header per segment, for example:>Seq1 [organism=Influenza A virus](A/chicken/California/24-000127-003-original/2023(H5N1)) segment 1, polymerase PB2 (PB2) gene, complete cds. >Seq4 [organism=Influenza A virus](A/chicken/California/24-000127-003-original/2023(H5N1)) segment 4, hemagglutinin (HA) gene, complete cds.This is only needed if you plan to submit sequences to NCBI; skip it for training.
-
In Projects & Samples, expand the project and check the box next to each sample you want to run β or use the project's Select all checkbox to check every sample at once.
-
In the Run IRMA section:
- IRMA module: leave on
FLU(it'sCoVfor SARS-CoV-2). - Run GenoFLU genotyping: β tick this on. IRMA will assemble and genotype in one pass β a preview of Module 2.
- IRMA module: leave on
-
Click βΆ Run selected (5). Assembly takes several minutes per sample; they run one after another.
-
When the log shows
[DONE], click a sample name to open its Results.
How to read the output
- Subtype banner β e.g.
H5N1. This is IRMA's call from the HA and NA segments. - Per-segment table β one row per influenza segment (PB2, PB1, PA, HA, NP, NA,
M, NS). The columns that matter:
- Coverage % β how much of the segment was reconstructed. You want this high (near 100%).
- Read depth β average reads stacked at each position. Higher = more confident. Thin coverage (low depth) means a shaky consensus.
- Verdict β PASS (assembled well), REVIEW (present but unusual), or FAIL (missing/too low). A complete influenza genome is 8/8 segments PASS.
- Report (PDF) β a shareable lab report: QC of the input reads, the per-segment table, and β appended at the end β a per-segment coverage plot for every segment (all 8 IRMA coverage reports rolled into the one PDF).
- Result files β the Results list labels each file so you know what you're opening: IRMA assembly & QC statistics (Excel workbook) vs. the two GenoFLU genotype files, which are now distinguished as Excel workbook and tab-delimited text.
- Submission FASTA β the consensus sequences, one per segment.
- GenoFLU genotype (because you ticked it on) β the clade/genotype call; we interpret this in the next module.
π‘ Seeing what ran. After a run, the Current run pane (right) lists the samples that ran with a search box and a date filter (Today / Last 7d / Last 30d). Click a sample there to open its results β you don't have to go back to Projects to find them.
π Teaching point. If a sample has, say, 7/8 segments PASS and NA at 60% coverage, that's a partial genome β usable for subtyping but not for a confident whole-genome genotype. The verdict column tells you at a glance.
Module 2 β GenoFLU: genotype an H5 influenza genome
What it does. GenoFLU (USDA) assigns a genotype to a North-American H5
influenza genome β it BLASTs each of the eight segments against curated
references and reports the clade/subclade (e.g. 2.3.4.4b) plus a per-segment
lineage breakdown. It's how you tell whether a genome is the "cattle" H5N1
genotype B3.13 vs. another constellation.
Input. An assembled genome (FASTA) β not raw reads. GenoFLU genotypes; it does not assemble. So you must assemble first (Module 1).
Two ways to run it
The easy way (already done): you ticked Run GenoFLU genotyping in Module 1, so IRMA already produced a genotype for each sample. Open a sample's IRMA Results and read the GenoFLU genotype section. For most work, this is all you need.
The standalone way (this module): run the dedicated GenoFLU tool on the FASTA that IRMA produced. This is the pattern you'd use for genomes assembled elsewhere.
Steps
- Launch GenoFLU from the dashboard.
- Open the same project you assembled in Module 1 (e.g.
IAV_training), or create a new one. GenoFLU now lists the genomes IRMA assembled in that project automatically β each sample's submission/assembly FASTA appears as a ready-to-run sample (no copying or uploading needed). - Need a genome that wasn't assembled here? Use Download genome FASTA by
accession (GenoFLU's Inputs pane β this replaces the old SRA read download,
since GenoFLU genotypes assembled genomes):
- paste GenBank/RefSeq nucleotide accessions or a
GCA_/GCF_assembly, or - paste a BioSample (e.g.
SAMN60641678) or sample name β GenoFLU pulls that isolate's 8 influenza segments and saves them as one multi-FASTA genome ready to genotype. You can also still Choose Files / Link an assembly from elsewhere.
- paste GenBank/RefSeq nucleotide accessions or a
- Leave Percent-identity threshold at its default (98%, the USDA surveillance standard).
- Check the sample and click βΆ Run selected (1).
- Open Results.
How to read the output
- Genotype banner β the headline call, e.g.
B3.13or a clade like2.3.4.4b. A green badge means all 8 segments were confidently assigned; amber means the genome was incomplete, so the call is provisional. - Per-segment table β for each segment: the assigned lineage, the % identity to the best reference, and mismatches. Reading down this column tells you if the genome is a "clean" constellation or a reassortant (segments from different lineages).
- Report (PDF) β the same information in a lab-report format.
π Teaching point. The genotype is the combination of all eight segment lineages. That's why an incomplete assembly (amber badge) can't be given a firm genotype β a missing segment could change the constellation. Always check the IRMA verdict (8/8 PASS) before trusting a genotype.
Module 3 β Kraken ID-Parse: what is actually in this sample?
What it does. Kraken2 labels every read with a taxon by matching its k-mers against a database of known genomes. This tool wraps that in the three jobs a diagnostic lab actually has:
- Identify β classify the reads and draw an interactive Krona chart of everything found. It answers "what is in this tube?" without you having to assume the answer first.
- Parse β extract only the reads belonging to a target taxon (and
everything below it in the taxonomy) and leave them as clean
FASTQ.gz. That is a decontaminated sample you can re-run through vSNP3, IRMA, or anything else in the suite. - Identify by BLAST β assemble those parsed reads, BLAST the contigs for a species-level call, and build coverage charts against the best-matching reference genomes.
Input. Paired FASTQ reads β upload, Link, or SRA Download, exactly as in Part A.3. (This tool's SRA box also accepts SRX / SRS / PRJNA accessions and expands them to their runs.)
Why it comes before vSNP3. Every reference-based tool assumes it already knows what the organism is. When mapping is poor, or a submitter's label looks wrong, this is the tool that tells you what you actually sequenced β and hands back cleaned reads so the run can go ahead. Module 4 uses it exactly that way.
Before you begin β databases
| Mode you want to run | Needs | Set up with |
|---|---|---|
| Kraken + Krona only, and Kraken + parse | Kraken2 database (required) | bin/bdtools setup-databases kraken |
| Kraken + parse + BLAST | also a BLAST database | bin/bdtools setup-databases blast |
setup-databases kraken downloads k2_standard_08gb (~8 GB) and points the
tool at it for you. setup-databases blast stages NCBI's
ref_prok_rep_genomes (representative prokaryote genomes, tens of GB) β
only needed for the full BLAST mode, so skip it for now if you're just screening.
Check either at any time with bin/bdtools doctor kraken_id_parse_gui.
Choosing and adding a Kraken2 database
Kraken can only report what is in its database. Anything not represented comes back as unclassified β or, worse, as the nearest relative that is in there. So the database is a scientific choice, not an install detail. Prebuilt indexes are published at https://benlangmead.github.io/aws-indexes/k2 (that page lists each index's current size and build date):
| Index family | Contains | Pick it when⦠|
|---|---|---|
| Viral | viruses only (< 1 GB) | you only care about viral content and want it fast |
| Standard-8 / Standard-16 (the suite's default is Standard-8) | the Standard content, capped to fit 8 or 16 GB | you're on a laptop or a modest VM |
| Standard | archaea, bacteria, viral, plasmid, human, UniVec_Core (tens of GB) | you have the RAM and want the uncapped index |
| PlusPF / PlusPFP | Standard + protozoa + fungi (PFP adds plants) | your targets include protozoa or fungi β e.g. the Apicomplexa taxon in the dropdown |
| core_nt | very broad nucleotide collection (hundreds of GB) | a server-class machine, and you need maximum breadth |
π§ RAM is the real constraint. Kraken2 loads its index into memory, so plan on needing about as much RAM as the index is big. That is why the capped Standard-8 build is the suite's default β it runs on a laptop.
β οΈ Two consequences worth knowing before you read your first chart. (1) The Standard family has no protozoa and no fungi β a Theileria or Aspergillus sample screened against Standard-8 looks mostly unclassified. Use PlusPF for those. (2) It contains human but no livestock genomes, so bovine host reads mostly land in "unclassified" rather than being named. A large unclassified fraction in a veterinary sample is usually host DNA, not a failed run.
To add another index, download and unpack it (its folder must contain
hash.k2d, opts.k2d and taxo.k2d β Kraken2 reads all three), then either:
- in the GUI β Settings β Kraken2 databases, paste the folder path (or Browseβ¦), click + Add, then Use this database and Save & Refresh; or
- from the umbrella repo β
python3 bin/lib/db_config.py kraken --kraken-db /path/to/kraken2/k2_pluspf
Saved databases then appear in the Kraken2 DB path dropdown in the run panel, so switching index for a single run is one click β and the vSNP GUI reads the same list when it launches a Kraken run.
The three run modes β the concept to learn here
You pick one Run mode card before every run. They are cumulative: each does everything the one above it does, and more.
| Run mode | Needs | Leaves you with | Roughly |
|---|---|---|---|
| Kraken + Krona only | Kraken2 DB | Krona chart + the top-taxon verdict. No target taxon needed. | a few min/sample |
| Kraken + parse reads | + a target taxon | the target's reads as FASTQ.gz, a statistics workbook and a run report |
a few min more |
| Kraken + parse + BLAST | + a BLAST DB | assembly, a BLAST species call, coverage charts, the full report | budget most of an hour |
The data
Accession Why this one
SRR28623786 M. tuberculosis complex isolate β the sample the suite validates this tool against
SRR1173725 One of the poor-mapping TB samples from Module 4 β here you see what else is in it
Two samples of the same declared organism: one clean, one that vSNP3 struggles with. Reading them side by side is the whole point of this module.
Part 1 β Identify: what is in the tube?
- (First-time only)
bin/bdtools setup-databases kraken. - Launch Kraken ID-Parse from the dashboard β its card reads Kraken ID
/ Parse. Create a project β e.g.
kraken_training. (Projects are shared with vSNP3, so this one will be visible there too.) - Inputs β SRA Download β paste both accessions β Download.
- Expand the project and check both samples.
- In Configure & Run, choose the Kraken + Krona only mode card. Leave Target Taxon alone β this mode doesn't use it.
- Confirm Kraken2 DB path is filled in (it is, if
setup-databasesran). - Click βΆ Run selected (2).
How to read the identification
The Results table gives you the verdict per sample:
| Column | What it tells you |
|---|---|
| Top taxon / % | The highest-scoring species-rank row of the Kraken report, and its share of reads. |
| Runner-up | The second species, with its share β this is your contamination column. |
| Status | pass / review / fail, with the reason behind the chip. |
| Open | π Krona β the interactive chart. (π Report appears for the parse and BLAST modes; a Kraken-only run stops at the chart.) |
| Files | Expands to the run's output files β everything lands in <project>/kraken/<sample>/. |
Open the π Krona chart. It is a zoomable ring: the centre holds all the reads, and each ring outwards is one rank deeper (domain β phylum β β¦ β species). Click a wedge to zoom into it; click the centre, or the lineage breadcrumb at the top, to come back out. Wedge size is the read proportion β a contaminant is a wedge that has no business being there.
What you should see:
SRR28623786β one dominant Mycobacterium wedge (~96% of reads). A clean isolate looks like this: one big wedge, a thin rim of noise.SRR1173725β a busier chart: the target is there, but it shares the space. What else shows up is the likely reason vSNP3 maps this one poorly, and the Runner-up column names the biggest of them.
π Teaching point β read the complex, not the species. For MTBC the species row is misleading: M. tuberculosis, M. bovis, M. orygis and the rest are near-identical, so Kraken splits reads across all of them and no single species looks dominant. The suite's own validation asserts the genus (~96% Mycobacterium) for exactly this reason. Zoom out one ring in Krona and judge at the complex/genus level; use vSNP3 or MLST when you need the member.
π‘ Unclassified is information too. A high unclassified fraction is normal for veterinary samples (no livestock genomes in the Standard index) and for targets your index doesn't cover β see the database table above. It is not, by itself, a failed run.
Part 2 β Parse: extract the target's reads
Now clean up SRR1173725 so vSNP3 can use it.
- Same project. Uncheck
SRR28623786and leaveSRR1173725checked, then choose the Kraken + parse reads mode card. - In Target Taxon, select
Mycobacterium tuberculosis complex. The dropdown is a shared list β if the taxon you need isn't there, type it into Add a new taxon to the listβ¦ and click + Add. It must match the name Kraken reports exactly; new entries are saved to this install'sconfig/taxa.yamland show up in the vSNP GUI too. - Click βΆ Run selected (1).
What you get, in <project>/kraken/<sample>/:
<sample>_<taxon>_R1.fastq.gz/_R2.fastq.gzβ the parsed reads: the target taxon and its children, everything else dropped. These are the deliverable of this mode.- Run statistics workbook (
*_stats.xlsx) and Report HTML/PDF β input read QC (read counts, % passing Q30, mean quality, average length), the taxon and Taxon ID, total input reads, extracted reads and the extraction rate (%), plus the classification summary. - Bracken results workbook β abundance re-estimation. Linux and OOD only: Bracken has no macOS build, so on a Mac the run prints a warning, skips it, and carries on.
The number to look at is the extraction rate β what fraction of the input reads belonged to your target. A sample that is only partly target comes back as a smaller but much cleaner FASTQ pair, which is exactly why its mapping improves on the re-run.
β οΈ If the taxon isn't found, the run stops cleanly and says so: the workbook records
Extracted Reads: No Reads Foundand the sample is flagged in Results. Nine times out of ten the name doesn't match what Kraken reports β check the spelling against the Krona chart.
Hand the parsed reads to vSNP3. Both tools see the same project folder, so in the vSNP GUI you can Import β Step 1 the parsed reads and re-run alignment on them. Module 4 does this from the other direction β launching this same parse from a vSNP3 Step 1 Results row, without leaving vSNP.
Part 3 β Identify by BLAST (optional; needs the BLAST database)
Use this when the read-level call is not enough β an unknown isolate, or a species-level answer you want to see evidence for.
- (First-time only)
bin/bdtools setup-databases blast. - Check
SRR28623786, choose the Kraken + parse + BLAST mode card, keep the target taxon, and confirm BLAST DB path points atβ¦/blast/ref_prok_rep_genomes. - Click βΆ Run selected (1) and expect it to take a while β it assembles, BLASTs, downloads the top reference sequences, and aligns your reads back to them.
Extra outputs in the Files cell:
| File | What it is |
|---|---|
| BLAST summary | Top hits for each contig β accession, % identity, bit score, organism. The species call and its evidence. |
| De novo assembly FASTA | The contigs assembled from the parsed reads. |
| Reference-guided FASTA | The consensus built by mapping the original reads back to the best-matching reference. |
| Coverage & Variants (interactive) | Coverage across each reference with variants marked β open this one first. |
| Coverage graph PDF | The same coverage, print-ready for a report. |
| Report HTML / PDF | Everything above in one document: read QC, extraction, assembly stats (contigs, longest contig, N50, mean coverage), the BLAST table and the coverage figures. |
How to judge it: a confident identification is a high-identity BLAST hit covered evenly across the reference. Patchy coverage with a high identity usually means only part of the organism is present (or too few reads); even coverage at mediocre identity means the true organism isn't in the database and you're seeing its nearest relative.
β οΈ Match the BLAST database to the target.
ref_prok_rep_genomesholds prokaryotes β it can identify the MTBC sample above, but it cannot identify a virus. For viral targets stage a database that contains them (e.g.core_nt) and select it in BLAST DB path. The pipeline also carries taxon-specific logic for some targets β an Orbivirus run, for example, goes on to separate bluetongue virus from epizootic hemorrhagic disease virus and orders the coverage by segment.
π Teaching point β three tools, three kinds of answer. Kraken answers "what is in here?" from reads, in minutes, across everything in its database. BLAST answers "which species, and how good is the match?" from an assembly. vSNP3 and kSNP answer "how are these isolates related?" β but only once you already know what they are. Screening first is what keeps the later answer honest.
Module 4 β vSNP3: the two-step SNP workflow (introduction)
π₯ Slides first? vSNP3 β the whole process is a twelve-slide walkthrough of everything in Modules 4 and 5: what the two steps do, how the reference-type database is organised, how defining SNPs split large sets into groups, and how a SNP call is validated in the reads. The link opens the slides in your browser. Hover the underlined phrases to see the matching bdtools screen, and use Print / PDF if you want a paper copy.
π§ Then practise in the GUI. vSNP3 GUI training: find where two outbreaks came from is a step-by-step guide (an SOP) for the vSNP3 GUI, written in short, plain sentences. It starts with the first install (macOS, Linux or Windows: a switch picks your computer), then shows how to start the tools again later, then runs 26 public M. bovis samples through Step 1 and Step 2. Every step shows what to click and what you should see, and the SRA numbers and sample names have Copy buttons. The places and outbreaks in it are made up for training. The link opens it in your browser.
What it does. vSNP3 (USDA) is the suite's high-resolution SNP tool for bacteria and viruses. It answers "how closely related are these isolates?" β the application is for outbreak surveillance. This example will use TB as the practice organism.
The two-step model β the single most important concept:
- Step 1 β one sample at a time. Align a sample's reads to a reference genome and call its variants, producing a per-sample VCF file. Do this once per sample.
- Step 2 β compare many samples. Collect the Step 1 VCFs with zero coverage
(
zc.vcf), build a SNP table (who differs from whom, and where) and a phylogenetic tree. Using defining SNPs, samples are arranged into meaningful small groups to speed analysis time and provide detailed focus to the relevant samples.
The power of this split: you run Step 1 once, then re-run Step 2 as often as you like β adding samples, changing thresholds β without repeating the major computation workload of alignment and SNP calling.
The data
Accession Organism
SRR12882448 M. tuberculosis complex
SRR1173725 M. tuberculosis complex
SRR998630 M. tuberculosis complex
SRR7236232 M. tuberculosis complex
SRR6797355 M. tuberculosis complex
SRR10251192 M. tuberculosis complex
SRR10251191 M. tuberculosis complex
SRR10251185 M. tuberculosis complex
SRR10251193 M. tuberculosis complex
A small TB / M. bovis complex set β enough to learn Step 1 β QC β Step 2.
Step 1 β align and call variants
- First-time only: set up the reference databases (Part A.2):
bin/bdtools setup-databases vsnp-refs vsnp-deps - Launch vSNP3. Click Preflight in Settings β it must go green before the Run buttons enable.
- Create a project β e.g.
TB_intro. - In Inputs β SRA Download, paste the nine accessions above and click Download.
- In the Step 1 section, click Setup (this organizes the downloaded reads into one folder per sample).
- Choose a reference if one isn't already selected. The two built-in TB
references are
Mycobacterium_H37(M. tuberculosis) andMycobacterium_AF2122(M. bovis). - Click βΆ Run. Step 1 processes a few samples in parallel; use Stop to halt if needed. This is the slow part β reads are being aligned.
Review quality before you go on
Open QC Summary / Step 1 Results. This is a mandatory checkpoint. Key columns:
| Metric | Healthy | Worry when⦠| Why it matters |
|---|---|---|---|
| Avg Depth of Coverage | β₯ 40Γ | < 20Γ | Low depth = unreliable SNP calls. |
| % Reference with Zero Coverage | < 5% | > 10% | High = wrong reference or poor library. |
| R1/R2 % passing Q20 | > 50% | very low | Poor-quality sequencing run. |
| Quality SNPs | organism-typical | unusually high | A spike often means the wrong reference or contamination. |
Tick the Exclude box for any sample that fails, then click Save Exclusions β Step 2 will automatically leave those samples out.
Low mapping? Decontaminate with Kraken, then re-run Step 1
In this dataset SRR1173725 and SRR998630 map poorly to the reference.
Low mapping usually means contaminated reads β host DNA or other bacteria
mixed in with the target. Rather than discard the samples, clean them and try
again. This is Module 3's
parse step, launched from inside vSNP so you never leave Step 1 β run it there
first if you want to see what the contamination is before removing it:
- From the Step 1 Results row for a low-mapping sample, run Kraken on it. Choose Parse reads only (skip BLAST) and select the target taxon Mycobacterium tuberculosis complex β this keeps only the reads that classify to the complex and drops the contaminating ones.
- When the parse finishes, Import β Step 1 the parsed reads so they appear as a sample in this project's download set.
- With the parsed samples added, click Setup, then βΆ Run. Only the newly-added (parsed) samples are aligned β samples already marked Complete are skipped, so this is quick. (Use Force re-run only if you deliberately want to re-align everything.)
- Re-check the QC for the parsed samples β mapping should now be much higher.
Step 2 β build the SNP table and tree
- Go to the Step 2 section and choose Use Step 1 only (compare the samples you just processed).
- Click Setup. vSNP3 links your Step 1 VCFs and confirms they all used the same reference (it refuses to mix references β that's correct behavior).
- Click βΆ Run.
- When done, expand the timestamped run under Results.
How to read the output
β¦_sort_table.xlsx(the cascading SNP table) β the go-to SNP table. Rows are SNP positions, columns are samples, and each cell shows the base that sample carries. It's called cascading because the positions and samples are ordered so shared SNPs line up into a staircase β samples that carry the same block of SNPs sit together, making related groups easy to read off at a glance. Samples that share the same pattern of SNPs are closely related. This is the table you'd put in a report.
π± Try it. Open the cascading table and find the
La3_orygisgroup, then click one of its SNP cells β the viewer shows the read alignment at that position, so you can confirm the call directly in the reads.
β¦_tree.tre(phylogenetic tree) β open it in a tree viewer (FigTree, or the built-in viewer). Branch length β number of SNPs. Isolates on a tight cluster (a handful of SNPs apart) are plausibly linked; isolates far apart are not.step2_summary.htmlβ an interactive summary tying it together.- IUPAC codes in the table β a pure base (
A/C/G/T) is a clean call. A letter likeR,Y,M,K,S,Wmeans a mixed position (two bases at once) β a red flag for contamination or co-infection. A-means no coverage there.
π Teaching point. "How many SNPs apart is a real outbreak link?" depends on the organism, but for TB, isolates within ~5β12 SNPs are often considered potentially linked. The tree and the SNP table are two views of the same answer β always look at both.
Module 5 β vSNP3: a whole-complex phylogeny
Now scale up. This module builds a tree spanning the entire M. tuberculosis complex β every human lineage plus the animal-adapted members (M. bovis, M. caprae, M. orygis, M. microti, and more). It's the same Step 1 β Step 2 workflow as Module 4, just with a broader, labeled panel so you can see the lineage structure in the tree.
The data β MTBC representation panel
Paste any subset (or all) of these into SRA Download. Each is labeled with the lineage/species it represents, so you can confirm the tree groups them correctly.
Accession Lineage / species
ERR212113 Lineage 1
ERR270648 Lineage 1
ERR2704680 Lineage 1
SRR671797 Lineage 2
ERR2704702 Lineage 2
ERR234100 Lineage 2
ERR553373 Lineage 2
ERR221591 Lineage 3
SRR6797316 Lineage 3
SRR6964550 Lineage 3
ERR2704693 Lineage 3
ERR234198 Lineage 4
ERR270639 Lineage 4
SRR671750 Lineage 4
ERR2704709 Lineage 4
ERR234113 Lineage 5
ERR234680 Lineage 5
ERR2704812 Lineage 5
ERR2704686 Lineage 5
ERR234186 Lineage 6
ERR2383628 Lineage 6
ERR270805 Lineage 6
ERR2704681 Lineage 6
ERR1200604 Lineage 7
ERR181435 Lineage 7
ERR756345 Lineage 7
ERR2704711 Lineage 7
SRR10828835 Lineage 8
SRR1173725 Lineage 8
ERR181314 Lineage 9
ERR181315 Lineage 9
ERR4192384 Lineage 9
ERR2516384 Lineage 10
ERR2707158 Lineage 10
ERR212091 M. bovis
SRR5216728 M. bovis
SRR7983754 M. bovis
SRR1791695 M. bovis
ERR10430697 M. caprae
ERR10430698 M. caprae
ERR1462610 M. caprae
SRR7617662 M. caprae
ERR027295 M. microti
ERR553376 M. microti
ERR027297 M. microti
SRR3647357 M. microti
SRR3500411 M. mungi
ERR015582 M. orygis
ERR234682 M. orygis
SRR6797355 M. orygis
SRR5642711 M. orygis
SRR1239336 M. pinnipedii
SRR1239339 M. pinnipedii
SRR7693584 M. pinnipedii
ERR970409 M. suricattae
ERR970410 M. suricattae
ERR970412 M. suricattae
ERR266120 M. canettii
π‘ Start small. This is a large panel β dozens of genomes, each aligned individually in Step 1, which is time-consuming. For a first pass, pick ~2 samples per lineage (say 12β16 total). Add the rest later and just re-run Step 2 β no re-alignment needed. That's the payoff of the two-step design.
Steps
Identical to Module 4:
- New project β e.g.
MTBC_phylogeny. - SRA Download β paste your chosen accessions β Download.
- Step 1: Setup β choose a single common reference (e.g.
Mycobacterium_H37) so the whole panel aligns to the same coordinates and Step 2 can compare them all in one tree β Run. - QC Summary: review, exclude any failures, Save Exclusions.
- Step 2: Use Step 1 only β Setup β Run.
π· Label the tree with a metadata file. The tree tips default to the accession. To show readable names (lineage/species), take the sample list for your panel and build a small metadata Excel with two columns β
Original name(the VCF file-stem) andDisplay label(e.g.L2_Beijing,M_orygis_ERR015582). Add it in the Sample Metadata pane; Step 2 renames the tips to your labels. (This is also how you'd re-label an outbreak set for a report.)
How to read the output
Open the tree (β¦_tree.tre). Because you know each sample's true lineage from
the labels above, this is a self-checking exercise:
- Samples of the same lineage should form clusters (clades) together.
- Look at how the lineages that are historically regarded as human-adapted vs. animal-adapted fall out on the tree. The human lineages (Lineages 1β4, 7, β¦) and the animal-associated species (M. bovis, M. caprae, M. orygis, M. microti, M. pinnipedii, β¦) each tend to group among their own kind β a useful sanity check that the panel resolved as expected.
- If a sample lands in the "wrong" clade, it's usually a QC problem (low coverage, wrong reference) you can trace back in the Step 1 stats.
The cascading SNP table shows the shared-SNP patterns that define each lineage β the columns of SNPs that all Lineage-2 samples share, for instance.
π These tables get big. A whole-complex SNP table has thousands of positions across dozens of samples β far too large to read cell-by-cell. That's exactly why we use defining SNPs to collapse the panel into smaller, more meaningful outbreak groups: instead of the full matrix, you work with the handful of SNPs that define a cluster, which is what makes a report legible.
Module 6 β AMRFinderPlus: antimicrobial-resistance genes
What it does. AMRFinderPlus (NCBI) scans a bacterial genome for acquired resistance genes and resistance-conferring point mutations. The GUI adds two conveniences: it assembles raw reads for you (so you can start from SRA), and it detects the organism (via Kraken2) so it can screen for the right species-specific mutations.
Input. Raw reads (FASTQ) or an assembled genome (FASTA). We'll start from reads.
The data
Two isolates β put both in one project, or one each. The Pasteurella isolate is reused for MLST in Module 7.
Accession Organism
SRR28320745 Pasteurella multocida
SRR39605045 Escherichia coli
Steps
- (Required, first-time) install the AMRFinderPlus database:
bin/bdtools setup-databases amrfinder. Nothing is detected without it β the run still writes a report, it just has no AMR calls in it. (Recommended) also set up the Kraken2 DB for automatic organism detection:bin/bdtools setup-databases kraken. Without that one you just pick the organism manually β that's fine. - Launch AMRFinderPlus. Create a project β e.g.
AMR_training. - Inputs β SRA Download β paste
SRR28320745(and/orSRR39605045) β Download. When it finishes, a per-sample status list shows which accessions downloaded (β) and which failed (β); if one fails, the Pipeline Log has the per-method reason, and you can just retry that accession. - Expand the project and check the sample.
- In Run AMRFinderPlus:
- Force organism β leave on Auto-detect (recommended) if you set up
Kraken2. Otherwise choose the species by hand (e.g.
Escherichiafor the E. coli run). The organism selection matters: it enables the correct point-mutation screen for that species. --plusβ leave β on to also report virulence/stress/biocide genes.
- Force organism β leave on Auto-detect (recommended) if you set up
Kraken2. Otherwise choose the species by hand (e.g.
- Click βΆ Run selected (1). The tool assembles the reads, QCs the assembly, optionally types it (MLST), then runs AMRFinderPlus.
- Open Results.
How to read the output
The resistance table is the main output. Key columns:
| Column | What it tells you |
|---|---|
| Element symbol | The gene or mutation, e.g. blaROB-1, tet(H), gyrA_S83L. |
| Class / Subclass | The drug class it affects, e.g. BETA-LACTAM / Cephalosporin. |
| Method | How it was found β see below. |
| % Identity / % Coverage | How well the hit matches the reference gene. Near 100% = a confident, full-length match. |
Report (HTML + PDF). Beyond the table, the run produces a comprehensive report β open Report (HTML) in the browser or Report (PDF) to share. It gathers the input read QC, assembly QC, organism identification (Kraken + MLST scheme, ST and alleles), the full resistance table and an AMR summary in one professional document, styled to match the suite's other tool reports.
The Method column is your confidence guide:
ALLELE/EXACTβ an exact match to a known resistance gene. High confidence.POINTβ a resistance-conferring point mutation (e.g. a fluoroquinolone mutation ingyrA). Only screened when the organism is known β hence the organism selection in step 5.PARTIAL/INTERNAL_STOPβ a truncated or interrupted gene. Flag for review β it may not confer resistance.
π Teaching point. A gene being present is not the same as resistance being expressed, and
% coverage < 100%(a partial hit) deserves a second look. AMRFinderPlus reports the genotype; clinical interpretation is a further step. Compare the E. coli result (typically a rich set of acquired genes) with the Pasteurella result (usually sparser) to see how organism and resistance content vary.
Module 7 β MLST: assign a sequence type
What it does. MLST (Multi-Locus Sequence Typing) reads the alleles at a fixed set of ~7 housekeeping genes and looks up the combination in the PubMLST database to assign a Sequence Type (ST) β a compact, portable label for a strain. Identical STs across isolates suggest they're the same clone.
Input. Raw reads (assembled for you) or an assembled genome. It auto-detects the scheme β you don't tell it the species.
The data β same isolate as Module 6
Accession Organism
SRR28320745 Pasteurella multocida
Reusing the Pasteurella isolate lets you see two tools describe one organism: its resistance genes (Module 6) and its strain type (here).
Steps
- Launch MLST. Create a project β e.g.
MLST_training. - Get the isolate in: Inputs β SRA Download β paste
SRR28320745β Download (MLST assembles the reads for you). Or, if you already have an assembly, use Download genome FASTA by accession to fetch a GenBank/RefSeq orGCA_/GCF_genome directly β the same downloader kSNP and GenoFLU use. MLST can type an assembly with no read-download/assembly step. - Expand the project, check the sample.
- In Run MLST, leave Force scheme on Autodetect (recommended) β the tool picks the right scheme from the assembly.
- Click βΆ Run selected (1).
- Read the inline result / Results pane.
How to read the output
- Scheme β the PubMLST scheme that matched, e.g.
pmultocida_rirdcfor Pasteurella multocida. This confirms the species. - ST β the Sequence Type, e.g.
ST 13. This is the headline result. - Allele numbers β the allele called at each locus (e.g.
adk: 1,est: 2, β¦). The combination is the ST. - Badges:
- novel β one or more alleles aren't in the database (marked
~). Possibly a new variant; worth confirming. - partial β an allele call was incomplete (marked
?), usually from an assembly gap β lower confidence.
- novel β one or more alleles aren't in the database (marked
π Teaching point. MLST and AMRFinderPlus are complementary: MLST answers "which strain is this?" and AMRFinderPlus answers "what resistance does it carry?". In fact AMRFinderPlus can call MLST internally to cross-check the organism β that's why the two tools share a project layout.
Module 8 β kSNP: a reference-free SNP tree
What it does. kSNP4 builds a SNP matrix and phylogenetic tree without a reference genome and without alignment β it compares genomes by their k-mers (short DNA words). Use it when you have finished genomes (assemblies) and want a quick, alignment-free tree β for example, to place unknown isolates among known references.
Input. Assembled genomes (FASTA) β not reads. Conveniently, kSNP can download genomes directly by accession number.
The data β MTBC reference genomes (by accession)
kSNP takes GenBank/RefSeq genome accessions, not SRA runs. Paste these into kSNP's "Download genome FASTA by accession" box (not the SRA box):
Accession Lineage / species
CP041800 Lineage 1
CP017920 Lineage 2
CP046309 Lineage 3
NC_000962 Lineage 4 (M. tuberculosis H37Rv reference)
CP020381 Lineage 4
CP089775 Lineage 4
CP041837 Lineage 4
CP069067 Lineage 5
NZ_CP014617 Lineage 6
CP041791 Lineage 7
CP048071 Lineage 8
NC_002945 M. bovis
CP109681 M. bovis BCG
CP016401 M. caprae
LR882497 M. microti
CP063804 M. orygis
Steps
- Launch kSNP. Create a project β e.g.
MTBC_ksnp. - In Inputs, find "Download genome FASTA by accession", paste the accessions above (the labels are just notes β paste the accession column), and keep "Name files by organism / strain metadata (recommended)" β ticked so the tree labels are readable. Click Fetch FASTA.
- (Optional but recommended) In the file list, click the β (pencil) next to
each genome to give it a short, clear label (e.g.
L4_H37Rv,M_bovis). This label becomes the name in the tree β clean names now save confusion later. - Expand the project and make sure the genomes you want are checked (kSNP needs at least 2).
- In Run kSNP4, the defaults are the validated standard:
- k-mer size β leave blank so Kchooser4 picks the optimum automatically.
- Core-SNP analysis, Maximum-likelihood tree, Per-SNP VCF β leave β on.
- min_frac β leave at 0.8.
- Click βΆ Run kSNP4.
- Open Results.
How to read the output
The Results pane gives you three SNP counts and a quality verdict:
- Core SNPs β SNPs present in every genome. The core-SNP tree is the one to trust β no missing data.
- All (pan) SNPs β every SNP found in any genome. Most detail, but some positions are missing in some genomes.
- Majority SNPs β a middle ground (present in β₯
min_fracof genomes).
Then the trees:
- Open
tree.core_SNPs.parsimony.trefirst β the most reliable. Because you loaded labeled MTBC lineages, the genomes should again group by lineage, with M. bovis/BCG/M. caprae/M. orygis clustering in the animal-adapted part. - FCK (Fraction of Core K-mers) in the metrics strip is your sanity check: β₯ 0.1 means the genomes share enough sequence for reliable SNP detection. A very low FCK means the set is too divergent for kSNP to resolve well.
π Teaching point. kSNP (reference-free, from assemblies) and vSNP3 (reference-based, from reads) answer the same "how related?" question by different routes. kSNP is fast and needs no reference β great for a quick look or when no good reference exists. vSNP3 is the validated, reference-anchored workflow for diagnostic reporting. Running the same organisms through both (Modules 4β5 vs. here) is a great way to understand the trade-offs.
Wrap-up β what you've learned
| You started with⦠| Tool | You produced⦠|
|---|---|---|
| Influenza reads (SRA) | IRMA | Assembled genome, subtype, QC report |
| An influenza assembly | GenoFLU | A genotype call (clade/constellation) |
| TB reads (SRA) | Kraken ID-Parse | A taxonomic profile + clean, single-taxon reads |
| TB reads (SRA) | vSNP3 | Per-sample VCFs β SNP table + tree |
| An MTBC panel | vSNP3 | A whole-complex phylogeny |
| Bacterial reads | AMRFinderPlus | A resistance-gene profile |
| A bacterial isolate | MLST | A sequence type (ST) |
| Genome accessions | kSNP | A reference-free SNP tree |
The one pattern to remember: create a project β paste accessions β check samples β Run β read the Results. Every tool in the suite follows it.
Where to go next
- Something won't run?
bin/bdtools doctorexplains every gap and its fix. - Reference databases: the README's Reference databases section.
- Validate your install against known-good results:
bin/bdtools test all. - Per-tool detail: each tool has its own README and
docs/in its repository (e.g. vSNP3 ships a comprehensive user guide underdocs/).
β οΈ A note on interpretation. These tools report genotypes, resistance genotypes, and genetic distances. Turning those into a diagnostic conclusion is a professional judgment that combines this output with clinical and epidemiological context. Two tools in the suite (Bovine MHC Typer, NCBI Submit) carry development-status notices on their dashboard cards β heed them.