getAllMRCAs {Apoderoides} | R Documentation |
getAllMRCAs
Description
Calculate all the most recent common ancestors (MRCAs) of ranks in the tree. Unlike getMRCA() in ape package, this function returns a tip node number when the rank is monotypic.
Usage
getAllMRCAs(tree,OTUrankData=NULL)
Arguments
tree |
A phylogenetic tree to be checked. This is loaded by ape::read.tree() from a file. |
OTUrankData |
A list composed of two character vectors. The first vector is tips of tree. The second vector is the upper rank of the tips. When this is NULL, the function assumes that all the tree tips are expressed as Genus_species like Homo_sapience, and calculate the MRCAs for genera. When this is not NULL, the function returns MRCAs based on the upper rank in this list. |
Value
A list containing vectors of an MRCA node number.
Examples
data(testTree)
#calculate MRCAs for genus
getAllMRCAs(testTree)
data(testRankList)
#calculate MRCAs for the rank in the list
getAllMRCAs(testTree,testRankList)
[Package Apoderoides version 3.0.0 Index]