The user wants me to design a phylodynamics outbreak study.
Key elements to cover:
- Sampling strategy: How to collect genetic data during an outbreak for phylodynamic analysis.
- Priors: How to set up the Bayesian statistical framework (usually BEAST or similar).
- Sensitivity analysis: How to test the robustness of the results.
This is a high-level methodological question. I need to structure the answer as a guide or a protocol.
Step 1: Conceptualizing the Study
- Scenario: Let's assume a generic acute viral outbreak (e.g., Ebola, Zika, or a novel Coronavirus) in a defined region. This makes the advice concrete.
- Goal: Estimate key parameters like Re (effective reproductive number), growth rate, migration rates, and prevalence over time.
Step 2: Sampling Strategy (The "Input")
- Representativeness is key. Phylodynamics infers population dynamics from a sample. If the sample is biased, the dynamics are biased.
- Temporal spacing: Need samples spread across the epidemic curve (early, peak, decline) to estimate evolutionary rates and population size changes.
- Spatial structure: If the outbreak covers multiple regions, need samples from all regions to estimate migration.
- Sample Size: More is generally better, but breadth matters more than depth for skyline plots. Targeted sampling (e.g., superspreading events) requires specific models.
- Metadata: Collection date is non-negotiable. Location is crucial. Host info is useful.
Step 3: The Bayesian Framework (The "Engine")
- Software: BEAST2 or BEAST 1.10 are the standards. Nextstrain for real-time "quick" looks (though less focused on priors).
- Substitution Model: GTR+I+G is standard.
- Molecular Clock:
- Strict vs. Relaxed. Outbreaks are usually short, so a Strict Clock often works, but Relaxed (Uncorrelated Lognormal) is safer if multiple hosts or long duration.
- Prior on rate: Need a reasonable guess based on similar viruses (e.g., 10−3 to 10−4 subs/site/year).
- Tree Prior (Coalescent vs. Birth-Death): This is the core of phylodynamics.
- Coalescent (Skyline/BDSKY): Good for retrospective analysis of population size.
- Birth-Death Models (BDSKY): Better for epidemiology (estimates , become uninfectious rate).
Step 4: Sensitivity Analysis (The "Validation")
- Convergence: ESS (Effective Sample Size) > 200. Tracer is the tool.
- Prior Robustness: Does the posterior move away from the prior? If Posterior = Prior, data has no signal.
- Model Comparison:
- Strict vs. Relaxed Clock.
- Coalescent vs. Birth-Death.
- Marginal Likelihood Estimation (MLE) via Path Sampling or Stepping Stone.
- Temporal Signal: Root-to-tip regression (TempEst) to check if there's enough evolution to estimate dates.
- Recombination: A major confounder. Must check and remove recombinants (RDP4) or use methods that handle it (though standard BEAST doesn't like it).
Step 5: Structuring the Output
I will structure the response into three main sections corresponding to the prompt: Sampling Design, Model & Priors, and Sensitivity/Validation. I'll use a hypothetical "Scenario X" (e.g., a novel zoonosis) to illustrate.
Drafting the Content - Section 1: Sampling
Focus on:
- Bias mitigation (sentinel surveillance vs. convenience sampling).
- Density vs. Breadth.
- The "missing middle" problem (sampling gaps).
Drafting the Content - Section 2: Priors/Model
Focus on:
- The Tree Prior (BDSKY is the gold standard for outbreaks now).
- The Clock Prior (informative vs. uninformative).
- The tMRCA (time to most recent common ancestor).
Drafting the Content - Section 3: Sensitivity
Focus on:
- ESS values.
- Robustness checks (changing priors slightly).
- Model selection (AICM/BF).
Refining details:
- Mention specific distributions (e.g., LogNormal(1,1)).
- Mention the difference between parametric (exponential growth) and non-parametric (skygrid) models.
Self-Correction/Review during drafting:
- Initial thought: Suggest Skyline for everything.
- Correction: Skyline gives effective population size (Neτ), which is hard to translate to epidemiology (Re) without knowing generation time. Birth-Death Skyline (BDSKY) is better for outbreaks because it estimates directly. I will prioritize BDSKY.
Final Polish:
Organize with clear headings. Use bold text for key terms. Add a concluding summary about interpretation.
(Self-Correction on Priors): Make sure to warn against uniform priors (0, Infinity) as they are usually improper or computationally inefficient. Recommend LogNormal or Exponential for positive values.
Let's write it out.
Designing a phylodynamic outbreak study requires a tight integration between epidemiological field work and computational Bayesian statistics. Unlike a standard phylogenetic study, the goal here is to infer transmission dynamics (e.g., Re, migration rates) and prevalence through time directly from genetic sequence data.
Below is a design framework for a robust study, broken into Sampling Design, Prior Selection, and Sensitivity Analysis.
Part 1: Sampling Design (The Input)
Phylodynamics is heavily reliant on the quality and structure of the input data. A biased sample leads to biased dynamics (e.g., inferring a decline in cases simply because testing was reduced).
1. Temporal and Spatial Stratification
- Temporal Breadth: You must sample continuously throughout the outbreak, not just at the peak.
- The "tMRCA" constraint: To estimate the start of the outbreak, you need early viruses.
- The "Rate" constraint: To estimate the molecular clock (mutations per year), you need viruses separated by weeks or months.
- Spatial Structure: If the outbreak covers multiple regions, you must sample proportionally from all regions to infer migration (phylogeography). If you only sample Region A, the analysis will falsely conclude the virus originated in Region A.
2. Sampling Proportion (ρ)
In Birth-Death Skyline (BDSKY) models, the sampling proportion is a critical parameter.
- Goal: Aim to sequence a consistent percentage of clinical cases over time (e.g., 5% of all reported cases).
- Avoid: "Convenience sampling" (e.g., sequencing 100 samples from one superspreader event and 10 samples from the community). This distorts the estimation of the effective reproductive number (Re).
3. Sequence Quality & Consistency
- Use an amplicon-based tiling approach (e.g., Artic Network protocol) to ensure consistent genome coverage.
- Remove samples with >10% Ns (ambiguous bases) to prevent false phylogenetic signals.
Part 2: Model Selection and Priors (The Engine)
We generally assume a Bayesian framework (e.g., using BEAST or BEAST2). The choice of priors should reflect biological knowledge but be weak enough to let the data speak.
1. The Tree Prior (The Epidemiological Model)
- Coalescent Skyline (Non-parametric):
- Use case: Retrospective analysis where population size fluctuates unpredictably.
- Prior: Provides effective population size (Ne) through time.
- Birth-Death Skyline (Parametric):
- Use case: Active outbreaks where you want to estimate Re.
- Key Priors:
- (Reproductive Number): LogNormal prior (e.g., LogNormal(1, 1)). This allows for values > 1 but constrains it from being biologically impossible (e.g., of 100).
2. The Molecular Clock
- Strict Clock: Only use if the outbreak is very short (<1 year) or the virus is very stable.
- Relaxed Clock (Uncorrelated Lognormal): Standard for RNA viruses (SARS-CoV-2, Influenza, Ebola).
- Prior on Rate: LogNormal. Check NextStrain or previous literature for the rate.
- Example: For SARS-CoV-2, a rate of ≈1×10−3 subs/site/year is standard. Set a LogNormal prior centered here, but with a wide spread (standard deviation 1.0) to allow the data to update it.
3. The Substitution Model
- HKY+G or GTR+G.
- Priors: Generally use the default flat priors for nucleotide frequencies and Gamma shape parameters. The data almost always dominates these priors.
Part 3: Sensitivity Analysis (The Validation)
To publish a high-quality phylodynamic study, you must prove your results are driven by the data, not by your initial assumptions.
1. Temporal Signal Analysis
Before running the full analysis, verify that your data has sufficient evolutionary change over time.
- Test: Perform a Root-to-Tip regression analysis (using TempEst).
- Check: Is there a linear relationship between genetic divergence and sampling date? If R2 is low, the clock signal is weak, and dated tip-dating will be unreliable.
2. Prior vs. Posterior Comparison
- The Test: Compare the marginal prior distribution (the assumption) with the marginal posterior distribution (the result).
- Failure Mode: If the Posterior looks exactly like the Prior, your genetic data contains no information about that parameter.
- Success Mode: The Posterior is significantly narrower and shifted compared to the Prior.
3. Parametric Sweeps (The "What If" Scenario)
Run the analysis multiple times altering specific parameters to see if Re estimates change.
- Clock Rate Sensitivity:
- Run A: Fix the clock rate to the literature minimum.
- Run B: Fix the clock rate to the literature maximum.
- Result: Does the estimated peak of the outbreak shift significantly? If so, report the range.
- Generation Time Sensitivity:
- The BDSKY model requires the "infectious period." If you assume 5 days vs. 10 days, your Re estimate will double. Run the model with both bounds to provide a confidence interval on Re based on epidemiological uncertainty.
4. Model Comparison (Marginal Likelihoods)
Use Path Sampling or Stepping Stone sampling to compare models.
- Question: Does the data fit a Relaxed Clock better than a Strict Clock? (Check Bayes Factors).
- Question: Does a BDSKY model fit better than a simple Coalescent Exponential model?
Summary Checklist for the Study
| Component | Recommendation |
|---|
| Sampling | Systematic, proportional sampling across time and space. |
| Tree Prior | Birth-Death Skyline (BDSKY) for real-time Re estimation. |
| Clock | Relaxed Lognormal with LogNormal prior centered on literature rates. |
| Sensitivity | Compare Prior vs. Posterior; Test bounds of generation time. |
| Software | BEAST2 (with BDSKY package) or EpiPhylo (R). |