get_tree | R Documentation |
For some taxa groups, there are multiple posterior megatrees. It is a common task to derive a phylogeny from each of these (or a random subset of) megatrees.
get_tree(
sp_list,
tree,
taxon = NULL,
scenario = c("at_basal_node", "random_below_basal"),
show_grafted = FALSE,
tree_by_user = FALSE,
mc_cores = future::availableCores() - 2,
.progress = "text",
fish_tree = c("timetree", "all-taxon"),
mammal_tree = c("vertlife", "phylacine"),
bee_tree = c("maximum-likelihood", "bootstrap"),
dt = TRUE
)
sp_list |
A character vector or a data frame with at least three columns: species, genus, family. Species column holds the species for which we want to have a phylogeny. It can also have two optional columns: close_sp and close_genus. We can specify the closest species/genus of the species based on expert knowledge. If specified, the new species will be grafted to that particular location. It can also be a string vector if |
tree |
A mega-tree with class
|
taxon |
The taxon of species in the |
scenario |
How to insert a species into the mega-tree?
|
show_grafted |
Whether to indicate which species was grafted onto the mega-tree.
If |
tree_by_user |
Is the mega-tree provided by user? Default is |
mc_cores |
Number of cores to parallel processing when |
.progress |
Form of progress bar, default to be text. |
fish_tree |
Which fish tree do you want to use? If it is "timetree" (default), it will be the smaller time tree with 11638 species that all have sequence data; if it is "all-taxon", then it will be the 100 larger posterior phylogenies with 31516 soecues. |
mammal_tree |
Which set of mammal trees to use? If it is "vertlife" (default), then 100 randomly selected posterior phylogenies provided by Vertlife will be used; if it is "phylacine", then 100 randomly selected posterior phylogenies provided by PHYLACINE will be used. |
bee_tree |
Which bee tree to use? If it is "maximum-likelihood" (default), the a single maximum likelihood tree will be used. If it is "bootstrap", then a set of 100 randomly selected posterior phylogenies will be used. All trees are provided by the Bee Tree of Life. |
dt |
Whether to use data.table version to bind tips bind_tip. The default is |
Derive a phylogeny from a mega-tree
For a list of species, generate a phylogeny or multiple phylogenies from a provided mega-tree or mega-trees. If a species is not in the mega-tree, it will be grafted to the mega-tree with two scenarios.
A phylogeny for the species required, with class phylo
;
or a list of phylogenies with class multiPhylo
depends on the input tree
. Within each phylogeny, the grafted status of all species was saved as a data frame named as "graft_status".
test_sp = c("Serrasalmus_geryi", "Careproctus_reinhardti", "Gobiomorphus_coxii",
"Periophthalmus_barbarus", "Prognichthys_glaphyrae", "Barathronus_bicolor",
"Knipowitschia_croatica", "Rhamphochromis_lucius", "Neolissochilus_tweediei",
"Haplochromis_nyanzae", "Astronesthes_micropogon", "Sanopus_reticulatus")
test_tree = get_tree(sp_list = test_sp,
taxon = "fish",
show_grafted = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.