knitr::opts_chunk$set(echo = TRUE)

MCMC algorithm

phangornMCMC is implements several Bayesian phylogenetics in R. It is a branch of coalescentMCMC of Emmanual Paradis. The implementation is rather inefficient and slow and does not target to compete for speed with other MCMC software like RevBayes, MrBayes, BPP or BEAST. It is targeted for teaching purposes.

Adopted from Yang 2014

  1. Start with random (unrooted or ultrametric) tree T with set of branch length. better start with fastME or UPGMA / WPGMA tree coalescentMCMC
  2. Iterate the following steps: a. Propose tree rearrangement start with NNI from colaescentMCMC b. Propose changes to edge weights sliding window?? (TODO) exponential prior (gamma prior) c. Propose changes to substitution parameter (bf and Q) bf (TODO) dirichlet prior Q (TODO) dirichlet prior d. Propose changes to gamma rate or invariant sites invariant sites beta prior e. Every k iteration, sample the chain save tree and parameters
  3. At the end summarize results

Priors and proposals for the different parameters

| Data type | State frequencies | Substitution rates | |-------------|-------------------|--------------------| | Nucleotides | fixed / estimated | fixed / estimated | | | (Dirichlet) | (Dirichlet) |

bf = "equal", "empirical", "estimate". In case estimate, we have to define prior, proposal step and Hastings ratio.

Tree rearrangements and edge length changes

NNI for unrooted trees

rNNI

Use proportional scaling for unrooted trees, Hastings factor is $c = x'/x$.

NNI for rooted trees

rNNI for rooted trees

Yang 2014



KlausVigo/phangornMCMC documentation built on May 23, 2019, 4:23 p.m.