diff --git a/Project.toml b/Project.toml index eed1423..001c27c 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "PhyloCoalSimulations" uuid = "53f7b83a-06b5-4910-9a21-1896bf762ade" authors = ["Cecile Ane ", "John Fogg <70609062+fogg-uw@users.noreply.github.com>"] -version = "0.1.0" +version = "0.1.1" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" diff --git a/src/simulatecoalescent_network.jl b/src/simulatecoalescent_network.jl index 8fbbf7e..b5df6a3 100644 --- a/src/simulatecoalescent_network.jl +++ b/src/simulatecoalescent_network.jl @@ -158,6 +158,7 @@ function simulatecoalescent(net::PN.HybridNetwork, nloci::Integer, nindividuals; inheritancecorrelation <= 1.0 || error("the inheritance correlation should be <= 1") independentlin = (inheritancecorrelation == 0.0) alpha = (1-inheritancecorrelation)/inheritancecorrelation # correlation = 1/(1+alpha) + PN.check_nonmissing_nonnegative_edgelengths(net, "the coalescent process cannot be simulated") for e in net.edge e.hybrid && e.gamma == -1.0 && error("the network needs gamma values") end @@ -334,6 +335,7 @@ function simulatecoalescent(net::PN.HybridNetwork, nloci::Integer, nindividuals, error("populationsize should be a number or dictionary") end # network with lengths in coalescent units + PN.check_nonmissing_nonnegative_edgelengths(net, "the coalescent process cannot be simulated") net_coal = deepcopy(net) for e in net_coal.edge e.length = e.length / Neff[e.number]