Description Usage Arguments Details Value Author(s) References See Also Examples
The function attaches new tips and/or clades derived from a source phylogeny to a pre-existing backbone tree.
1 2 |
backbone |
the backbone tree to attach tips/clades on. |
data |
a dataset including as columns:
See details for further explanations. |
source.tree |
the tree where 'bind' clades are to be extracted from. If no clade has to be attached, it can be left unspecified. |
age.offset |
if the most recent age (i.e. the maximum distance from the tree root) differs between the source and the backbone trees, the “age.offset” is the difference between them in this exact order (source minus backbone). It is positive when the backbone tree attains younger age than the source tree, and vice-versa. |
tip.ages |
as in |
node.ages |
as in |
min.branch |
as in |
plot |
if |
filename |
if |
The function attaches tips and/or clades from the source
tree
to the backbone
tree according to the data
object. Within the
latter, a clade, either to be bound or to be the reference, must be
indicated by collating the names of the two phylogenetically furthest tips
belonging to it, separated by a "-". Duplicated 'bind' produce error.
Tips/clades set to be attached to the same 'reference' are considered to
represent a polytomy. Tips set as 'bind' which are already on the backbone
tree are removed from the latter and placed according to the 'reference'.
See examples and
vignette for
clarifications.
Merged phylogenetic tree.
Silvia Castiglione, Carmela Serio, Pasquale Raia
aaa
tree.merger
vignette; scaleTree
vignette;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | ## Not run:
require(ape)
require(geiger)
DataCetaceans$treecet->tree
data.frame(bind=c("Balaena_mysticetus-Caperea_marginata",
"Aetiocetus_weltoni",
"Saghacetus_osiris",
"Zygorhiza_kochii",
"Ambulocetus_natans",
"Kentriodon_pernix",
"Kentriodon_schneideri",
"Kentriodon_obscurus",
"Tursiops_truncatus-Delphinus_delphis",
"Kogia_sima",
"Grampus_griseus"),
reference=c("Fucaia_buelli-Aetiocetus_weltoni",
"Aetiocetus_cotylalveus",
"Fucaia_buelli-Tursiops_truncatus",
"Saghacetus_osiris-Fucaia_buelli",
"Dalanistes_ahmedi-Fucaia_buelli",
"Kentriodon_schneideri",
"Phocoena_phocoena-Delphinus_delphis",
"Kentriodon_schneideri",
"Stenella_attenuata-Stenella_longirostris",
"Kogia_breviceps",
"Globicephala_melas-Pseudorca_crassidens"),
poly=c(FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE,
FALSE))->dato
c(Aetiocetus_weltoni=28.0,
Saghacetus_osiris=33.9,
Zygorhiza_kochii=34.0,
Ambulocetus_natans=40.4,
Kentriodon_pernix=15.9,
Kentriodon_schneideri=11.61,
Kentriodon_obscurus=13.65)->tip.ages
c("Ambulocetus_natans-Fucaia_buelli"=52.6,
"Balaena_mysticetus-Caperea_marginata"=21.5)->node.ages
# remove some tips from the original tree and create a source tree
drop.tip(tree,c(names(tip.ages),
tips(tree,131)[-which(tips(tree,131)%in%
c("Caperea_marginata","Eubalaena_australis"))],
tips(tree,195)[-which(tips(tree,195)=="Tursiops_aduncus")]))->backtree
drop.tip(tree,which(!tree$tip.label%in%c(names(tip.ages),
tips(tree,131),
tips(tree,195))))->sourcetree
plot(backtree,cex=.6)
plot(sourcetree,cex=.6)
tree.merger(backbone=backtree,data=dato,source.tree=sourcetree,
tip.ages=tip.ages,node.ages = node.ages, plot=TRUE)->treeM
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.