star.sptree: Build a STAR tree

Description Usage Arguments Value Author(s) See Also Examples

Description

The function can build a STAR tree from a set of gene trees. Although STAR can handle missing sequences, it requires that all possible pairs of species (n choose 2) should appear in at least one gene tree. Otherwise, STAR cannot calculate the pairwise distances among species.

Usage

1
star.sptree(trees, speciesname, taxaname, species.structure,outgroup,method="nj") 

Arguments

trees

the gene tree vector

speciesname

species names

taxaname

taxa names

species.structure

a matrix defining the species-taxa relationship

outgroup

outgroup

method

UPGMA1, UPGMA2, or NJ

Value

The function returns a STAR tree.

Author(s)

Liang Liu lliu@uga.edu

See Also

mrca.2nodes, mrca.nodes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#create three gene trees
treestr<-rep("",4)
treestr[1]<-"((((H:0.00402,C:0.00402):0.00304,G:0.00706):0.00929,O:0.01635):0.1,W:0.11635);"
treestr[2]<-"((((H:0.00402,G:0.00402):0.00304,C:0.00706):0.00929,O:0.01635):0.1,W:0.11635);"
treestr[3]<-"((((O:0.00402,C:0.00402):0.00304,G:0.00706):0.00929,H:0.01635):0.1,W:0.11635);"
treestr[4]<-"((((H:0.00402,C:0.00402):0.00304,G:0.00706):0.00929,O:0.01635):0.1,W:0.11635);"

speciesname<-species.name(treestr[1])
taxaname<-speciesname
species.structure<-matrix(0,ncol=5,nrow=5)
diag(species.structure)<-1

star.sptree(treestr, speciesname, taxaname, species.structure,outgroup="W",method="nj") 

bomeara/phybase documentation built on May 12, 2019, 11:35 p.m.