Learn R Programming

phylodyn

The purpose of phylodyn is to facilitate phylodynamic inference and analysis in an approachable R package.

Installation

  1. Install (if necessary) package dependencies and helpers ape, spam and devtools using install.packages.

  2. Install INLA using install.packages("INLA", repos="https://www.math.ntnu.no/inla/R/stable")

  3. Load devtools using library(devtools).

  4. Install phylodyn using

    a. install_github("mdkarcher/phylodyn"), or

    b. install_github("mdkarcher/phylodyn", build_vignettes = TRUE) if you want some illustrative vignettes (note: using build_vignettes = TRUE will make the install take longer).

Vignettes

  1. SimpleBNPR: A short example showing how to use BNPR and BNPR-PS on simulated data, illustraring methodology in [2] and [5].

  2. NewYorkInfluenza: A case study analyzing influenza data from New York, reproducing analysis in [5] on data from [1].

  3. RegionalInfluenza: A case study analyzing influenza data from nine geographic regions, reproducing analsyis in [5] on data from [3].

  4. RegionalSeasonality: A case study analyzing influenza seasonality from nine geographic regions, reproducing analsyis in [5] on data from [3].

  5. SimplePhyloinfer: A short example comparing BNPR with a split HMC MCMC sampler approach, illustrating methodology in [4].

  6. LongPhyloinfer: A longer example comparing BNPR with multiple MCMC samplers, including split HMC as in SimplePhyloinfer, illustrating methodology in [4].

  7. LocalGenealogies: A short example of MCMC-based inference of effective population size trajectories from a sequence of local genealogies. Genealogies are assumed to be a realization of the Sequentially Markov Coalescent (SMC') model. The methodology is developed in [6]

Datasets

Datasets below can be found at: https://github.com/mdkarcher/PhyloData/

  1. New York influenza BEAST XML for inferring genealogy using sequence data from [1].

    • NewYork.xml
  2. Regional influenza BEAST XML for inferring genealogy using sequence data from [3].

    • Europe.xml
    • India.xml
    • JapanKorea.xml
    • NorthChina.xml
    • Oceania.xml
    • SouthAmerica.xml
    • SouthChina.xml
    • SoutheastAsia.xml
    • USACanada.xml

References

  1. A. Rambaut, O. G. Pybus, M. I. Nelson, C. Viboud, J. K. Taubenberger, E. C. Holmes

The genomic and epidemiological dynamics of human influenza A virus. Nature, 453(7195): 615–619, 2008.

  1. J. A. Palacios and V. N. Minin.

Integrated nested Laplace approximation for Bayesian nonparametric phylodynamics. In Proceedings of the Twenty-Eighth International Conference on Uncertainty in Artificial Intelligence, pages 726–735, 2012.

  1. D. Zinder, T. Bedford, E. B. Baskerville, R. J. Woods, M. Roy, M. Pascual.

Seasonality in the migration and establishment of H3N2 Influenza lineages with epidemic growth and decline. BMC Evolutionary Biology, 14(1): 272, 2014.

  1. S. Lan, J. A. Palacios, M. Karcher, V. N. Minin, and B. Shahbaba

An Efficient Bayesian Inference Framework for Coalescent-Based Nonparametric Phylodynamics, Bioinformatics, 31(20): 3282-3289, 2015.

  1. M. D. Karcher, J. A. Palacios, T. Bedford, M. A. Suchard, and V. N. Minin.

Quantifying and mitigating the effect of preferential sampling on phylodynamic inference. PLOS Computational Biology, 12:e1004789, 2016.

  1. J.A Palacios, J. Wakeley, and S. Ramachandran. Bayesian nonparametric inference of population size changes from sequential genealogies. Genetics Vol. 201:281-304, 2015.

Copy Link

Version

Install

install.packages('phylodyn')

Monthly Downloads

2

Version

0.9.0

License

GPL-3

Maintainer

Michael Karcher

Last Published

May 3rd, 2017

Functions in phylodyn (0.9.0)

BNPR

Bayesian nonparametric phylodynamic reconstruction.
Bottle_20c

Bottle_20c
exp_traj

Exponential trajectory
find_info2

Extracts all sufficient statistics for inferring Ne from sequential local genealogies
generate_newick

Returns a phylo object from the argumentes generated with coalsim
hist2heat

Plot heatmap of a histogram
inla.models

INLA wrapper
logistic_traj

Seasonal logistic trajectory
smcp_sampling

SMC' sampler--inference from local genealogies
steep_cyc_traj

Steep cyclical trajectory
unif_traj

Uniform trajectory.
NY_flu

New York Influenza Genealogy
boombust_traj

Boom and bust trajectory
plot_BNPR

Plot a BNPR output
plot_mrw

Plot Mean Relative Widths
plot_res

Plot SMCP Results
plot_seasonality

Plot Seasonality
summarize_phylo

Summarize a phylogeny.
traj_beta

Raise a trajectory function to a power
create_F

Generates a matrix with ranked tree shape information
cyclic_traj

Cyclical trajectory
ml_exp_coal

Maximum likelihood exponential model
phylodyn-package

Tools for analyzing genealogy and genome sequence data using INLA and MCMC.
posterior_coal_check

Posterior predictive check for coalescent model
posterior_samp_check

Posterior predictive check for inhomogenous Poisson process sampling model
bottleneck_traj

Bottleneck trajectory
coalsim

Simulate from inhomogeneous, heterochronous coalescent
mcmc_sampling

MCMC Sampling
pref_sample

Sample preferentially
read_times

Extracts coalescent times from a Multi-Phylo object
mesa_traj

Mesa trajectory
regional_flu

Regional Influenza Genealogy
sloped_traj

Sloped trajectory