Description Usage Arguments Author(s) Examples
This function can estimate species trees from a set of unrooted gene trees
1 | NJst(genetrees, taxaname, spname, species.structure)
|
genetrees |
a set of unrooted gene trees |
taxaname |
names of taxa |
spname |
names of species |
species.structure |
the taxaname-spname table |
Liang Liu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | sptree<-"(A:0.4,(B:0.3,(C:0.2,(D:0.1,E:0.1):0.1):0.1):0.1);"
spname<-species.name(sptree)
nspecies<-length(spname)
rootnode<-9
nodematrix<-read.tree.nodes(sptree,spname)$node
seq<-rep(1,nspecies)
species.structure<-matrix(0,nspecies,nspecies)
diag(species.structure)<-1
##population size, theta
nodematrix[,5]<-0.1
ngene<-5
genetree<-rep("",ngene)
##generate gene trees
for(i in 1:ngene)
{
genetree[i]<-sim.coaltree.sp(rootnode,nodematrix,nspecies,seq,spname)$gt
}
##construct the NJst tree
NJst(genetree,spname, spname, species.structure)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.