consense {phybase}R Documentation

Consensus tree

Description

The function returns a consensus tree from multiple gene trees.

Usage

consense(treestr, name,type="freq")

Arguments

treestr a vector of tree strings
name the species names
type if type="freq", the frequency of each clade in the consensus tree is presented at the node of the clade. if type="prop", the proportion of each clade is presented at the node of the clade"

Value

The function returns the consensus tree and species names.

Author(s)

Liang Liu lliu@oeb.harvard.edu

See Also

maxtree, partition.tree

Examples

treestr<-c("((((H:0.00402,C:0.00402):0.00304,G:0.00707):0.00929,O:0.01635):0.1,W:0.12);","((((H:0.00402,G:0.00402):0.00304,C:0.00707):0.00929,O:0.01635):0.1,W:0.12);","((((H:0.00402,C:0.00402):0.00304,G:0.00707):0.00929,O:0.01635):0.1,W:0.12);")
name<-species.name(treestr[1])
consense(treestr,name)

###unrooted trees
data(unrooted.tree)
name<-paste("S",1:29,sep="")
consense(unrooted.tree,name)

[Package phybase version 1.1 Index]