MyNixOS website logo
Description

Phylogenetic Analysis with Dependent Discrete Models.

Implementation of dependent discrete models (with reversible jump MCMC) derived from 'BayesTraits' V5.0.3 <https://github.com/AndrewPMeade/BayesTraits-Release/tree/Release>. Original software copyright Andrew Meade and contributors, distributed under GPL-3. Modifications for this package by Vivian G. Li <[email protected]>. The following articles should be referenced when using this package: Pagel, M., A. Meade and D. Barker (2004) "Bayesian estimation of ancestral character states on phylogenies" <doi:10.1080/10635150490522232>; Pagel, M. (1994) "Detecting correlated evolution on phylogenies: a general method for the comparative analysis of discrete characters" <doi:10.1098/rspb.1994.0006>; Pagel, M. and A. Meade (2006) "Bayesian analysis of correlated evolution of discrete characters by reversible-jump Markov chain Monte Carlo" <doi:10.1086/503444>.

overview

This package is an R implementation (of dependent discrete models) derived from 'BayesTraits' V5.0.3 (https://github.com/AndrewPMeade/BayesTraits-Release/tree/Release).

major differences from BayesTraits, limitations, and other things to note

  • This implementation takes numeric (e.g. c(0.25, 0.25, 0.25, 0.25)) input as root state frequencies (specified by 'pis' command in BayesTraits V5.0.3, which allows only 'none', 'uniform' or 'empirical'). This would enable analyses that take reconstructed probabilities at the root (from previous analyses) as input.
  • Character file must contain two fully-specified binary traits. It must not contain NA values or multi-valued taxa.
  • Tree file expects a list of trees. If you only have a single tree, put it inside a list first, e.g.
treeset<-list()
treeset[[1]]<-ttree
  • Reversible jump MCMC, with or without hyper priors are supported.
  • MCMC without reversible jump, is supported.
  • Supports one prior for all rates.

examples

#load test data

libarary(rphylo)

data(ttree)
data(tdata)
data(ttree2)
data(tdata2)

xx<-list()
xx[[1]]<-ttree
#m1: model with 
#   - exponential prior, whose mean is drawn from (hyper prior) uniform (0,10). 
#   - MCMC is used but without reversible jump. 
#   - State frequencies are set equal.

m1<-run_dep_model(xx,
   charfile    = tdata,
   burnin      = 1000,
   iterations  = 10000,
   sample_freq = 1000,
   prior       = list(type = "exponential"),
   hp          =list(mean     = c(0, 10)),
   revjump        = F,
   recon_nodes = NULL,
   tags        = NULL,
   pis         = c(1,1,1,1),
   seed        = 42
 )
 
m1$rates 
#m2: model with 
#   - exponential prior, whose mean is 10. 
#   - RJMCMC,
#   - State frequencies are set as following empirical distribution.

m2<-run_dep_model(ttree2,
   charfile    = tdata2,
   burnin      = 1000,
   iterations  = 100000,
   sample_freq = 1000,
   prior       = list(type = "exponential", mean=10),
   hp          = NULL,
   revjump     = TRUE,
   recon_nodes = c("root_node"),
   tags        =list(root_node = ttree2[[1]]$tip.label),
   pis         = get_emp_freq(tdata),
   seed        = 42
 )
 
m2$rates 

#get posterior probs for reconstructed node
m2$anc

citation

If you use this package in your research, please cite:

  • Pagel, M., A. Meade and D. Barker (2004). "Bayesian estimation of ancestral character states on phylogenies." Systematic biology 53(5): 673-684.

  • Pagel, M. (1994). "Detecting correlated evolution on phylogenies: a general method for the comparative analysis of discrete characters." Proceedings of the Royal Society of London. Series B: Biological Sciences 255(1342): 37-45.

  • Pagel, M. and A. Meade (2006). "Bayesian analysis of correlated evolution of discrete characters by reversible-jump Markov chain Monte Carlo." The American Naturalist 167(6): 808-825.

license

GPL-3

Metadata

Version

0.1.1

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows