swapONE | R Documentation |
The function produces an alternative phylogeny with altered topology and branch length, and computes the Kuhner-Felsenstein (Kuhner & Felsenstein 1994) distance between original and 'swapped' tree.
swapONE(tree,node=NULL,si=0.5,si2=0.5,plot.swap=FALSE)
tree |
a phylogenetic tree. The tree needs not to be ultrametric or fully dichotomous. |
node |
if specified, the clades subtended by such |
si |
the proportion of tips whose topologic arrangement will be swapped. |
si2 |
the proportion of nodes whose age will be changed. |
plot.swap |
if |
swapONE
changes the tree topology and branch lengths. Up to
half of the tips, and half of the branch lengths can be changed randomly.
Each randomly selected node is allowed to move up to 2 nodes apart from its
original position.
The function returns a list containing the 'swapped' version of the original tree, and the Kuhner-Felsenstein distance between the trees. Note, tip labels are ordered according to their position in the tree.
Silvia Castiglione, Pasquale Raia, Carmela Serio, Alessandro Mondanaro, Marina Melchionna, Mirko Di Febbraro, Antonio Profico, Francesco Carotenuto
Kuhner, M. K. & Felsenstein, J. (1994). A simulation comparison of phylogeny algorithms under equal and unequal evolutionary rates, Molecular Biology and Evolution, 11: 459-468.
## Not run:
data("DataOrnithodirans")
DataOrnithodirans$treedino->treedino
## Case 1. change the topology and the branch lengths for the entire tree
swapONE(tree=treedino,si=0.5,si2=0.5,plot.swap=FALSE)
## Case 2. change the topology and the branch lengths of the
## tree by keeping the monophyly of a specific clade
swapONE(tree=treedino,node=422,si=0.5,si2=0.5,plot.swap=FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.