Learn R Programming

pez (version 1.0-0)

phy.build: Build a novel phylogeny from existing data (based on phyloGenerator)

Description

Build a novel phylogeny from existing data (based on phyloGenerator)

Usage

congeneric.merge(tree, species, split = "_", ...)

bind.replace(backbone, donor, replacing.tip.label, donor.length = NA)

Arguments

tree
phylo phylogeny to have those species inserted into it
species
vector of species names to be bound into the tree if missing from it
split
the character that splits genus and species names in your phylogeny. Default is _, i.e. Quercus_robur.
...
ignored
backbone
backbone phylogeny (phylo) into which the donor is to be bound
donor
phylogeny (phylo) to bound into the backbone phylogeny
replacing.tip.label
the species in the donor phylogeny that's being replaced by the donor phylogeny
donor.length
how deep the donor phylogeny should be cut into the backbone phylogeny. If NA (default), then the bladj algorithm is followed (or, in plain English, it's put half-way along the branch)

Value

Details

congeneric.merge Binds missing species into a phylogeny by replacing all members of the clade it belongs to with a polytomy. Assumes the tip.labels represent Latin binomials, split by the split argument. This code was originally shipped with phyloGenerator - this is the merge method in that program.

bind.replace Binds a phylogeny (donor) into a bigger phylogeny ('backbone'); useful if you're building a phylogeny a la Phylomatic. A version of this R code was shipped with phyloGenerator (Pearse & Purvis 2013). This is really an internal function for congeneric.merge, but hopefully it's of some use to you!

References

Pearse W.D. & Purvis A. phyloGenerator: an automated phylogeny generation tool for ecologists. Methods in Ecology and Evolution 4(7): 692--698.

Examples

Run this code
tree <- read.tree(text="((a_a:1,b_b:1):1, c_c:2):1;")
tree <- congeneric.merge(tree, c("a_nother", "a_gain", "b_sharp"))

Run the code above in your browser using DataLab