sptree.njst | R Documentation |
This function can estimate species trees from a set of unrooted gene trees
sptree.njst(genetrees, spname, taxaname, species.structure)
genetrees |
a set of unrooted gene trees |
spname |
names of species |
taxaname |
names of taxa |
species.structure |
the taxaname-spname table |
Liang Liu
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 sptree.njst tree
sptree.njst(genetree,spname, spname, species.structure)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.