The user wants a plan for an outbreak phylodynamics study.
The request covers specific technical components: sampling strategy, clock priors, tree priors, skyline models, and sensitivity analyses.
The context is likely an infectious disease outbreak (e.g., viral like SARS-CoV-2, Ebola, Influenza, or perhaps a bacterial pathogen).
Goal: Create a comprehensive, structured plan that guides a researcher through designing such a study using Bayesian phylodynamic methods (primarily BEAST or similar software).
Key Components to Address:
-
Study Objective & Context: Define what "outbreak" means here. High transmission? Fast evolution? Need to define the biological question (transmission rate, migration, population size changes).
-
Sampling Strategy:
- Temporal: Sampling over time is crucial for molecular clock models.
- Spatial: Sampling across locations is crucial for spatial diffusion.
- Density: Uniform vs. biased sampling (e.g., sampling only severe cases).
- Sample Size: Computational limits vs. statistical power.
-
Molecular Clock Models:
- Strict vs. Relaxed.
- How to choose?
- Prior selection (e.g., uniform vs. lognormal).
-
Tree Priors (Coalescent vs. Birth-Death):
- Coalescent: Classical population genetics. Good for retrospective analysis of effective population size (Ne).
- Constant, Exponential, Skyline (GMRF/Skygrid).
- Birth-Death: Epidemiological parameters (R0, becoming non-infectious rate).
- BDSky (Birth-Death Skyline).
-
Skyline Models (specific focus):
- Bayesian Skyline (piece-wise constant).
- Skygrid (Gaussian Markov Random Field - smooths over time).
- Epidemiological implications.
-
Sensitivity Analyses:
- Testing priors.
- Subsetting data (temporal/spatial).
- Model comparison (Path sampling/Stepping stone).
- Removing outliers (clock behavior).
Drafting the Structure:
- Phase 1: Study Design & Sampling Strategy
- Temporal range: Need enough evolutionary change.
- Representativeness: Avoid ascertainment bias if possible.
- Sample size: Mention subsampling techniques if N is too high (e.g., Nextstrain subsampling).
- Phase 2: Model Selection (The BEAST/Phylogenetics part)
- Substitution Model: GTR+I+G (standard), but use ModelTest or bModelTest.
- Clock Model: Strict vs. Relaxed (Lognormal). Justification based on data heterogeneity.
- Tree Prior: This is the "Phylodynamics" core.
- Option A: Coalescent (if focusing on Ne trends). Skygrid is best for outbreaks.
- Option B: Birth-Death Skyline (if estimating Re).
Refining the Content:
- Clock Priors: Mention that the default uniform priors on rates often aren't great if the signal is low, but usually data dominates. The correlation is important (lognormal vs. uncorrelated). Self-correction: Focus on Strict vs Relaxed. For a fast outbreak (RNA virus), Relaxed is often safer, but if sampling is short, Strict might hold.
- Tree Priors: The user specifically asked about "Skyline models".
- Coalescent Bayesian Skyline: Changes in Ne. Discrete steps.
- Skygrid: Continuous time.
- BDSky: Changes in Re (Reproductive number). This is often preferred for "outbreaks" because is the metric public health wants, whereas is abstract genetic diversity.
Formatting: Use headings, bullet points, and bold text for readability. Keep the tone professional and academic.
Detailed Walkthrough of Specific Points:
-
Sampling:
- Sampling proportion matters for BDSky. If you don't know ρ, you fix it or estimate it. If sampling is heterogeneous, use "BDSky with sampled ancestors" or "Birth-Death Serial Sampling".
- Temporal resolution: Sampling needs to cover the exponential growth phase to detect it.
-
Clock:
- Check "temporal signal" first using a root-to-tip regression (TempEst). If R2 is low, phylodynamics will fail.
-
Priors:
- Clock Rate: If R2 is good, a narrow lognormal prior centered on the regression slope helps convergence.
Review against User Prompt:
- Sampling Strategy? Yes.
- Clock/Tree Priors? Yes.
- Skyline Models? Yes.
- Sensitivity Analyses? Yes.
Self-Correction during drafting: Ensure I distinguish clearly between the Coalescent Skyline (population genetics view) and the Birth-Death Skyline (epidemiological view), as users often conflate them. I should recommend BDSky for outbreak scenarios specifically, as it estimates Re directly, which is usually the goal.
Let's structure the final output logically:
- Introduction/Objectives.
- Data Collection (Sampling).
- Model Specification (Substitution, Clock, Tree).
- Skyline Specifics.
- Validation & Sensitivity.
- Summary/Workflow tools.
Let's write it out.
Note on tools: Mentioning BEAST2, BEAST v1.10, Tracer, TreeAnnotator, and TempEst adds practical value.
Note on Priors:
- Clock Rate: Use a continuous quantile parameterization or specify a lognormal if you have an external rate estimate.
- Pop Size: Use a 1/x prior (inverse gamma) or lognormal depending on implementation.
- Group sizes: For Bayesian Skyline, usually set groups = N/5 or similar rule of thumb, or use Skygrid.
Final Polish: Make sure the distinction between "Effective Population Size" (Ne) and "Number of Infections" (N) is implied but the focus remains on the methodological setup.
Let's generate the response.
This plan outlines a comprehensive strategy for conducting a phylodynamic analysis of an outbreak (e.g., a viral epidemic like Ebola, Zika, or SARS-CoV-2). This workflow assumes the use of Bayesian inference methods, typically implemented in BEAST2 or BEAST v1.10, and focuses on converting sequence data into epidemiological insights.
Phase 1: Sampling Strategy & Data Preparation
Before modeling, the data must be structured to capture the underlying epidemiological dynamics without introducing systematic biases.
1. Temporal and Spatial Breadth
- Sampling Range: Samples should span the entire duration of the outbreak if possible, or at least the exponential growth phase. Missing early samples often leads to underestimation of the growth rate.
- Frequency: Aim for "measurably evolving populations." For fast-evolving viruses (RNA), sampling over weeks or months is usually sufficient. For slower pathogens (DNA), longer timeframes are needed.
- Geographic Stratification: If the outbreak covers multiple regions, ensure sampling is proportional to reported case counts in those regions to avoid "ghost" transmission lineages (unsampled diversity).
2. Sequencing Representation
- Sample Size (N):
- Small Outbreak (N<100): Include all high-quality genomes.
- Large Outbreak (N>500): Use subsampling. Avoid random subsampling; instead, use stratified sampling (e.g., selecting x samples per week per region) to maintain even temporal signal.
- Metadata: Ensure precise collection dates (ideally to the day) and geographic coordinates.
3. Quality Control
- Remove sequences with >5−10% missing data (ambiguities disrupt clock estimation).
- Remove potential contaminants or sequences with excessive unique mutations that suggest sequencing errors rather than biological evolution (use a quick ML tree to spot outliers).
Phase 2: Molecular Clock Models
The molecular clock converts genetic divergence into time. The choice depends on the evolutionary rate variance among lineages.
1. Strict Clock
- Use Case: Small datasets, short timeframes (e.g., a single transmission chain within months), or low diversity.
- Prior:
ucld.mean (LogNormal).
- Tip: If you have a prior estimate of the rate (e.g., 1×10−3 subs/site/year), set the mean of the LogNormal to that value. If unknown, use a broad uniform prior (e.g., [0,1]).
2. Relaxed Clock (Uncorrelated Lognormal - UCLN)
- Use Case: Most outbreak scenarios involving multiple transmission chains or moderate diversity. It allows rates to vary across branches.
- Prior:
ucld.stdev.
- Sensitivity: If the posterior distribution of
ucld.stdev touches 0, the data supports a Strict Clock. If it is clearly >0, the Relaxed Clock is necessary.
3. Tip-Dating Validation
- Run a Root-to-Tip regression (using TempEst) before running the full MCMC.
- Check the R2 and slope. If there is no correlation between genetic distance and time, phylodynamic analysis will fail (clock signal is absent).
Phase 3: Tree Priors (The Phylodynamics Core)
This is where the "dynamics" are modeled. The choice depends on the epidemiological question.
Option A: Coalescent Models (Population Genetics View)
These model the Effective Population Size (Ne) through time.
- Coalescent Exponential Growth: Good for the very initial phase of an outbreak.
- Coalescent Bayesian Skyline (CBS): The standard non-parametric model. It allows Ne to change flexibly over time without enforcing a specific growth function.
- Parameter:
groupSize (number of coalescent events per interval).
- Skygrid: A newer alternative to Skyline that estimates Ne at specific time points (grid points) rather than coalescent events. It is generally more robust for large datasets.
Option B: Birth-Death Models (Epidemiological View) (Recommended for Outbreaks)
These model transmission, recovery, and sampling directly.
- Birth-Death Skyline (BDSKY):
- Estimates Re (effective reproductive number), becoming uninfectious rate (δ), and sampling proportion (s).
- Prior Choice: Use a LogNormal prior for R (centered around 1 or 2) and the "Become Uninfectious" rate. Fix the "Sampling Proportion" if you know what fraction of cases were sequenced (e.g., 0.01 for 1%); otherwise, give it a Beta or Uniform prior.
Recommendation: Run BDSKY if you want Re estimates. Run Skygrid if you want a visual of genetic diversity expansion.
Phase 4: Skyline Model Tuning
If using a Bayesian Skyline or Skygrid:
1. Dimensionality
- Skyline: Define the number of groups (m).
- Rule of thumb: m=Ntaxa/5.
- Risk: Too many groups leads to noisy estimates; too few smooths over distinct epidemic waves.
- Skygrid: Define the grid cut-off (time to most recent common ancestor + some buffer) and the number of grid points.
2. Priors
- The
popSize parameter is usually log-transformed.
- Use a
1/X (Jeffreys) prior or a broad LogNormal prior for population size to allow the model to explore both small and large values effectively.
Phase 5: Sensitivity Analyses & Model Validation
You must prove your results are robust to model assumptions.
1. Clock Model Sensitivity
- Run the analysis with both Strict and Relaxed Clocks.
- Compare the demographic reconstructions (Ne or Re through time).
- Validation: Do the credible intervals overlap? If the Skyline shape changes drastically between clock models, your temporal signal is weak.
2. Prior Sensitivity
- Clock Rate: Vary the clock rate prior significantly (e.g., one order of magnitude higher and lower). Does the posterior clock rate shift drastically? If yes, the data lacks "time signal," and you may need to fix the clock rate based on external literature.
- Demographic Priors: If using BDSKY, check sensitivity to the "Become Uninfectious" rate prior by fixing it to different values (e.g., 1 year vs. 1 week infectious period) to see how it affects Re.
3. Temporal Subsampling
- Remove the earliest 10% of sequences and rerun the analysis.
- Does the root date (TMRCA) shift predictably? If the TMRCA stays the same, you may have missing unsampled diversity before your earliest sequence.
4. Model Selection (Marginal Likelihoods)
- Use Path Sampling (PS) or Stepping Stone (SS) sampling to calculate the marginal likelihood of the model.
- Compare:
- Model 1: Constant Size vs. Model 2: Exponential Growth vs. Model 3: Skyline.
- This provides statistical evidence for which demographic narrative (e.g., "constant population" vs "growing population") best fits the data.
Summary of Proposed Analysis Pipeline
- Alignment & QC: Mask problematic sites, ensure even temporal coverage.
- Prelim Analysis: Check TempEst for clock signal (R2>0.2 ideally).
- BEAST Setup:
- Clock: Relaxed Lognormal (UCLN).
- Tree Prior: Birth-Death Skyline (BDSKY).
- Priors: Broad LogNormal on clock rate; Beta distribution on sampling proportion (if unknown).
- Run: Run MCMC until ESS > 200 (usually 50M–100M steps for complex models).
- Sensitivity: Re-run with Strict Clock and BDSKY to compare Re trajectories.