treeMCMCtree | R Documentation |
Outputs a tree file to be used in MCMCtree. The path to this file needs to be written next to the option "treefile = " in the control file for MCMCtree.
treeMCMCtree(tree, aln, filename)
tree |
Character, path to the file with the tree topology in Newick format, without branch lengths (see details). |
aln |
Character, path to the alignment file output by
|
filename |
Character, name for the output file. |
If you used write.morpho
or proc2MCMCtree
and passed a vector or a list with the ages of the specimens in your
alignment, you will see that the names in the output file with this
alignment are followed by a "^" and a value. This value is transformed
to the age you input within MCMCtree, as if it was a tip date, and used
to estimate the divergence times of the species in your phylogeny.
This function generates a tree file with the same species names than in
the morphological alignment, i.e. with the ages to be used by MCMCtree
next to the names of each specimen.
Remember to write the path to the tree file next to the "treefile = "
option in the control file to run MCMCtree.
Remember that the names without "^" followed by the ages have to be the
same in the file you pass to parameter "tree" than the ones you have
in the alignment file passed to "aln".
# Use the file with the tree topology (no branch lengths) and the
# file with the morphological alignment that are saved in the
# inst/extdata directory to generate a tree file with the
# ages used by MCMCtree included.
# We call the output tree file "treefile.txt".
tree <- system.file( "extdata", "19s.trees", package = "mcmc3r")
aln <- system.file( "extdata", "seqfile.aln", package = "mcmc3r")
treeMCMCtree( tree = tree, aln = aln, filename = "treefile.txt" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.