Learn R Programming

paleotree (version 1.8.2)

expandTaxonTree: Extrapolating Lower-Level Taxon Phylogenies from Higher-Level Taxon Trees

Description

This function takes a tree composed of higher-leve taxa and a vector of lower-level taxa belonging to the set of higher-level taxa included in the input tree and produces a tree composed of the lower-level taxa, by treating the higher-level taxa as unresolved monophyletic polytomies. A user can also mark higher taxa as paraphyletic such that these are secondarily collapsed and do not form monophyletic clades in the output tree.

Usage

expandTaxonTree(taxonTree, taxaData, collapse = NULL, plot = FALSE)

Arguments

taxonTree
A phylo object where tips represent higher taxa
taxaData
Character vector of higher taxa, with elements names equal to the lower taxa. See below.
collapse
Character vector of non-monophyletic higher taxa to be collapsed
plot
If true, plots a comparison between input and output trees

Value

  • Outputs the modified tree as an object of class phylo, with the higher-level taxa expanded into polytomies and the lower-level taxa as the tip labels.

Details

The output tree will probably be a rough unresolved view of the relationships among the taxa, due to the treatment of higher-level taxa as polytomies. This is similar to the methods used in Webb and Donoghue (2005) and Friedman (2009). Any analyses should be done by resolving this tree with multi2di in the ape package or via the various time-scaling functions found in this package (paleotree). The taxaData vector should have one element per lower-level taxon that is to be added to the tree. The name of each element in the vector should be the names of the lower-level taxa, which will be used as new tip labels of the output lower-taxon tree. By default, all higher-level taxa are treated as monophyletic clades if not otherwise specified. The collapse vector can (and probably should) be used if there is doubt about the monophyly of any higher-level taxa included in the input taxontree, so that such a group would be treated as a paraphyletic group in the output tree. The output tree will always lack branch lengths and thus will not be time-scaled.

References

Friedman, M. 2009 Ecomorphological selectivity among marine teleost fishes during the end-Cretaceous extinction. Proceedings of the National Academy of Sciences 106(13):5218--5223. Webb, C. O., and M. J. Donoghue. 2005 Phylomatic: tree assembly for applied phylogenetics. Molecular Ecology Notes 5(1):181--183.

See Also

multi2di, bind.tree

Examples

Run this code
set.seed(444)
#lets make our hypothetical simulated tree of higher taxa
taxtr <- rtree(10)
taxd <- sample(taxtr$tip.label,30,replace=TRUE)	#taxa to place within higher taxa
names(taxd) <- paste(taxd,"_x",1:30,sep="")
coll <- sample(taxtr$tip.label,3)		#what to collapse?
expandTaxonTree(taxonTree=taxtr,taxaData=taxd,collapse=coll,plot=TRUE)

Run the code above in your browser using DataLab