mrbayes: Bayesian MCMC Tree Search with MrBayes

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

Description

Provides a wrapper for Bayesian phylogenetic tree search through MrBayes (Huelsenbeck & Ronquist, 2001; Ronquist & Huelsenbeck, 2003).

Usage

1
2
mrbayes(x, file = "", lset, prset, mcmc, unlink, constraint,
        burnin = 10, contype = "allcompat", exec, run = FALSE)

Arguments

x

An object of class DNAbin in the case of mrbayes.

file

A character string, giving the name of the MrBayes input file.

lset

A list as returned by mrbayes.lset containing the parameter settings of the model of molecular evolution.

prset

A list as returned by mrbayes.prset containing the parameter setting for the prior distributions.

mcmc

A list as returned by mrbayes.mcmc containing the parameter setting for the Markov chain Monte Carlo (MCMC).

unlink
constraint
burnin

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

contype

A 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).

exec

A character string giving the full path of the MrBayes program.

run

Logical; run = FALSE will only print the NEXUS file, run = TRUE will also start the MCMC runs, if exec is correctly specified.

Details

mrbayes was last updated and tested with MrBayes v3.2.2 under R 3.1.0 on a x86_64-apple-darwin10.8.0 (64-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

J. P. Huelsenbeck & Ronquist F. 2001. MrBayes: Bayesian inference of phylogenetic trees. Bioinformatics 17: 754-755.

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

MrBayes website: http://mrbayes.sourceforge.net/.

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
11
12
13
14
15
	
data(ips.cox1)
x <- ips.cox1[, 100:140] # tiny alignment
mrbayes(x, file = "", mcmc = mrbayes.mcmc(ngen = 100), run = FALSE)

## Not run: 

library(phangorn)
tree <- rtree(10)
Y1 <- simSeq(tree, l = 20)
Y2 <- simSeq(tree, l = 20, type = "USER", levels=c("0", "1"))
Y <- cbind(as.character(Y1), as.character(Y2))
mrbayes(Y, file = "", run = FALSE)

## End(Not run)

ips documentation built on July 4, 2019, 5:04 p.m.