hybridLambda / hybrid-Lambda

Hybrid-Lambda is a software package that can simulate gene trees within a rooted species network or a rooted species tree under the Kingman's coalescent or Lambda coalescent process.
http://hybridlambda.github.io/
GNU General Public License v3.0
6 stars 4 forks source link

distance between taxa is not right, compare with theoretical values #25

Closed shajoezhu closed 7 years ago

shajoezhu commented 7 years ago
./hybrid-Lambda -spng "((t1:1000,t2:1000)int:1000,t3:2000);" -pop "((t1:1000,t2:1000)int:2000,t3:1000)r:1000;" -sim_num_gener -num 10000 -o sim 
library(ape)
gt <- read.tree("sim_num_gener")
hist(unlist(lapply(gt, function(x){sum(x$edge.length[which.edge(x,c("t2_1", "t3_1"))])})), breaks = 30)
l = 1:20000
fl = 1/2000*exp(-(l-1000-1000-2000)/2000)
lines(l,fl, col="red")

tmp