← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-workflows-outbreak-pipeline / references / usage-guide.md

Outbreak Pipeline Usage Guide

Overview

This workflow orchestrates outbreak investigation from whole-genome sequencing data. It combines pathogen typing (MLST, cgMLST, in-silico serotyping; Pangolin / Nextclade lineage assignment for viruses), AMR detection (AMRFinderPlus with species mode, TB-Profiler for Mtb, hAMRonization for cross-tool reporting), recombination-aware phylodynamics (snippy + Gubbins on core.full.aln, TreeTime or BEAST2 BDSKY with TempEst R^2 QC), and transmission inference (outbreaker2 / TransPhylo / transcluster with pathogen-specific SNP thresholds). The workflow defers methodological depth to the underlying epidemiological-genomics skills.

Prerequisites

conda install -c bioconda mlst chewbbaca ncbi-amrfinderplus hamronization tb-profiler \
    snippy snp-dists gubbins clonalframeml iqtree treetime pangolin nextclade freyja \
    mob_suite plasmidfinder sistr_cmd seqsero2 kleborate

conda install -c bioconda beast2
packagemanager -add BDSKY BEASTLabs feast ORC MASCOT BICEPS

Rscript -e "install.packages(c('TransPhylo', 'outbreaker2', 'BactDating', 'bdskytools', 'coda', 'ape'))"

amrfinder -u
tb-profiler update_tbdb

Required databases: - MLST schemes (auto-downloaded by mlst); chewBBACA cgMLST schema (record source + fetch date) - AMR databases: NCBI ReferenceGeneCatalog (AMRFinderPlus), WHO Mtb 2nd-edition catalogue (TB-Profiler) - Reference genome for core SNP alignment; for SARS-CoV-2, pin pangolin-data + Nextclade dataset version

Quick Start

Tell your AI agent what you want to do: - "Investigate this Salmonella outbreak with genomic data" - "Build a transmission network from my isolate genomes" - "Type my bacterial isolates and check for AMR genes" - "Run phylodynamic analysis on my outbreak samples"

Example Prompts

Complete pipeline

"Run outbreak investigation on my Klebsiella isolate genomes"

"Build a transmission tree from my hospital outbreak samples"

Typing and AMR

"MLST type my E. coli isolates"

"Screen my isolates for antibiotic resistance genes"

"Compare AMR profiles across outbreak isolates"

Phylodynamics

"Build a time-scaled phylogeny from my outbreak with collection dates"

"Estimate the clock rate for this outbreak"

Transmission

"Infer who infected whom in my outbreak using outbreaker2 with contact-tracing data"

"Estimate R_e through time for my outbreak using BEAST2 BDSKY with multi-chain convergence diagnostics"

Input Requirements

Input Format Description
Isolate genomes FASTA Assembled genomes for each isolate
Collection dates TSV Sample names with dates (YYYY-MM-DD)
Reference genome GenBank/FASTA For core SNP alignment
Location data (optional) TSV Geographic coordinates for mapping

What the Agent Will Do

  1. Typing: 7-locus MLST + cgMLST via chewBBACA; in-silico serotyping per organism (SISTR/SeqSero2 for Salmonella; Kleborate for Klebsiella; SeroBA for pneumococcus; spa + SCCmec for S. aureus). For SARS-CoV-2, Pangolin --analysis-mode usher + Nextclade with pinned dataset version.
  2. AMR: AMRFinderPlus with --organism for species-specific point-mutation panel; TB-Profiler against the WHO 2nd-edition catalogue for M. tuberculosis (AMRFinderPlus has no Mtb organism mode); hAMRonization to merge per-tool output to the PHA4GE schema.
  3. Core alignment + recombination masking (bacteria): snippy + snippy-core; Gubbins on core.full.aln (NOT core.aln) to mask recombinant tracts before any clock inference.
  4. Phylogenetics: IQ-TREE 2 with +ASC (ascertainment correction required for SNP-only alignment) on the recombination-masked sites.
  5. Phylodynamics: TempEst root-to-tip R^2 >= 0.3 minimum first; TreeTime ML for outbreak-scale or BEAST2 BDSKY for posterior R_e; for multi-deme sampling use MASCOT (NOT BEAST DTA which is sampling-biased).
  6. Transmission inference: outbreaker2 (dense + contact data) OR TransPhylo (sparse / longer time-scale from dated tree); apply pathogen-specific SNP cutoff for cluster definition with the source population caveated.

Key Parameters

Parameter Default Description
snippy --mincov 10 Minimum coverage for variant call
Gubbins input core.full.aln NOT core.aln; variable-only alignment cannot estimate background SNP density
IQ-TREE model GTR+G+ASC +ASC for SNP-only post-Gubbins input
TreeTime --clock-filter 4 SD multiplier on root-to-tip residual; TreeTime convention
TreeTime R^2 minimum 0.3 Below this, temporal signal treated as insufficient (field convention; TempEst itself sets no cutoff)
Generation time pathogen-specific Bacteria ~7-14 days; TB years; SARS-CoV-2 ~5 days; never hardcode
TransPhylo mcmcIterations 1e5-1e6+ 10k is a smoke-test only
BEAST2 BDSKY origin > rootHeight Setting origin == rootHeight biases R_e upward systematically
BEAST2 chains >=3-4 independent Single-chain ESS necessary but not sufficient
Pangolin --analysis-mode usher pangoLEARN deprecated mid-2023
Pangolin pangolin-data pinned + dated Cross-time-point comparisons require a single pangolin-data version

Pathogen-Specific SNP / cgMLST Cluster Thresholds

No universal cutoff. See epidemiological-genomics/transmission-inference for the full table with citations.

Pathogen Threshold Source
M. tuberculosis (core SNP) <=12 SNPs (likely); <=5 (recent) Walker 2013 Lancet Infect Dis 13:137 -- UK low-transmission; inflates 2-5x in high-burden
S. aureus (core SNP) <=15 SNPs (within hospital) Coll 2020 Lancet Microbe 1:e328
K. pneumoniae (KPC) <=21 SNPs Field convention; no threshold source
C. difficile (recombination-masked) <=2 SNPs (direct) Eyre 2013 NEJM 369:1195
Salmonella (cgMLST) <=5 alleles EFSA / EnteroBase convention
Listeria (PulseNet cgMLST) <=4 alleles PulseNet protocol
SARS-CoV-2 NOT SNP alone 0-2 SNPs + epi link + sampling window
HIV-1 subtype B 1.5% TN93 HIV-TRACE US-CDC default; re-tune for non-B

Pathogen-Specific Clock Rates and Generation Times

Pathogen Generation Time Clock Rate Notes
Salmonella 7-14 days ~1-3e-7 subs/site/year Hospital and foodborne outbreaks
E. coli 7-10 days ~1-2e-7 STEC outbreaks
Klebsiella 7-14 days ~1-3e-7 Hospital AMR / KPC outbreaks
Mtb years (reactivation possible) ~0.3-0.5 SNPs/genome/year Within-host coalescence matters; use TransPhylo
S. pneumoniae days ~1.5e-6 subs/site/year (recombination-masked) >5e-6 indicates unmasked recombination
SARS-CoV-2 ancestral ~5 days ~8e-4 subs/site/year Rate varies by lineage

Tips