loglike.coal | R Documentation |
This function calculates the loglikelihood of a species tree from a set of gene trees using the Rannala and Yang formula
loglike.coal(gtree, sptree, taxaname,spname,species.structure,strict=T)
gtree |
a collection of gene trees |
sptree |
a species tree in newick format |
taxaname |
the names of taxa |
spname |
the names of species |
species.structure |
define which sequence belong to which species |
strict |
whether or not to check the result |
The function returns the log likelihood score.
Liang Liu
Rannala, B. and Z. Yang. 2003. Bayes estimation of species divergence times and ancestral population sizes using DNA sequences from multiple loci. Genetics 164: 1645-1656.
gtree<-"(((A:1,B:1):3,C:4):2,D:6);"
stree<-"(((A:0.5,B:0.5):1#0.1,C:1.5):1#0.1,D:2.5)#0.1;"
taxaname<-c("A","B","C","D")
spname<-taxaname
ntax<-length(taxaname)
nspecies<-length(spname)
species.structure<-matrix(0,nrow=nspecies,ncol=ntax)
diag(species.structure)<-1
loglike.coal(gtree,stree,taxaname,spname,species.structure)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.