Read posterior trees from 'MrBayes' output files, discarding burn-in generations.
ReadMrBayesTrees(filepath, n = NULL, burninFrac = NULL)
ReadMrBayes(filepath, n = NULL, burninFrac = NULL)
MrBayesTrees(filepath, n = NULL, burninFrac = NULL)
character string specifying path to .nex
input file used
to initialize the MrBayes analysis,
relative to the R working directory (visible with getwd()
).
Integer specifying number of trees to sample from posterior.
Fraction of trees to discard from each run as burn-in.
If NULL
(the default), this will be read from the last mcmc
or mcmcp
command in filepath
.
ReadMrBayesTrees()
returns a 'multiPhylo' object containing
n
trees sampled evenly from all runs generated by analysis of filepath
,
or NULL
if no trees are found.
ReadMrBayesTrees()
samples trees from the posterior distributions
computed using the Bayesian inference software 'MrBayes'
Other tree import functions:
ReadTntTree()
if (FALSE) # Download will take a few seconds
url <-
"https://raw.githubusercontent.com/ms609/hyoliths/master/MrBayes/hyo.nex"
trees <- ReadMrBayesTrees(url, n = 40)
#> Error in readLines(filepath, warn = FALSE): 'con' is not a connection
plot(Consensus(trees, p = 0.5))
#> Error in Consensus(trees, p = 0.5): Expecting `trees` to be a list.