madRoot | R Documentation |
Finds the root of an unrooted phylogenetic tree by minimizing the relative deviation from the molecular clock.
madRoot(tree, output_mode = 'phylo')
tree |
unrooted tree string in newick format or a tree object of class 'phylo'. |
output_mode |
amount of information to return. If 'phylo' (default) only the rooted tree is returned. If 'stats' also a structure with the ambiguity index, clock cv, the minimum ancestor deviation and the number of roots. If 'full' also an unrooted tree object, the index of the root branch, the branch ancestor deviations and a rooted tree object. |
This function is a slight modification of the code provided by Tria et al at https://www.mikrobio.uni-kiel.de/de/ag-dagan/ressourcen.
a rooted tree and supplementary information if required.
Tria, F. D. K., Landan, G. and Dagan, T.
Tria, F. D. K., Landan, G. and Dagan, T. Nat. Ecol. Evol. 1, 0193 (2017).
## Not run: a <- msa(sequences=c("RAPGT", "KMPGT", "ESGGT"), ids = letters[1:3])$ali
rownames(a) <- letters[1:3]
tr <- mltree(a)$tree
rtr <- madRoot(tr)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.