mrbayes: Bayesian MCMC Tree Search with MrBayes

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function provides a wrapper to Bayesian phylogenetic tree search through MrBayes (Ronquist & Huelsenbeck, 2003) with either DNA (mrbayes) or morphological (mrbayes.mixed) data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mrbayes(x, file = "", nst = 6, rates = "invgamma", ngammacat = 4, 
    nruns = 2, ngen = 1e+06, printfreq = 100, samplefreq = 10, 
    nchains = 4, savebrlens = "yes", temp = 0.2, burnin = 10, 
    contype = "allcompat", run = FALSE)


mrbayes.mixed(x, file, nst = 6, rates = "invgamma", ngammacat = 4, nruns = 2, 
	ngen = 1e+06, printfreq = 100, samplefreq = 10, nchains = 4,
	savebrlens = "yes", temp = 0.2, burnin = 10, contype = "allcompat", 
	path = "/Applications/mrbayes-3.1.2/", run = TRUE)

Arguments

x

object of class DNAbin in the case of mrbayes or a matrix of mode character in the case of mrbayes.mixed

file

character string, giving the name of the MrBayes input file

nst

integer giving the number of rates in the model of sequence evolution

rates

character string; allowed are "equal", "gamma", "propinv", "invgamma", and "adgamma"; the default is "equal"

ngammacat

integer; the number rate categories for the discretized Gamma distribution; the default is 4

nruns

integer; the number of runs

ngen

integer; the number of states of the MCMC

printfreq

integer; the interval between states of the MCMC to be printed on the screen

samplefreq

integer; the interval between states of the MCMC to be sampled

nchains

integer; number of Metropolis coupled MCMCs in each run

savebrlens

logical; shall branch lengths be saved

temp
burnin

integer; the number of samples from the MCMC to be discarded prior to further analysis

contype

character string; the type of consensus tree calculated from the posterior distribution of trees: either "halfcompat" (majority-rule consensus tree) or "allcombat" (strict consensus tree)

path

characters string; the filename to be used for the MrBayes input file

run

logical; run = FALSE will only print the NEXUS file, run = TRUE will also start the MCMC runs, if the path argument is correctly specified

Details

mrbayes was developed and tested with MrBayes v3.2.0 under R 2.14.1 on a Mac 10.6.8/32-bit platform. It is intended to offer a simply parameterized building block for larger scripts.

Value

None; a NEXUS file with MrBayes block is written to a file and, if run = TRUE, the MCMC runs in MrBayes are started.

Author(s)

Christoph Heibl

References

Ronquist F. & J. P. Huelsenbeck. 2003. MrBayes 3: Bayesian phylogenetic inference under mixed models. Biometrics 19: 1572-1574.

MrBayes website: http://mrbayes.scs.fsu.edu/.

See Also

mafft and prank for sequence alignment; raxml for maximum likelihood tree search.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	
# DNA sequence data:
# ------------------
data(woodmouse)
x <- woodmouse[,1:60] # tiny alignment

# print NEXUS file with MrBayes block to working directory
# --------------------------------------------------------
mrbayes(x, file = "", ngen = 100, run = FALSE)
    

fmichonneau/phyloch documentation built on May 16, 2019, 1:45 p.m.