[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ED2AEVRGZPR7CMGQBXKJWX":3,"skill-same:01M7ED2AEVRGZPR7CMGQBXKJWX":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7ED2AEVRGZPR7CMGQBXKJWX","bio-epidemiological-genomics-transmission-inference",null,"Infers person-to-person transmission from pathogen genomes using outbreaker2, TransPhylo, phybreak, BadTrIP, SCOTTI, BEASTLIER, and SNP-distance \u002F cluster-picker approaches (HIV-TRACE for HIV; transcluster). Defines outbreak clusters using pathogen-specific SNP thresholds (NOT a universal cutoff -- TB \u003C=12 SNPs; MRSA \u003C=15; C. difficile \u003C=2; Klebsiella \u003C=21), models within-host diversity and transmission bottlenecks, integrates contact-tracing data, distinguishes generation from serial interval, and attributes source via Bayesian source attribution (islandR). Use when investigating outbreaks for who-infected-whom, defining SNP-cluster outbreak definitions, accounting for unsampled intermediates, choosing between outbreaker2 (rich epi data) and TransPhylo (genomic-only after a dated phylogeny), running source attribution between host populations, calling HIV-TRACE thresholds appropriate to the local subtype, or distinguishing recent transmission from reactivation in TB or chronic HIV.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-epidemiological-genomics-transmission-inference\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-epidemiological-genomics-transmission-inference\ndescription: Infers person-to-person transmission from pathogen genomes using outbreaker2, TransPhylo, phybreak, BadTrIP, SCOTTI, BEASTLIER, and SNP-distance \u002F cluster-picker approaches (HIV-TRACE for HIV; transcluster). Defines outbreak clusters using pathogen-specific SNP thresholds (NOT a universal cutoff -- TB \u003C=12 SNPs; MRSA \u003C=15; C. difficile \u003C=2; Klebsiella \u003C=21), models within-host diversity and transmission bottlenecks, integrates contact-tracing data, distinguishes generation from serial interval, and attributes source via Bayesian source attribution (islandR). Use when investigating outbreaks for who-infected-whom, defining SNP-cluster outbreak definitions, accounting for unsampled intermediates, choosing between outbreaker2 (rich epi data) and TransPhylo (genomic-only after a dated phylogeny), running source attribution between host populations, calling HIV-TRACE thresholds appropriate to the local subtype, or distinguishing recent transmission from reactivation in TB or chronic HIV.\ntool_type: mixed\nprimary_tool: TransPhylo\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"epidemiological-genomics\u002Ftransmission-inference\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: TransPhylo 1.4+ (R), outbreaker2 1.2+ (R), phybreak 0.5+ (R), BadTrIP via BEAST 2.7+ package manager, BEASTLIER via BEAST 1.10+, transcluster 1.0+ (R), HIV-TRACE 1.5+, snp-dists 0.8+, ape 5.8+ (R), igraph 1.6+ (R), TreeTime 0.11+, BactDating 1.1+ (R), BEAST 2.7.6+, lofreq 2.1+, deepSNV via Bioconductor 3.18+, pandas 2.2+, BioPython 1.84+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- R: `packageVersion('TransPhylo')`; `?inferTTree` to confirm arg names\n- R: `packageVersion('outbreaker2')`; `?create_config` -- iteration count is set via `n_iter` in the `config` object, NOT as `iters` to `outbreaker()`\n- Python: `pip show lofreq`; check whether deep variant calling supports the target MAF\n- CLI: `snp-dists --help`; `hiv-trace --help`\n\nIf R rejects an argument, the function signature changed between minor releases; `?function_name` is authoritative.\n\n# Transmission Inference\n\n**\"Who infected whom in this outbreak, and is this even an outbreak?\"** -> Pick the question first (cluster definition vs WIWS who-infected-whom vs source attribution), then the method that fits the data (rich epi + dense sampling -> outbreaker2; sparse sampling + good dated tree -> TransPhylo; longitudinal within-host samples -> BEASTLIER \u002F BadTrIP; rapid surveillance triage -> SNP-distance with pathogen-tuned threshold). Genomic distance is necessary but not sufficient for direction: two isolates 3 SNPs apart could be A->B, B->A, A->Unknown->B, or two-from-one common source. Direction inference requires temporal data, within-host diversity, contact-tracing data, or all three.\n\n- R: `outbreaker2::outbreaker(data=outbreaker_data(dates=..., dna=..., w_dens=..., f_dens=..., ctd=...), config=create_config(n_iter=1e6))` -- dense outbreak with contact data\n- R: `TransPhylo::inferTTree(ptree, mcmcIterations=1e5, w.shape=1.3, w.scale=10)` -- sparse outbreak from a dated tree\n- CLI: `snp-dists -c gubbins.filtered_polymorphic_sites.fasta > pairwise.csv` -- pairwise SNP for cluster triage\n- CLI: `hiv-trace --threshold 0.015` -- HIV cluster definition at the US-CDC default (subtype B); reconsider for non-B subtypes\n\n## The Single Most Important Modern Insight -- There is no universal SNP cutoff for transmission\n\nThe pathogen-specific SNP threshold varies by 10x across taxa (TB \u003C=12 SNPs, *C. difficile* \u003C=2, MRSA \u003C=15, *Salmonella* cgMLST \u003C=5, *Klebsiella* \u003C=21, SARS-CoV-2 not defined by SNP alone). Substitution rate, recombination, generation time, within-host diversity, and (for Mpox) APOBEC3 editing all vary by 100x. Walker 2013 *Lancet Infect Dis* 13:137 derived the TB \u003C=12 SNP cutoff from UK Oxfordshire (low-transmission, contact-traced, household settings); applying the same threshold in Cape Town or Mumbai inflates apparent recent-transmission rates 2-5x because clonal isolates linked through long-past common ancestors get pooled with truly recent transmissions. Worby, Lipsitch & Hanage 2014 *PLoS Comput Biol* 10:e1003549 formally showed that within-host bacterial diversity puts an irreducible upper bound on the resolution of SNP-distance transmission-network reconstruction even with repeated sampling. Always cite the pathogen-specific source AND its derivation population; never apply a threshold outside its validated context without an explicit caveat. For TB \u002F HIV \u002F chronic infections, naive SNP cutoffs fail because of reactivation and within-host coalescence -- use TransPhylo or outbreaker2 with within-host-aware priors.\n\n## Algorithmic Taxonomy\n\n| Tool | Mechanism | Inputs | Output | Strength | Fails when |\n|------|-----------|--------|--------|----------|------------|\n| Pairwise SNP threshold (snp-dists; cluster picker) | Count SNPs between pairs; threshold + linkage | Core-SNP alignment | Adjacency at threshold | Fast; intuitive; standard for surveillance triage | Pathogen-specific cutoff; convergent evolution and recombination violate distance assumptions |\n| HIV-TRACE (Kosakovsky Pond 2018 *Mol Biol Evol* 35:1812) | TN93 pairwise distance + threshold (default 1.5%) | HIV-1 pol or other gene | Cluster membership | CDC standard for US HIV surveillance | 1.5% threshold is US-CDC subtype B specific; under-clusters subtype C in southern Africa |\n| outbreaker2 (Campbell 2018 *BMC Bioinformatics* 19:363) | MCMC; sequence + generation-interval + sampling-time + contact-tracing | Dated genomes + epi data | Posterior WIWS + unsampled intermediates + R_e | Integrates epi data explicitly; modular likelihood | ~100-200 cases practical limit; assumes one infection event per case (no within-host populations) |\n| TransPhylo (Didelot 2017 *Mol Biol Evol* 34:997) | Coalescent within-host + birth-death between-host; colours a dated tree | Time-scaled tree + sampling dates | Posterior transmission tree + R_t + unsampled cases | Works from a tree, not raw genomes; scales to ~1000 tips; explicit within-host coalescence | Sensitive to within-host effective population size prior; requires good dated phylogeny |\n| phybreak (Klinkenberg 2017 *PLoS Comput Biol* 13:e1005495) | Joint phylogeny + transmission inference via MCMC | Dated genomes | Posterior transmission tree | Proper within-host handling; fast for small outbreaks | \u003C=100 cases; less benchmarked than outbreaker2\u002FTransPhylo |\n| BadTrIP (De Maio 2018 *PLoS Comput Biol* 14:e1006117) | Bayesian; explicit handling of multi-strain infections | Dated genomes | Posterior transmission tree with strain-level resolution | Handles within-host diversity \u002F mixed infections (TB, HIV) | Slow; specialist tool |\n| SCOTTI (De Maio 2016 *PLoS Comput Biol* 12:e1005130) | Structured-coalescent transmission inference (BEAST 2 package) | Dated genomes | Posterior transmission tree under structured coalescent | Sampling-aware; correctly models unsampled intermediates | Computationally heavy; specialist setup |\n| BEASTLIER (Hall 2015 *PLoS Comput Biol* 11:e1004613) | Joint phylogeny + transmission partitioning | Dated genomes; ideally with multiple isolates per host | Posterior transmission tree with within-host partition | Postdoc-grade identifiability with within-host samples | Single-isolate-per-host data is under-identified |\n| transcluster (Stimson 2019 *Mol Biol Evol* 36:587) | Per-pair posterior probability under SNP + time prior | Dated genomes | Per-pair cluster membership probability | Probabilistic; pathogen-tuned priors | Pair-level only; no full transmission tree |\n| Sobel Leonard 2017 *J Virol* 91:e00171-17 beta-binomial bottleneck | Estimate transmission bottleneck size from donor-recipient deep sequencing | Donor + recipient deep-sequence allele frequencies | Bottleneck Nb posterior | Estimates an otherwise unobservable quantity | Requires deep-sequenced donor-recipient pairs |\n| islandR \u002F Bayesian source attribution (Mather 2013 *Science* 341:1514) | Bayesian per-population allele-frequency model | Reference collections per host source + query genome | Per-source posterior probability | Standard in Salmonella \u002F Campylobacter food-safety surveillance | Source-attribution circularity: trained-on-distribution reproduces that distribution |\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended approach | Why wrong choices fail |\n|----------|----------------------|------------------------|\n| \"Is this even an outbreak?\" routine surveillance triage | `snp-dists` after Gubbins; pathogen-tuned threshold (Walker 2013 for TB, Eyre 2013 for C. diff, EFSA cgMLST \u003C=5 for Salmonella); cross-check cgMLST distance | Universal SNP threshold across pathogens (10x variation) |\n| Densely sampled outbreak with contact-tracing data | outbreaker2 with `ctd` contact matrix + generation-time prior + sampling-time prior | TransPhylo without epi data (loses information from contacts); naive SNP threshold (ignores within-host diversity) |\n| Sparsely sampled, longer-time-scale outbreak | TransPhylo on a BactDating-derived dated tree | outbreaker2 (sampling-completeness assumption broken); SNP threshold inflates clusters with unsampled intermediates |\n| TB outbreak with possible reactivation | TransPhylo + transcluster with TB-tuned priors; long within-host coalescent matters | SNP cutoff insufficient -- reactivation can have 0 SNPs from years-old strains |\n| Hospital outbreak with possible mixed infection | BadTrIP \u002F SCOTTI | Consensus-only methods (SNP distance, outbreaker2) ambiguous on mixed-strain |\n| Multi-site outbreak with import suspected | TransPhylo + MASCOT-derived migration; source-attribution as separate analysis | Source attribution needs phylogeographic component beyond TransPhylo alone |\n| Food-vehicle \u002F environmental source attribution | islandR \u002F Bayesian source attribution (Mather 2013 framework); manual cluster + phylogeographic plot | Naive phylogenetic placement loses the per-source priors |\n| Sub-sampled outbreak (\u003C50% cases sequenced) | outbreaker2 (handles unsampled cases explicitly with `pi` sampling parameter) | Raw SNP cutoff -- unsampled intermediates break SNP-distance reasoning |\n| Recombining pathogen (S. pneumo, E. coli STEC, K. pneumoniae) | Gubbins \u002F ClonalFrameML mask FIRST; then any of the above | Recombination inflates apparent SNP distance and creates false convergent transmission inference |\n| HIV cluster definition | HIV-TRACE 1.5% for subtype B (US-CDC standard); reconsider for non-B subtypes | Applying 1.5% threshold globally without subtype caveat |\n| Estimate transmission bottleneck | Sobel Leonard 2017 beta-binomial on deep-sequenced donor-recipient pairs | Consensus-only sequences cannot quantify bottleneck size |\n\nMethodology evolves; before any high-stakes who-infected-whom claim, web-search \"outbreak transmission inference benchmark \u003Cpathogen> 2025\" for current best practice.\n\n## outbreaker2 With Contact Data\n\n**Goal:** Infer who-infected-whom posterior for a densely sampled outbreak with epi metadata, jointly estimating generation interval and unsampled-case proportion.\n\n**Approach:** Build `outbreaker_data` with sampling dates, DNA alignment, generation-time density `w_dens`, sampling-time density `f_dens`, and contact-tracing matrix `ctd`; configure MCMC via `create_config(n_iter=N)`; run; summarise posterior over WIWS.\n\n```r\nlibrary(outbreaker2)\nlibrary(ape)\n\ndna \u003C- read.dna('alignment.fasta', format='fasta')\ndates \u003C- read.csv('sampling_dates.csv')\nctd_matrix \u003C- as.matrix(read.csv('contact_matrix.csv', row.names=1))\n\nw_dens \u003C- dgamma(1:30, shape=2.5, scale=2)  # generation time prior\nf_dens \u003C- dgamma(1:30, shape=2, scale=3)    # sampling-time prior\n\ndata \u003C- outbreaker_data(dates=dates$collection_date, dna=dna,\n                        w_dens=w_dens, f_dens=f_dens, ctd=ctd_matrix)\n\ncfg \u003C- create_config(n_iter=1e6, sample_every=200, find_import=TRUE)\n\nres \u003C- outbreaker(data=data, config=cfg)\nsummary(res)\n```\n\n`w_dens` is the generation-time distribution (time from infection of A to infection of B) -- NOT the serial interval (time between symptom onsets); using one in place of the other biases inference. Britton & Scalia Tomba *J R Soc Interface* 16:20180670 (2019) formalised the bias for emerging epidemics; for SARS-CoV-2 with substantial pre-symptomatic transmission (Ali 2020 *Science* 369:1106), the serial interval shortened from 7.8 to 2.2 days under NPI, and naive SI-based inference was biased.\n\n## TransPhylo From a Dated Tree\n\n**Goal:** Infer transmission tree posterior from a time-scaled phylogeny when raw genomes are not directly usable or when the outbreak is too large for outbreaker2 (>200 cases).\n\n**Approach:** Time-scale the tree first (BactDating after Gubbins for bacteria; BEAST or TreeTime for viruses); convert to TransPhylo `ptree` with `ptreeFromPhylo`; run `inferTTree` with generation-time prior and within-host effective population size prior; summarise via `medTTree` (medoid transmission tree) and posterior probabilities per WIWS pair.\n\n```r\nlibrary(TransPhylo)\nlibrary(ape)\n\ntree \u003C- read.nexus('dated_tree.nexus')\ndate_last_sample \u003C- 2024.95\n\nptree \u003C- ptreeFromPhylo(tree, dateLastSample=date_last_sample)\n\nw.shape \u003C- 1.3\nw.scale \u003C- 10\nws.shape \u003C- 1.1\nws.scale \u003C- 7\nneg \u003C- 0.5\n\nres \u003C- inferTTree(ptree, mcmcIterations=1e5,\n                  w.shape=w.shape, w.scale=w.scale,\n                  ws.shape=ws.shape, ws.scale=ws.scale,\n                  startNeg=neg, dateT=date_last_sample + 0.1)\n\nmed_tree \u003C- medTTree(res)\npairs \u003C- extractTTree(med_tree)$ttree\n```\n\n`w.*` is the generation-time Gamma prior; `ws.*` is the sampling-time Gamma prior. Both must reflect the pathogen's biology (e.g., TB w.scale = months; SARS-CoV-2 w.scale = days). Wrong priors silently bias the transmission-tree posterior.\n\n## SNP-Cluster Definition With Pathogen-Specific Thresholds\n\n**Goal:** Define outbreak clusters from a recombination-masked core-SNP alignment using the published pathogen-specific threshold, with the threshold's source population caveated.\n\n**Approach:** Snippy -> snippy-core -> Gubbins on `core.full.aln` for bacteria -> snp-dists -> single-linkage clustering at the pathogen-specific threshold; cite Walker 2013 (TB), Eyre 2013 (C. diff), Coll 2017 (MRSA), Snitkin 2012 (Klebsiella) per organism; flag any extrapolation outside the threshold's validation population.\n\n```bash\nsnippy-core --ref reference.fa --prefix core snippy_out\u002F*\nrun_gubbins.py --prefix gubbins core.full.aln\nsnp-dists -c gubbins.filtered_polymorphic_sites.fasta > pairwise.csv\n```\n\n```python\nimport pandas as pd\nimport numpy as np\nfrom scipy.cluster.hierarchy import linkage, fcluster\n\ndist = pd.read_csv('pairwise.csv', index_col=0)\ncondensed = dist.values[np.triu_indices(len(dist), k=1)]\n\nTHRESHOLD_TB = 12   # Walker 2013 Lancet Infect Dis 13:137 -- UK low-transmission\nTHRESHOLD_MRSA = 15  # Coll 2017 Clin Infect Dis 65:1781\nTHRESHOLD_CDIFF = 2  # Eyre 2013 NEJM 369:1195\nTHRESHOLD_KPNEUMO = 21  # Snitkin 2012 Sci Transl Med 4:148ra116\n\nlinkage_matrix = linkage(condensed, method='single')\nclusters = fcluster(linkage_matrix, t=THRESHOLD_TB, criterion='distance')\n```\n\n## Per-Method Failure Modes\n\n### Pairwise SNP threshold applied outside its validation population\n\n**Trigger:** Walker 2013 UK 5\u002F12-SNP TB threshold applied to Cape Town or Mumbai high-transmission settings.\n\n**Mechanism:** Walker 2013 *Lancet Infect Dis* 13:137 calibrated the 5\u002F12 SNP threshold on Oxfordshire community \u002F household contact-traced data (low-transmission). In high-prevalence settings, clonal isolates linked through long-past common ancestors fall within the threshold without recent direct transmission.\n\n**Symptom:** Country-level Mtb genomic-epi report shows 60-80% of cases in \"transmission clusters\", far exceeding clinical contact-tracing rates.\n\n**Fix:** Cite the threshold's source population; for high-prevalence settings, derive a local threshold from epidemiologically-anchored case pairs in the local cohort rather than importing a UK-low-transmission cutoff. For transmission-direction claims, supplement with TransPhylo \u002F outbreaker2.\n\n### Direction of transmission asserted from pairwise SNP distance alone\n\n**Trigger:** Outbreak report concluding \"A -> B\" because A has earlier sampling date and 3 SNPs from B.\n\n**Mechanism:** A 3-SNP pairwise difference is consistent with A->B, B->A, Unknown->both, or A->Unknown->B. Worby, Lipsitch & Hanage 2014 *PLoS Comput Biol* 10:e1003549 formalised the irreducible uncertainty. Earlier sampling date does not establish earlier infection date because of within-host evolution and asymptomatic carriage.\n\n**Symptom:** Outbreak conclusions claim directionality without within-host data or contact tracing; reviewers from the Didelot \u002F Worby groups push back.\n\n**Fix:** Use \"transmission consistent with genomics\" not \"transmission demonstrated\". For direction claims, require within-host samples (BEASTLIER), contact-tracing data (outbreaker2 with `ctd`), or both. Cite Worby 2014 as the upper bound on what SNP distance can establish.\n\n### Unsampled intermediates collapsed into A->B direct links\n\n**Trigger:** Outbreak with \u003C50% sequencing coverage; transmission inference assumes all cases sampled.\n\n**Mechanism:** When sampling is incomplete, inferred A->B \"direct\" transmissions are routinely A->Unknown->B chains. This systematically inflates inferred R_e (longer chains compressed), underestimates generation interval, and biases topology toward bushy trees.\n\n**Symptom:** Inferred R_e is implausibly high (each \"tip\" appears to spawn extra children once unsampled intermediates collapse into apparent direct links); generation interval estimate is implausibly short; topology appears bushier than expected.\n\n**Fix:** Use outbreaker2 with explicit `pi` (sampling proportion) parameter, or TransPhylo \u002F SCOTTI which model unsampled intermediates explicitly. Cite the unsampled-intermediates caveat in every transmission-inference report.\n\n### Narrow transmission bottleneck makes consensus-only inference WORSE than coalescent intuition predicts\n\n**Trigger:** Consensus-genome transmission-pair inference for a pathogen with documented narrow bottleneck (influenza 1-2 virions per McCrone 2018 *eLife* 7:e35962; SARS-CoV-2 \u003C10 virions per Lythgoe 2021 *Science* 372:eabg0821).\n\n**Mechanism:** When the transmission bottleneck is narrow, donor and recipient consensus genomes are near-identical *by default* -- the bottleneck strips most within-host diversity. Near-identity therefore does NOT discriminate direct transmission from infection by an unsampled intermediate or from a shared common source. Naive coalescent intuition predicts that \"more transmissions = more divergence\"; the opposite is true under a narrow bottleneck.\n\n**Symptom:** Most pairs in a dense outbreak appear identical or 1 SNP apart; SNP-distance-based cluster definitions become uninformative; transmission-direction claims based on consensus difference are unfalsifiable.\n\n**Fix:** For narrow-bottleneck pathogens, supplement consensus-based methods with deep within-host variant calling (lofreq \u002F deepSNV \u002F VarScan2 at MAF >= 1%) on donor-recipient pairs; estimate bottleneck size explicitly via Sobel Leonard 2017 *J Virol* 91:e00171-17 beta-binomial estimator; report transmission claims as \"consistent with\" rather than \"demonstrated by\" consensus identity. Pair-level resolution requires within-host data; without it, claim only cluster membership, not direction.\n\n### Generation interval and serial interval used interchangeably\n\n**Trigger:** outbreaker2 \u002F EpiNow2 \u002F similar tools fed the serial-interval distribution (`w_dens` set from symptom-to-symptom data) when the model wants generation-interval (infection-to-infection).\n\n**Mechanism:** Generation interval = time from infection of A to infection of B; serial interval = time from symptom onset of A to symptom onset of B. They differ when incubation periods vary or pre-symptomatic transmission is substantial. Britton & Scalia Tomba 2019 *J R Soc Interface* 16:20180670 formalised the bias for emerging epidemics; Ali 2020 *Science* 369:1106 showed for SARS-CoV-2 the SI shortened from 7.8 to 2.2 days under NPI.\n\n**Symptom:** Inferred R_e is biased; comparison to case-based R_t (also often SI-based) shows compounding bias.\n\n**Fix:** Document which distribution `w_dens` actually encodes. For SARS-CoV-2 with substantial pre-symptomatic transmission, generation interval is ~5 days in the ancestral-strain literature; serial interval was ~4-5 days early but shortened to 2-3 under NPI. Cite Britton 2019.\n\n### HIV-TRACE 1.5% threshold applied to non-subtype-B HIV\n\n**Trigger:** HIV-TRACE run on subtype C sequences from southern Africa with the default 1.5% TN93 threshold.\n\n**Mechanism:** Kosakovsky Pond et al 2018 *Mol Biol Evol* 35:1812 documented HIV-TRACE methodology; the 1.5% threshold is the US-CDC default tuned for subtype B in MSM cohorts. Subtype C in southern Africa has higher diversity per unit time and more recent epidemics; the 1.5% threshold under-clusters there.\n\n**Symptom:** Cluster definitions in southern African subtype C HIV surveillance under-detect transmission; comparison to US surveillance literature shows incompatible cluster sizes.\n\n**Fix:** Tune threshold for the local subtype and population; cite the local validation. UKHSA \u002F ECDC use different thresholds; document which.\n\n### Source attribution circularity\n\n**Trigger:** Bayesian source attribution model (Mather 2013 *Science* 341:1514 framework) trained on a reference collection that over-represents one host population.\n\n**Mechanism:** Source-attribution models reproduce the host-distribution of their training data unless explicitly corrected. If 80% of training isolates are from cattle, the model will tend to attribute new isolates to cattle even when the true source is poultry.\n\n**Symptom:** Source attribution reproduces the sampling intensity of the reference collection; conclusions are circular.\n\n**Fix:** Weight by inverse sampling intensity per source category; use rarefied reference collections; report attribution alongside the reference-collection composition as a caveat.\n\n### Primer-scheme dropout misread as real divergence\n\n**Trigger:** SARS-CoV-2 outbreak comparison across samples sequenced with different ARTIC primer schemes (V3 \u002F V4 \u002F V4.1 \u002F V5.3.2); \"differences\" concentrated in one amplicon are interpreted as real SNPs.\n\n**Mechanism:** ARTIC primer dropouts produce N's or reference-derived consensus calls in failed amplicons (Itokawa 2020 *PLoS ONE* 15:e0239403); these LOOK LIKE deletions or reference matches in downstream analysis but are missing data. Cross-scheme comparison without masking failed amplicons produces spurious transmission differences.\n\n**Symptom:** Cluster definitions differ implausibly between ARTIC-V3 and ARTIC-V4.1 samples; \"differences\" cluster in known dropout amplicons (V4.1 amplicons 64, 76, 88-90).\n\n**Fix:** Mask failed amplicons per sample (samtools depth + per-amplicon coverage); document primer scheme version per isolate; for transmission inference, exclude positions in any sample's dropout regions.\n\n## Reconciliation: When Methods Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| outbreaker2 and TransPhylo disagree on WIWS | Different sampling-completeness assumptions; outbreaker2 expects ~dense sampling, TransPhylo handles sparse | Pick the method whose assumption matches the data; cite the choice |\n| SNP threshold cluster and outbreaker2 cluster differ | SNP threshold ignores temporal data and contacts | Trust outbreaker2 (integrates more evidence); SNP cluster is triage only |\n| Two consecutive Pangolin versions give different lineage for a \"transmission pair\" | Lineage definitions revised | Re-run both samples against a single Pango \u002F pangolin-data version |\n| TB cluster definition flips between 5 and 12 SNP threshold | Walker 2013 ambiguous range | Run TransPhylo for transmission-direction posterior; report SNP-distance with cluster picker certainty |\n| HIV cluster differs between HIV-TRACE 1.5% and 2.0% | Threshold sensitivity at boundary | Subtype-specific calibration; cite the chosen threshold's validation |\n| Source attribution differs between islandR runs with different reference panels | Sampling-intensity bias | Re-run with rarefied or inverse-weighted reference; report multiple scenarios |\n\n## Quantitative Thresholds\n\n| Pathogen | \"Outbreak cluster\" threshold | Source \u002F rationale |\n|----------|------------------------------|--------------------|\n| *Mycobacterium tuberculosis* (whole-genome core SNP) | \u003C=12 SNPs (likely transmission); \u003C=5 SNPs (recent transmission) | Walker 2013 *Lancet Infect Dis* 13:137 (UK low-transmission setting) |\n| *Staphylococcus aureus* (core genome) | \u003C=15 SNPs (within hospital outbreak); \u003C=40 SNPs (broader temporal cluster) | Coll 2017 *Clin Infect Dis* 65:1781 |\n| *Klebsiella pneumoniae* (KPC outbreak) | \u003C=21 SNPs | Snitkin 2012 *Sci Transl Med* 4:148ra116 |\n| *Salmonella enterica* (cgMLST EnteroBase) | \u003C=5 allelic differences (cluster); \u003C=7 (extended cluster) | EnteroBase \u002F EFSA harmonised |\n| *Listeria monocytogenes* (PulseNet cgMLST) | \u003C=4 allelic differences | PulseNet protocol convention |\n| *E. coli* (cgMLST, EnteroBase) | \u003C=10 allelic differences (STEC outbreak) | EnteroBase convention |\n| *Neisseria gonorrhoeae* | \u003C=25 core SNPs (transmission) | UKHSA STI framework |\n| *Clostridioides difficile* (core SNP, recombination-masked) | \u003C=2 SNPs (likely direct); \u003C=10 (plausible within 6 months) | Eyre 2013 *NEJM* 369:1195 |\n| SARS-CoV-2 (whole-genome) | No fixed cutoff; 0-2 SNPs + epi link + sampling window | Lythgoe 2021 *Science* 372:eabg0821 |\n| HIV-1 subtype B (TN93 distance) | 1.5% genetic distance (HIV-TRACE default; US-CDC standard) | Kosakovsky Pond 2018 *Mol Biol Evol* 35:1812 |\n| Mpox clade IIb | \u003C=2 SNPs cluster threshold; APOBEC3 editing inflates apparent distance | Mpox 2022 outbreak APOBEC3-editing literature |\n| Transmission bottleneck -- influenza | ~1-2 virions (narrow) | McCrone 2018 *eLife* 7:e35962 |\n| Transmission bottleneck -- SARS-CoV-2 | \u003C10 virions (tight) | Lythgoe 2021 *Science* 372:eabg0821 |\n| Generation interval -- SARS-CoV-2 ancestral | ~5 days | SARS-CoV-2 ancestral-strain literature |\n\nCRITICAL: a number from one pathogen does NOT transfer to another. Always cite the source population.\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| outbreaker2 rejects `iters` arg | Iterations set via `n_iter` in the `config` object | `create_config(n_iter=N)` |\n| TransPhylo MCMC fails to converge | Within-host Ne prior misspecified; bad input tree | Tune `startNeg`; verify tree dating quality |\n| Cluster definition flips between linkage methods | Single-linkage vs complete-linkage on borderline pairs | Document; sensitivity analysis |\n| outbreaker2 estimates implausible R_e | Sampling proportion mis-specified | Set `pi` based on epi knowledge or estimate within outbreaker2 |\n| Transmission inferred between two distant lineages | Recombination unmasked | Run Gubbins on `core.full.aln` first |\n| HIV-TRACE clusters incompatible across labs | Different subtype calibration | Document subtype; use locally validated threshold |\n| Source attribution always pointing at one host | Reference-collection bias | Re-weight or rarify reference panel |\n| `snp-dists -t` rejected | `-t` flag doesn't exist; default IS tab; `-c` for CSV | Use `-c` for CSV; default for TSV |\n| Snippy outputs disagree across samples | Different reference; reference mismatch silently shifts SNP coordinates | Always document reference; use same reference cross-lab |\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Response |\n|----------|----------|\n| \"What SNP threshold and on what population?\" | Cite Walker 2013 \u002F Eyre 2013 \u002F Coll 2017 per pathogen; caveat the population if extrapolating |\n| \"Were unsampled intermediates handled?\" | outbreaker2 `pi` parameter or TransPhylo \u002F SCOTTI explicit modelling; never a raw SNP-distance method on sub-sampled data |\n| \"Direction of transmission inference?\" | Within-host samples + contact tracing required for direction; otherwise \"consistent with\" phrasing |\n| \"Generation interval vs serial interval?\" | Documented `w_dens` source; cite Britton 2019 if SI used as approximation for GI |\n| \"Why TransPhylo \u002F outbreaker2 \u002F phybreak?\" | Decision tree based on sampling completeness, dataset size, contact-tracing availability |\n| \"Was within-host diversity considered?\" | TransPhylo's within-host coalescent OR BadTrIP for mixed-strain; bottleneck size from Sobel Leonard 2017 if relevant |\n| \"HIV-TRACE 1.5% threshold outside subtype B?\" | Acknowledged US-CDC subtype B origin; either use locally validated threshold or document caveat |\n| \"Source attribution sampling-intensity bias?\" | Re-weighted reference collection or rarified; cite Mather 2013 limitation |\n| \"Was forward simulation run as a sanity check?\" | SLiM \u002F FAVITES \u002F SEEDY if claims are high-stakes; routinely under-done in published transmission inference |\n\n## References\n\n- Worby CJ, Lipsitch M, Hanage WP (2014) Within-host bacterial diversity hinders accurate reconstruction of transmission networks from genomic distance data. *PLoS Comput Biol* 10(3):e1003549. doi:10.1371\u002Fjournal.pcbi.1003549\n- Campbell F, Didelot X, Fitzjohn R, Ferguson N, Cori A, Jombart T (2018) outbreaker2: a modular platform for outbreak reconstruction. *BMC Bioinformatics* 19(Suppl 11):363. doi:10.1186\u002Fs12859-018-2330-z\n- Didelot X, Fraser C, Gardy J, Colijn C (2017) Genomic infectious disease epidemiology in partially sampled and ongoing outbreaks. *Mol Biol Evol* 34(4):997-1007. doi:10.1093\u002Fmolbev\u002Fmsw275\n- Klinkenberg D, Backer JA, Didelot X, Colijn C, Wallinga J (2017) Simultaneous inference of phylogenetic and transmission trees in infectious disease outbreaks. *PLoS Comput Biol* 13(5):e1005495. doi:10.1371\u002Fjournal.pcbi.1005495\n- De Maio N, Worby CJ, Wilson DJ, Stoesser N (2018) Bayesian reconstruction of transmission within outbreaks using genomic variants. *PLoS Comput Biol* 14(4):e1006117. doi:10.1371\u002Fjournal.pcbi.1006117\n- De Maio N, Wu CH, Wilson DJ (2016) SCOTTI: efficient reconstruction of transmission within outbreaks with the structured coalescent. *PLoS Comput Biol* 12(9):e1005130. doi:10.1371\u002Fjournal.pcbi.1005130\n- Hall M, Woolhouse M, Rambaut A (2015) Epidemic reconstruction in a phylogenetics framework: transmission trees as partitions of the node set. *PLoS Comput Biol* 11(12):e1004613. doi:10.1371\u002Fjournal.pcbi.1004613\n- Stimson J, Gardy J, Mathema B et al (2019) Beyond the SNP threshold: identifying outbreak clusters using inferred transmissions. *Mol Biol Evol* 36(3):587-603. doi:10.1093\u002Fmolbev\u002Fmsy242\n- Walker TM, Ip CLC, Harrell RH et al (2013) Whole-genome sequencing to delineate Mycobacterium tuberculosis outbreaks: a retrospective observational study. *Lancet Infect Dis* 13(2):137-146. doi:10.1016\u002FS1473-3099(12)70277-3\n- Coll F, Harrison EM, Toleman MS et al (2017) Longitudinal genomic surveillance of MRSA in the UK reveals transmission patterns in hospitals and the community. *Clin Infect Dis* 65(11):1781-1789. doi:10.1093\u002Fcid\u002Fcix645\n- Eyre DW, Cule ML, Wilson DJ et al (2013) Diverse sources of C. difficile infection identified on whole-genome sequencing. *N Engl J Med* 369(13):1195-1205. doi:10.1056\u002FNEJMoa1216064\n- Snitkin ES, Zelazny AM, Thomas PJ et al (2012) Tracking a hospital outbreak of carbapenem-resistant Klebsiella pneumoniae with whole-genome sequencing. *Sci Transl Med* 4(148):148ra116. doi:10.1126\u002Fscitranslmed.3004129\n- Lythgoe KA, Hall M, Ferretti L et al (2021) SARS-CoV-2 within-host diversity and transmission. *Science* 372(6539):eabg0821. doi:10.1126\u002Fscience.abg0821\n- McCrone JT, Woods RJ, Martin ET et al (2018) Stochastic processes constrain the within and between host evolution of influenza virus. *eLife* 7:e35962. doi:10.7554\u002FeLife.35962\n- Sobel Leonard A, Weissman DB, Greenbaum B, Ghedin E, Koelle K (2017) Transmission bottleneck size estimation from pathogen deep-sequencing data, with an application to human influenza A virus. *J Virol* 91(14):e00171-17. doi:10.1128\u002FJVI.00171-17\n- Britton T, Scalia Tomba G (2019) Estimation in emerging epidemics: biases and remedies. *J R Soc Interface* 16(150):20180670. doi:10.1098\u002Frsif.2018.0670\n- Ali ST, Wang L, Lau EHY et al (2020) Serial interval of SARS-CoV-2 was shortened over time by nonpharmaceutical interventions. *Science* 369(6507):1106-1109. doi:10.1126\u002Fscience.abc9004\n- Kosakovsky Pond SL, Weaver S, Leigh Brown AJ, Wertheim JO (2018) HIV-TRACE (TRAnsmission Cluster Engine): A tool for large-scale molecular epidemiology of HIV-1 and other rapidly evolving pathogens. *Mol Biol Evol* 35(7):1812-1819. doi:10.1093\u002Fmolbev\u002Fmsy016\n- Mather AE, Reid SWJ, Maskell DJ et al (2013) Distinguishable epidemics of multidrug-resistant Salmonella Typhimurium DT104 in different hosts. *Science* 341(6153):1514-1517. doi:10.1126\u002Fscience.1240578\n- Itokawa K, Sekizuka T, Hashino M, Tanaka R, Kuroda M (2020) Disentangling primer interactions improves SARS-CoV-2 genome sequencing by multiplex tiling PCR. *PLoS ONE* 15(9):e0239403. doi:10.1371\u002Fjournal.pone.0239403\n\n## Related Skills\n\n- pathogen-typing - SNP-cluster \u002F cgMLST cluster definition feeds transmission inference\n- phylodynamics - Time-scaled tree from BactDating \u002F BEAST \u002F TreeTime feeds TransPhylo\n- amr-surveillance - Resistant-clone outbreak inference combines AMR + transmission\n- variant-surveillance - Lineage assignment cross-checks transmission cluster boundaries\n- phylogenetics\u002Fdivergence-dating - Calibrated trees for non-pathogen contexts\n- phylogenetics\u002Fbayesian-inference - BEAST mechanics beyond outbreak phylodynamics\n- comparative-genomics\u002Fwhole-genome-alignment - Core-genome alignment for SNP-typing\n- variant-calling\u002Fvcf-basics - Per-isolate variant calls for SNP-typing\n- variant-calling\u002Fvariant-calling - SNP calling that feeds snp-dists\n- read-alignment\u002Fbwa-alignment - Read mapping upstream\n- data-visualization\u002Fnetwork-visualization - Transmission tree visualisation\n- workflows\u002Fsomatic-variant-pipeline - End-to-end orchestration patterns\n","## Version Compatibility\n\nReference examples tested with: TransPhylo 1.4+ (R), outbreaker2 1.2+ (R), phybreak 0.5+ (R), BadTrIP via BEAST 2.7+ package manager, BEASTLIER via BEAST 1.10+, transcluster 1.0+ (R), HIV-TRACE 1.5+, snp-dists 0.8+, ape 5.8+ (R), igraph 1.6+ (R), TreeTime 0.11+, BactDating 1.1+ (R), BEAST 2.7.6+, lofreq 2.1+, deepSNV via Bioconductor 3.18+, pandas 2.2+, BioPython 1.84+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- R: `packageVersion('TransPhylo')`; `?inferTTree` to confirm arg names\n- R: `packageVersion('outbreaker2')`; `?create_config` -- iteration count is set via `n_iter` in the `config` object, NOT as `iters` to `outbreaker()`\n- Python: `pip show lofreq`; check whether deep variant calling supports the target MAF\n- CLI: `snp-dists --help`; `hiv-trace --help`\n\nIf R rejects an argument, the function signature changed between minor releases; `?function_name` is authoritative.\n\n# Transmission Inference\n\n**\"Who infected whom in this outbreak, and is this even an outbreak?\"** -> Pick the question first (cluster definition vs WIWS who-infected-whom vs source attribution), then the method that fits the data (rich epi + dense sampling -> outbreaker2; sparse sampling + good dated tree -> TransPhylo; longitudinal within-host samples -> BEASTLIER \u002F BadTrIP; rapid surveillance triage -> SNP-distance with pathogen-tuned threshold). Genomic distance is necessary but not sufficient for direction: two isolates 3 SNPs apart could be A->B, B->A, A->Unknown->B, or two-from-one common source. Direction inference requires temporal data, within-host diversity, contact-tracing data, or all three.\n\n- R: `outbreaker2::outbreaker(data=outbreaker_data(dates=..., dna=..., w_dens=..., f_dens=..., ctd=...), config=create_config(n_iter=1e6))` -- dense outbreak with contact data\n- R: `TransPhylo::inferTTree(ptree, mcmcIterations=1e5, w.shape=1.3, w.scale=10)` -- sparse outbreak from a dated tree\n- CLI: `snp-dists -c gubbins.filtered_polymorphic_sites.fasta > pairwise.csv` -- pairwise SNP for cluster triage\n- CLI: `hiv-trace --threshold 0.015` -- HIV cluster definition at the US-CDC default (subtype B); reconsider for non-B subtypes\n\n## The Single Most Important Modern Insight -- There is no universal SNP cutoff for transmission\n\nThe pathogen-specific SNP threshold varies by 10x across taxa (TB \u003C=12 SNPs, *C. difficile* \u003C=2, MRSA \u003C=15, *Salmonella* cgMLST \u003C=5, *Klebsiella* \u003C=21, SARS-CoV-2 not defined by SNP alone). Substitution rate, recombination, generation time, within-host diversity, and (for Mpox) APOBEC3 editing all vary by 100x. Walker 2013 *Lancet Infect Dis* 13:137 derived the TB \u003C=12 SNP cutoff from UK Oxfordshire (low-transmission, contact-traced, household settings); applying the same threshold in Cape Town or Mumbai inflates apparent recent-transmission rates 2-5x because clonal isolates linked through long-past common ancestors get pooled with truly recent transmissions. Worby, Lipsitch & Hanage 2014 *PLoS Comput Biol* 10:e1003549 formally showed that within-host bacterial diversity puts an irreducible upper bound on the resolution of SNP-distance transmission-network reconstruction even with repeated sampling. Always cite the pathogen-specific source AND its derivation population; never apply a threshold outside its validated context without an explicit caveat. For TB \u002F HIV \u002F chronic infections, naive SNP cutoffs fail because of reactivation and within-host coalescence -- use TransPhylo or outbreaker2 with within-host-aware priors.\n\n## Algorithmic Taxonomy\n\n| Tool | Mechanism | Inputs | Output | Strength | Fails when |\n|------|-----------|--------|--------|----------|------------|\n| Pairwise SNP threshold (snp-dists; cluster picker) | Count SNPs between pairs; threshold + linkage | Core-SNP alignment | Adjacency at threshold | Fast; intuitive; standard for surveillance triage | Pathogen-specific cutoff; convergent evolution and recombination violate distance assumptions |\n| HIV-TRACE (Kosakovsky Pond 2018 *Mol Biol Evol* 35:1812) | TN93 pairwise distance + threshold (default 1.5%) | HIV-1 pol or other gene | Cluster membership | CDC standard for US HIV surveillance | 1.5% threshold is US-CDC subtype B specific; under-clusters subtype C in southern Africa |\n| outbreaker2 (Campbell 2018 *BMC Bioinformatics* 19:363) | MCMC; sequence + generation-interval + sampling-time + contact-tracing | Dated genomes + epi data | Posterior WIWS + unsampled intermediates + R_e | Integrates epi data explicitly; modular likelihood | ~100-200 cases practical limit; assumes one infection event per case (no within-host populations) |\n| TransPhylo (Didelot 2017 *Mol Biol Evol* 34:997) | Coalescent within-host + birth-death between-host; colours a dated tree | Time-scaled tree + sampling dates | Posterior transmission tree + R_t + unsampled cases | Works from a tree, not raw genomes; scales to ~1000 tips; explicit within-host coalescence | Sensitive to within-host effective population size prior; requires good dated phylogeny |\n| phybreak (Klinkenberg 2017 *PLoS Comput Biol* 13:e1005495) | Joint phylogeny + transmission inference via MCMC | Dated genomes | Posterior transmission tree | Proper within-host handling; fast for small outbreaks | \u003C=100 cases; less benchmarked than outbreaker2\u002FTransPhylo |\n| BadTrIP (De Maio 2018 *PLoS Comput Biol* 14:e1006117) | Bayesian; explicit handling of multi-strain infections | Dated genomes | Posterior transmission tree with strain-level resolution | Handles within-host diversity \u002F mixed infections (TB, HIV) | Slow; specialist tool |\n| SCOTTI (De Maio 2016 *PLoS Comput Biol* 12:e1005130) | Structured-coalescent transmission inference (BEAST 2 package) | Dated genomes | Posterior transmission tree under structured coalescent | Sampling-aware; correctly models unsampled intermediates | Computationally heavy; specialist setup |\n| BEASTLIER (Hall 2015 *PLoS Comput Biol* 11:e1004613) | Joint phylogeny + transmission partitioning | Dated genomes; ideally with multiple isolates per host | Posterior transmission tree with within-host partition | Postdoc-grade identifiability with within-host samples | Single-isolate-per-host data is under-identified |\n| transcluster (Stimson 2019 *Mol Biol Evol* 36:587) | Per-pair posterior probability under SNP + time prior | Dated genomes | Per-pair cluster membership probability | Probabilistic; pathogen-tuned priors | Pair-level only; no full transmission tree |\n| Sobel Leonard 2017 *J Virol* 91:e00171-17 beta-binomial bottleneck | Estimate transmission bottleneck size from donor-recipient deep sequencing | Donor + recipient deep-sequence allele frequencies | Bottleneck Nb posterior | Estimates an otherwise unobservable quantity | Requires deep-sequenced donor-recipient pairs |\n| islandR \u002F Bayesian source attribution (Mather 2013 *Science* 341:1514) | Bayesian per-population allele-frequency model | Reference collections per host source + query genome | Per-source posterior probability | Standard in Salmonella \u002F Campylobacter food-safety surveillance | Source-attribution circularity: trained-on-distribution reproduces that distribution |\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended approach | Why wrong choices fail |\n|----------|----------------------|------------------------|\n| \"Is this even an outbreak?\" routine surveillance triage | `snp-dists` after Gubbins; pathogen-tuned threshold (Walker 2013 for TB, Eyre 2013 for C. diff, EFSA cgMLST \u003C=5 for Salmonella); cross-check cgMLST distance | Universal SNP threshold across pathogens (10x variation) |\n| Densely sampled outbreak with contact-tracing data | outbreaker2 with `ctd` contact matrix + generation-time prior + sampling-time prior | TransPhylo without epi data (loses information from contacts); naive SNP threshold (ignores within-host diversity) |\n| Sparsely sampled, longer-time-scale outbreak | TransPhylo on a BactDating-derived dated tree | outbreaker2 (sampling-completeness assumption broken); SNP threshold inflates clusters with unsampled intermediates |\n| TB outbreak with possible reactivation | TransPhylo + transcluster with TB-tuned priors; long within-host coalescent matters | SNP cutoff insufficient -- reactivation can have 0 SNPs from years-old strains |\n| Hospital outbreak with possible mixed infection | BadTrIP \u002F SCOTTI | Consensus-only methods (SNP distance, outbreaker2) ambiguous on mixed-strain |\n| Multi-site outbreak with import suspected | TransPhylo + MASCOT-derived migration; source-attribution as separate analysis | Source attribution needs phylogeographic component beyond TransPhylo alone |\n| Food-vehicle \u002F environmental source attribution | islandR \u002F Bayesian source attribution (Mather 2013 framework); manual cluster + phylogeographic plot | Naive phylogenetic placement loses the per-source priors |\n| Sub-sampled outbreak (\u003C50% cases sequenced) | outbreaker2 (handles unsampled cases explicitly with `pi` sampling parameter) | Raw SNP cutoff -- unsampled intermediates break SNP-distance reasoning |\n| Recombining pathogen (S. pneumo, E. coli STEC, K. pneumoniae) | Gubbins \u002F ClonalFrameML mask FIRST; then any of the above | Recombination inflates apparent SNP distance and creates false convergent transmission inference |\n| HIV cluster definition | HIV-TRACE 1.5% for subtype B (US-CDC standard); reconsider for non-B subtypes | Applying 1.5% threshold globally without subtype caveat |\n| Estimate transmission bottleneck | Sobel Leonard 2017 beta-binomial on deep-sequenced donor-recipient pairs | Consensus-only sequences cannot quantify bottleneck size |\n\nMethodology evolves; before any high-stakes who-infected-whom claim, web-search \"outbreak transmission inference benchmark \u003Cpathogen> 2025\" for current best practice.\n\n## outbreaker2 With Contact Data\n\n**Goal:** Infer who-infected-whom posterior for a densely sampled outbreak with epi metadata, jointly estimating generation interval and unsampled-case proportion.\n\n**Approach:** Build `outbreaker_data` with sampling dates, DNA alignment, generation-time density `w_dens`, sampling-time density `f_dens`, and contact-tracing matrix `ctd`; configure MCMC via `create_config(n_iter=N)`; run; summarise posterior over WIWS.\n\n```r\nlibrary(outbreaker2)\nlibrary(ape)\n\ndna \u003C- read.dna('alignment.fasta', format='fasta')\ndates \u003C- read.csv('sampling_dates.csv')\nctd_matrix \u003C- as.matrix(read.csv('contact_matrix.csv', row.names=1))\n\nw_dens \u003C- dgamma(1:30, shape=2.5, scale=2)  # generation time prior\nf_dens \u003C- dgamma(1:30, shape=2, scale=3)    # sampling-time prior\n\ndata \u003C- outbreaker_data(dates=dates$collection_date, dna=dna,\n                        w_dens=w_dens, f_dens=f_dens, ctd=ctd_matrix)\n\ncfg \u003C- create_config(n_iter=1e6, sample_every=200, find_import=TRUE)\n\nres \u003C- outbreaker(data=data, config=cfg)\nsummary(res)\n```\n\n`w_dens` is the generation-time distribution (time from infection of A to infection of B) -- NOT the serial interval (time between symptom onsets); using one in place of the other biases inference. Britton & Scalia Tomba *J R Soc Interface* 16:20180670 (2019) formalised the bias for emerging epidemics; for SARS-CoV-2 with substantial pre-symptomatic transmission (Ali 2020 *Science* 369:1106), the serial interval shortened from 7.8 to 2.2 days under NPI, and naive SI-based inference was biased.\n\n## TransPhylo From a Dated Tree\n\n**Goal:** Infer transmission tree posterior from a time-scaled phylogeny when raw genomes are not directly usable or when the outbreak is too large for outbreaker2 (>200 cases).\n\n**Approach:** Time-scale the tree first (BactDating after Gubbins for bacteria; BEAST or TreeTime for viruses); convert to TransPhylo `ptree` with `ptreeFromPhylo`; run `inferTTree` with generation-time prior and within-host effective population size prior; summarise via `medTTree` (medoid transmission tree) and posterior probabilities per WIWS pair.\n\n```r\nlibrary(TransPhylo)\nlibrary(ape)\n\ntree \u003C- read.nexus('dated_tree.nexus')\ndate_last_sample \u003C- 2024.95\n\nptree \u003C- ptreeFromPhylo(tree, dateLastSample=date_last_sample)\n\nw.shape \u003C- 1.3\nw.scale \u003C- 10\nws.shape \u003C- 1.1\nws.scale \u003C- 7\nneg \u003C- 0.5\n\nres \u003C- inferTTree(ptree, mcmcIterations=1e5,\n                  w.shape=w.shape, w.scale=w.scale,\n                  ws.shape=ws.shape, ws.scale=ws.scale,\n                  startNeg=neg, dateT=date_last_sample + 0.1)\n\nmed_tree \u003C- medTTree(res)\npairs \u003C- extractTTree(med_tree)$ttree\n```\n\n`w.*` is the generation-time Gamma prior; `ws.*` is the sampling-time Gamma prior. Both must reflect the pathogen's biology (e.g., TB w.scale = months; SARS-CoV-2 w.scale = days). Wrong priors silently bias the transmission-tree posterior.\n\n## SNP-Cluster Definition With Pathogen-Specific Thresholds\n\n**Goal:** Define outbreak clusters from a recombination-masked core-SNP alignment using the published pathogen-specific threshold, with the threshold's source population caveated.\n\n**Approach:** Snippy -> snippy-core -> Gubbins on `core.full.aln` for bacteria -> snp-dists -> single-linkage clustering at the pathogen-specific threshold; cite Walker 2013 (TB), Eyre 2013 (C. diff), Coll 2017 (MRSA), Snitkin 2012 (Klebsiella) per organism; flag any extrapolation outside the threshold's validation population.\n\n```bash\nsnippy-core --ref reference.fa --prefix core snippy_out\u002F*\nrun_gubbins.py --prefix gubbins core.full.aln\nsnp-dists -c gubbins.filtered_polymorphic_sites.fasta > pairwise.csv\n```\n\n```python\nimport pandas as pd\nimport numpy as np\nfrom scipy.cluster.hierarchy import linkage, fcluster\n\ndist = pd.read_csv('pairwise.csv', index_col=0)\ncondensed = dist.values[np.triu_indices(len(dist), k=1)]\n\nTHRESHOLD_TB = 12   # Walker 2013 Lancet Infect Dis 13:137 -- UK low-transmission\nTHRESHOLD_MRSA = 15  # Coll 2017 Clin Infect Dis 65:1781\nTHRESHOLD_CDIFF = 2  # Eyre 2013 NEJM 369:1195\nTHRESHOLD_KPNEUMO = 21  # Snitkin 2012 Sci Transl Med 4:148ra116\n\nlinkage_matrix = linkage(condensed, method='single')\nclusters = fcluster(linkage_matrix, t=THRESHOLD_TB, criterion='distance')\n```\n\n## Per-Method Failure Modes\n\n### Pairwise SNP threshold applied outside its validation population\n\n**Trigger:** Walker 2013 UK 5\u002F12-SNP TB threshold applied to Cape Town or Mumbai high-transmission settings.\n\n**Mechanism:** Walker 2013 *Lancet Infect Dis* 13:137 calibrated the 5\u002F12 SNP threshold on Oxfordshire community \u002F household contact-traced data (low-transmission). In high-prevalence settings, clonal isolates linked through long-past common ancestors fall within the threshold without recent direct transmission.\n\n**Symptom:** Country-level Mtb genomic-epi report shows 60-80% of cases in \"transmission clusters\", far exceeding clinical contact-tracing rates.\n\n**Fix:** Cite the threshold's source population; for high-prevalence settings, derive a local threshold from epidemiologically-anchored case pairs in the local cohort rather than importing a UK-low-transmission cutoff. For transmission-direction claims, supplement with TransPhylo \u002F outbreaker2.\n\n### Direction of transmission asserted from pairwise SNP distance alone\n\n**Trigger:** Outbreak report concluding \"A -> B\" because A has earlier sampling date and 3 SNPs from B.\n\n**Mechanism:** A 3-SNP pairwise difference is consistent with A->B, B->A, Unknown->both, or A->Unknown->B. Worby, Lipsitch & Hanage 2014 *PLoS Comput Biol* 10:e1003549 formalised the irreducible uncertainty. Earlier sampling date does not establish earlier infection date because of within-host evolution and asymptomatic carriage.\n\n**Symptom:** Outbreak conclusions claim directionality without within-host data or contact tracing; reviewers from the Didelot \u002F Worby groups push back.\n\n**Fix:** Use \"transmission consistent with genomics\" not \"transmission demonstrated\". For direction claims, require within-host samples (BEASTLIER), contact-tracing data (outbreaker2 with `ctd`), or both. Cite Worby 2014 as the upper bound on what SNP distance can establish.\n\n### Unsampled intermediates collapsed into A->B direct links\n\n**Trigger:** Outbreak with \u003C50% sequencing coverage; transmission inference assumes all cases sampled.\n\n**Mechanism:** When sampling is incomplete, inferred A->B \"direct\" transmissions are routinely A->Unknown->B chains. This systematically inflates inferred R_e (longer chains compressed), underestimates generation interval, and biases topology toward bushy trees.\n\n**Symptom:** Inferred R_e is implausibly high (each \"tip\" appears to spawn extra children once unsampled intermediates collapse into apparent direct links); generation interval estimate is implausibly short; topology appears bushier than expected.\n\n**Fix:** Use outbreaker2 with explicit `pi` (sampling proportion) parameter, or TransPhylo \u002F SCOTTI which model unsampled intermediates explicitly. Cite the unsampled-intermediates caveat in every transmission-inference report.\n\n### Narrow transmission bottleneck makes consensus-only inference WORSE than coalescent intuition predicts\n\n**Trigger:** Consensus-genome transmission-pair inference for a pathogen with documented narrow bottleneck (influenza 1-2 virions per McCrone 2018 *eLife* 7:e35962; SARS-CoV-2 \u003C10 virions per Lythgoe 2021 *Science* 372:eabg0821).\n\n**Mechanism:** When the transmission bottleneck is narrow, donor and recipient consensus genomes are near-identical *by default* -- the bottleneck strips most within-host diversity. Near-identity therefore does NOT discriminate direct transmission from infection by an unsampled intermediate or from a shared common source. Naive coalescent intuition predicts that \"more transmissions = more divergence\"; the opposite is true under a narrow bottleneck.\n\n**Symptom:** Most pairs in a dense outbreak appear identical or 1 SNP apart; SNP-distance-based cluster definitions become uninformative; transmission-direction claims based on consensus difference are unfalsifiable.\n\n**Fix:** For narrow-bottleneck pathogens, supplement consensus-based methods with deep within-host variant calling (lofreq \u002F deepSNV \u002F VarScan2 at MAF >= 1%) on donor-recipient pairs; estimate bottleneck size explicitly via Sobel Leonard 2017 *J Virol* 91:e00171-17 beta-binomial estimator; report transmission claims as \"consistent with\" rather than \"demonstrated by\" consensus identity. Pair-level resolution requires within-host data; without it, claim only cluster membership, not direction.\n\n### Generation interval and serial interval used interchangeably\n\n**Trigger:** outbreaker2 \u002F EpiNow2 \u002F similar tools fed the serial-interval distribution (`w_dens` set from symptom-to-symptom data) when the model wants generation-interval (infection-to-infection).\n\n**Mechanism:** Generation interval = time from infection of A to infection of B; serial interval = time from symptom onset of A to symptom onset of B. They differ when incubation periods vary or pre-symptomatic transmission is substantial. Britton & Scalia Tomba 2019 *J R Soc Interface* 16:20180670 formalised the bias for emerging epidemics; Ali 2020 *Science* 369:1106 showed for SARS-CoV-2 the SI shortened from 7.8 to 2.2 days under NPI.\n\n**Symptom:** Inferred R_e is biased; comparison to case-based R_t (also often SI-based) shows compounding bias.\n\n**Fix:** Document which distribution `w_dens` actually encodes. For SARS-CoV-2 with substantial pre-symptomatic transmission, generation interval is ~5 days in the ancestral-strain literature; serial interval was ~4-5 days early but shortened to 2-3 under NPI. Cite Britton 2019.\n\n### HIV-TRACE 1.5% threshold applied to non-subtype-B HIV\n\n**Trigger:** HIV-TRACE run on subtype C sequences from southern Africa with the default 1.5% TN93 threshold.\n\n**Mechanism:** Kosakovsky Pond et al 2018 *Mol Biol Evol* 35:1812 documented HIV-TRACE methodology; the 1.5% threshold is the US-CDC default tuned for subtype B in MSM cohorts. Subtype C in southern Africa has higher diversity per unit time and more recent epidemics; the 1.5% threshold under-clusters there.\n\n**Symptom:** Cluster definitions in southern African subtype C HIV surveillance under-detect transmission; comparison to US surveillance literature shows incompatible cluster sizes.\n\n**Fix:** Tune threshold for the local subtype and population; cite the local validation. UKHSA \u002F ECDC use different thresholds; document which.\n\n### Source attribution circularity\n\n**Trigger:** Bayesian source attribution model (Mather 2013 *Science* 341:1514 framework) trained on a reference collection that over-represents one host population.\n\n**Mechanism:** Source-attribution models reproduce the host-distribution of their training data unless explicitly corrected. If 80% of training isolates are from cattle, the model will tend to attribute new isolates to cattle even when the true source is poultry.\n\n**Symptom:** Source attribution reproduces the sampling intensity of the reference collection; conclusions are circular.\n\n**Fix:** Weight by inverse sampling intensity per source category; use rarefied reference collections; report attribution alongside the reference-collection composition as a caveat.\n\n### Primer-scheme dropout misread as real divergence\n\n**Trigger:** SARS-CoV-2 outbreak comparison across samples sequenced with different ARTIC primer schemes (V3 \u002F V4 \u002F V4.1 \u002F V5.3.2); \"differences\" concentrated in one amplicon are interpreted as real SNPs.\n\n**Mechanism:** ARTIC primer dropouts produce N's or reference-derived consensus calls in failed amplicons (Itokawa 2020 *PLoS ONE* 15:e0239403); these LOOK LIKE deletions or reference matches in downstream analysis but are missing data. Cross-scheme comparison without masking failed amplicons produces spurious transmission differences.\n\n**Symptom:** Cluster definitions differ implausibly between ARTIC-V3 and ARTIC-V4.1 samples; \"differences\" cluster in known dropout amplicons (V4.1 amplicons 64, 76, 88-90).\n\n**Fix:** Mask failed amplicons per sample (samtools depth + per-amplicon coverage); document primer scheme version per isolate; for transmission inference, exclude positions in any sample's dropout regions.\n\n## Reconciliation: When Methods Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| outbreaker2 and TransPhylo disagree on WIWS | Different sampling-completeness assumptions; outbreaker2 expects ~dense sampling, TransPhylo handles sparse | Pick the method whose assumption matches the data; cite the choice |\n| SNP threshold cluster and outbreaker2 cluster differ | SNP threshold ignores temporal data and contacts | Trust outbreaker2 (integrates more evidence); SNP cluster is triage only |\n| Two consecutive Pangolin versions give different lineage for a \"transmission pair\" | Lineage definitions revised | Re-run both samples against a single Pango \u002F pangolin-data version |\n| TB cluster definition flips between 5 and 12 SNP threshold | Walker 2013 ambiguous range | Run TransPhylo for transmission-direction posterior; report SNP-distance with cluster picker certainty |\n| HIV cluster differs between HIV-TRACE 1.5% and 2.0% | Threshold sensitivity at boundary | Subtype-specific calibration; cite the chosen threshold's validation |\n| Source attribution differs between islandR runs with different reference panels | Sampling-intensity bias | Re-run with rarefied or inverse-weighted reference; report multiple scenarios |\n\n## Quantitative Thresholds\n\n| Pathogen | \"Outbreak cluster\" threshold | Source \u002F rationale |\n|----------|------------------------------|--------------------|\n| *Mycobacterium tuberculosis* (whole-genome core SNP) | \u003C=12 SNPs (likely transmission); \u003C=5 SNPs (recent transmission) | Walker 2013 *Lancet Infect Dis* 13:137 (UK low-transmission setting) |\n| *Staphylococcus aureus* (core genome) | \u003C=15 SNPs (within hospital outbreak); \u003C=40 SNPs (broader temporal cluster) | Coll 2017 *Clin Infect Dis* 65:1781 |\n| *Klebsiella pneumoniae* (KPC outbreak) | \u003C=21 SNPs | Snitkin 2012 *Sci Transl Med* 4:148ra116 |\n| *Salmonella enterica* (cgMLST EnteroBase) | \u003C=5 allelic differences (cluster); \u003C=7 (extended cluster) | EnteroBase \u002F EFSA harmonised |\n| *Listeria monocytogenes* (PulseNet cgMLST) | \u003C=4 allelic differences | PulseNet protocol convention |\n| *E. coli* (cgMLST, EnteroBase) | \u003C=10 allelic differences (STEC outbreak) | EnteroBase convention |\n| *Neisseria gonorrhoeae* | \u003C=25 core SNPs (transmission) | UKHSA STI framework |\n| *Clostridioides difficile* (core SNP, recombination-masked) | \u003C=2 SNPs (likely direct); \u003C=10 (plausible within 6 months) | Eyre 2013 *NEJM* 369:1195 |\n| SARS-CoV-2 (whole-genome) | No fixed cutoff; 0-2 SNPs + epi link + sampling window | Lythgoe 2021 *Science* 372:eabg0821 |\n| HIV-1 subtype B (TN93 distance) | 1.5% genetic distance (HIV-TRACE default; US-CDC standard) | Kosakovsky Pond 2018 *Mol Biol Evol* 35:1812 |\n| Mpox clade IIb | \u003C=2 SNPs cluster threshold; APOBEC3 editing inflates apparent distance | Mpox 2022 outbreak APOBEC3-editing literature |\n| Transmission bottleneck -- influenza | ~1-2 virions (narrow) | McCrone 2018 *eLife* 7:e35962 |\n| Transmission bottleneck -- SARS-CoV-2 | \u003C10 virions (tight) | Lythgoe 2021 *Science* 372:eabg0821 |\n| Generation interval -- SARS-CoV-2 ancestral | ~5 days | SARS-CoV-2 ancestral-strain literature |\n\nCRITICAL: a number from one pathogen does NOT transfer to another. Always cite the source population.\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| outbreaker2 rejects `iters` arg | Iterations set via `n_iter` in the `config` object | `create_config(n_iter=N)` |\n| TransPhylo MCMC fails to converge | Within-host Ne prior misspecified; bad input tree | Tune `startNeg`; verify tree dating quality |\n| Cluster definition flips between linkage methods | Single-linkage vs complete-linkage on borderline pairs | Document; sensitivity analysis |\n| outbreaker2 estimates implausible R_e | Sampling proportion mis-specified | Set `pi` based on epi knowledge or estimate within outbreaker2 |\n| Transmission inferred between two distant lineages | Recombination unmasked | Run Gubbins on `core.full.aln` first |\n| HIV-TRACE clusters incompatible across labs | Different subtype calibration | Document subtype; use locally validated threshold |\n| Source attribution always pointing at one host | Reference-collection bias | Re-weight or rarify reference panel |\n| `snp-dists -t` rejected | `-t` flag doesn't exist; default IS tab; `-c` for CSV | Use `-c` for CSV; default for TSV |\n| Snippy outputs disagree across samples | Different reference; reference mismatch silently shifts SNP coordinates | Always document reference; use same reference cross-lab |\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Response |\n|----------|----------|\n| \"What SNP threshold and on what population?\" | Cite Walker 2013 \u002F Eyre 2013 \u002F Coll 2017 per pathogen; caveat the population if extrapolating |\n| \"Were unsampled intermediates handled?\" | outbreaker2 `pi` parameter or TransPhylo \u002F SCOTTI explicit modelling; never a raw SNP-distance method on sub-sampled data |\n| \"Direction of transmission inference?\" | Within-host samples + contact tracing required for direction; otherwise \"consistent with\" phrasing |\n| \"Generation interval vs serial interval?\" | Documented `w_dens` source; cite Britton 2019 if SI used as approximation for GI |\n| \"Why TransPhylo \u002F outbreaker2 \u002F phybreak?\" | Decision tree based on sampling completeness, dataset size, contact-tracing availability |\n| \"Was within-host diversity considered?\" | TransPhylo's within-host coalescent OR BadTrIP for mixed-strain; bottleneck size from Sobel Leonard 2017 if relevant |\n| \"HIV-TRACE 1.5% threshold outside subtype B?\" | Acknowledged US-CDC subtype B origin; either use locally validated threshold or document caveat |\n| \"Source attribution sampling-intensity bias?\" | Re-weighted reference collection or rarified; cite Mather 2013 limitation |\n| \"Was forward simulation run as a sanity check?\" | SLiM \u002F FAVITES \u002F SEEDY if claims are high-stakes; routinely under-done in published transmission inference |\n\n## References\n\n- Worby CJ, Lipsitch M, Hanage WP (2014) Within-host bacterial diversity hinders accurate reconstruction of transmission networks from genomic distance data. *PLoS Comput Biol* 10(3):e1003549. doi:10.1371\u002Fjournal.pcbi.1003549\n- Campbell F, Didelot X, Fitzjohn R, Ferguson N, Cori A, Jombart T (2018) outbreaker2: a modular platform for outbreak reconstruction. *BMC Bioinformatics* 19(Suppl 11):363. doi:10.1186\u002Fs12859-018-2330-z\n- Didelot X, Fraser C, Gardy J, Colijn C (2017) Genomic infectious disease epidemiology in partially sampled and ongoing outbreaks. *Mol Biol Evol* 34(4):997-1007. doi:10.1093\u002Fmolbev\u002Fmsw275\n- Klinkenberg D, Backer JA, Didelot X, Colijn C, Wallinga J (2017) Simultaneous inference of phylogenetic and transmission trees in infectious disease outbreaks. *PLoS Comput Biol* 13(5):e1005495. doi:10.1371\u002Fjournal.pcbi.1005495\n- De Maio N, Worby CJ, Wilson DJ, Stoesser N (2018) Bayesian reconstruction of transmission within outbreaks using genomic variants. *PLoS Comput Biol* 14(4):e1006117. doi:10.1371\u002Fjournal.pcbi.1006117\n- De Maio N, Wu CH, Wilson DJ (2016) SCOTTI: efficient reconstruction of transmission within outbreaks with the structured coalescent. *PLoS Comput Biol* 12(9):e1005130. doi:10.1371\u002Fjournal.pcbi.1005130\n- Hall M, Woolhouse M, Rambaut A (2015) Epidemic reconstruction in a phylogenetics framework: transmission trees as partitions of the node set. *PLoS Comput Biol* 11(12):e1004613. doi:10.1371\u002Fjournal.pcbi.1004613\n- Stimson J, Gardy J, Mathema B et al (2019) Beyond the SNP threshold: identifying outbreak clusters using inferred transmissions. *Mol Biol Evol* 36(3):587-603. doi:10.1093\u002Fmolbev\u002Fmsy242\n- Walker TM, Ip CLC, Harrell RH et al (2013) Whole-genome sequencing to delineate Mycobacterium tuberculosis outbreaks: a retrospective observational study. *Lancet Infect Dis* 13(2):137-146. doi:10.1016\u002FS1473-3099(12)70277-3\n- Coll F, Harrison EM, Toleman MS et al (2017) Longitudinal genomic surveillance of MRSA in the UK reveals transmission patterns in hospitals and the community. *Clin Infect Dis* 65(11):1781-1789. doi:10.1093\u002Fcid\u002Fcix645\n- Eyre DW, Cule ML, Wilson DJ et al (2013) Diverse sources of C. difficile infection identified on whole-genome sequencing. *N Engl J Med* 369(13):1195-1205. doi:10.1056\u002FNEJMoa1216064\n- Snitkin ES, Zelazny AM, Thomas PJ et al (2012) Tracking a hospital outbreak of carbapenem-resistant Klebsiella pneumoniae with whole-genome sequencing. *Sci Transl Med* 4(148):148ra116. doi:10.1126\u002Fscitranslmed.3004129\n- Lythgoe KA, Hall M, Ferretti L et al (2021) SARS-CoV-2 within-host diversity and transmission. *Science* 372(6539):eabg0821. doi:10.1126\u002Fscience.abg0821\n- McCrone JT, Woods RJ, Martin ET et al (2018) Stochastic processes constrain the within and between host evolution of influenza virus. *eLife* 7:e35962. doi:10.7554\u002FeLife.35962\n- Sobel Leonard A, Weissman DB, Greenbaum B, Ghedin E, Koelle K (2017) Transmission bottleneck size estimation from pathogen deep-sequencing data, with an application to human influenza A virus. *J Virol* 91(14):e00171-17. doi:10.1128\u002FJVI.00171-17\n- Britton T, Scalia Tomba G (2019) Estimation in emerging epidemics: biases and remedies. *J R Soc Interface* 16(150):20180670. doi:10.1098\u002Frsif.2018.0670\n- Ali ST, Wang L, Lau EHY et al (2020) Serial interval of SARS-CoV-2 was shortened over time by nonpharmaceutical interventions. *Science* 369(6507):1106-1109. doi:10.1126\u002Fscience.abc9004\n- Kosakovsky Pond SL, Weaver S, Leigh Brown AJ, Wertheim JO (2018) HIV-TRACE (TRAnsmission Cluster Engine): A tool for large-scale molecular epidemiology of HIV-1 and other rapidly evolving pathogens. *Mol Biol Evol* 35(7):1812-1819. doi:10.1093\u002Fmolbev\u002Fmsy016\n- Mather AE, Reid SWJ, Maskell DJ et al (2013) Distinguishable epidemics of multidrug-resistant Salmonella Typhimurium DT104 in different hosts. *Science* 341(6153):1514-1517. doi:10.1126\u002Fscience.1240578\n- Itokawa K, Sekizuka T, Hashino M, Tanaka R, Kuroda M (2020) Disentangling primer interactions improves SARS-CoV-2 genome sequencing by multiplex tiling PCR. *PLoS ONE* 15(9):e0239403. doi:10.1371\u002Fjournal.pone.0239403\n\n## Related Skills\n\n- pathogen-typing - SNP-cluster \u002F cgMLST cluster definition feeds transmission inference\n- phylodynamics - Time-scaled tree from BactDating \u002F BEAST \u002F TreeTime feeds TransPhylo\n- amr-surveillance - Resistant-clone outbreak inference combines AMR + transmission\n- variant-surveillance - Lineage assignment cross-checks transmission cluster boundaries\n- phylogenetics\u002Fdivergence-dating - Calibrated trees for non-pathogen contexts\n- phylogenetics\u002Fbayesian-inference - BEAST mechanics beyond outbreak phylodynamics\n- comparative-genomics\u002Fwhole-genome-alignment - Core-genome alignment for SNP-typing\n- variant-calling\u002Fvcf-basics - Per-isolate variant calls for SNP-typing\n- variant-calling\u002Fvariant-calling - SNP calling that feeds snp-dists\n- read-alignment\u002Fbwa-alignment - Read mapping upstream\n- data-visualization\u002Fnetwork-visualization - Transmission tree visualisation\n- workflows\u002Fsomatic-variant-pipeline - End-to-end orchestration patterns\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","mixed","2026-09-20","epidemiological-genomics\u002Ftransmission-inference\u002FSKILL.md","TransPhylo","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-epidemiological-genomics-transmission-inference","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-epidemiological-genomics-transmission-inference",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-epidemiological-genomics-transmission-inference",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-epidemiological-genomics-transmission-inference","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-epidemiological-genomics-transmission-inference\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Ftransmission_inference.py","SCRIPT","脚本",8635,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-epidemiological-genomics-transmission-inference\u002Fexamples\u002Ftransmission_inference.py",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",11231,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-epidemiological-genomics-transmission-inference\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]