Description Usage Arguments Value Author(s) Examples
Extract a BEAST2 posterior tree from a file
1 | get_posterior_tree(file, sti, ai, pi, si)
|
file |
A loaded parameter file |
sti |
the species tree index, a value from 1 to and including 2 |
ai |
the alignment index, the ai-th alignment of that species tree, a value from 1 to and including the number of alignments per species tree |
pi |
the posterior index, the pi-th posterior of that alignment, a value from 1 to and including the number of posteriors per alignment |
si |
the posterior state index, the si-th state in the posterior, a value from 1 to and including the number of posterior states per posterior |
the posterior
Richel Bilderbeek
1 2 3 4 5 6 7 8 9 10 11 | # Read a file with one or more posteriors
file <- read_file(find_path("toy_example_1.RDa"))
# Pick the indices of the posterior to extract
sti <- 1 # Species tree index
ai <- 1 # Alignment index
pi <- 1 # Posterior index
si <- 1 # Posterior state index
# Extract the posterior
tree <- get_posterior_tree(file = file, sti = sti, ai = 1, pi = 1, si = 1)
# Check that it is indeed a phylogeny
testit::assert(ribir::is_phylogeny(tree))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.