diff --git a/examples/coalescent/exponentialCoalescent.lphy b/examples/coalescent/exponentialCoalescent.lphy index 42c43431..3b6671f6 100644 --- a/examples/coalescent/exponentialCoalescent.lphy +++ b/examples/coalescent/exponentialCoalescent.lphy @@ -1,12 +1,15 @@ -data { - L = 200; -} model { - GrowthRate ~ Normal(mean=0.055, sd=0.0005); - N0 ~ Normal(mean=30, sd=1.0); - exponentialPopFunc = exponentialPopFunc(GrowthRate=GrowthRate, N0=N0); - times ~ CoalescentPopFunc(popFunc=exponentialPopFunc, n=16); - D ~ PhyloCTMC(tree=times, L=L, Q=jukesCantor()); -} +GrowthRate ~ LogNormal(meanlog=2.0, sdlog=0.9); +N0 ~ LogNormal(meanlog=9.2, sdlog=0.12); +NA ~ LogNormal(meanlog=5.2, sdlog=0.12); +I_na ~ UniformDiscrete(lower=0, upper=1); + +exponentialPopFunc = exponentialPopFunc(GrowthRate=GrowthRate, N0=N0, NA=NA, I_na=I_na); +tree ~ CoalescentPopFunc(n=40, popFunc=exponentialPopFunc); + +D ~ PhyloCTMC(L=2000, Q=jukesCantor(),mu=0.01, tree=tree); +height = tree.rootAge(); +length = tree.treeLength(); +} \ No newline at end of file diff --git a/examples/coalescent/gompertzCoalescent_f0.lphy b/examples/coalescent/gompertzCoalescent_f0.lphy index 916d980d..c2d051eb 100644 --- a/examples/coalescent/gompertzCoalescent_f0.lphy +++ b/examples/coalescent/gompertzCoalescent_f0.lphy @@ -1,12 +1,15 @@ data { - L = 500; + L = 1000; } model { - - N0 ~ LogNormal(meanlog=10,sdlog=0.5); + N0 ~ LogNormal(meanlog=8, sdlog=0.5); + b ~ LogNormal(meanlog=-0.95, sdlog=0.2); f0 ~ Beta(alpha=20, beta=7); - b ~ Beta(alpha=40, beta=10); - gompertzPopFunc = gompertzPopFunc_f0(N0=N0,f0=f0, b=b); - tree ~ CoalescentPopFunc(n=16, popFunc=gompertzPopFunc); - D ~ PhyloCTMC(tree=tree, L=L, Q=jukesCantor(), mu=1e-9); -} \ No newline at end of file + NA ~ LogNormal(meanlog=4, sdlog=0.3); + I_na ~ UniformDiscrete(lower=0, upper=1); + gompertzPopFunc = gompertzPopFunc_f0(f0=f0, b=b, N0=N0, NA=NA, I_na = I_na); + tree ~ CoalescentPopFunc(n=40, popFunc=gompertzPopFunc); + D ~ PhyloCTMC(L=L, Q=jukesCantor(), mu=0.01, tree=tree); + //height = tree.rootAge(); +} + diff --git a/examples/coalescent/gompertzCoalescent_t50.lphy b/examples/coalescent/gompertzCoalescent_t50.lphy index 8ae5223a..9f55e4a6 100644 --- a/examples/coalescent/gompertzCoalescent_t50.lphy +++ b/examples/coalescent/gompertzCoalescent_t50.lphy @@ -1,13 +1,17 @@ data { - L = 500; + L = 1000; } model { - - NInfinity ~ LogNormal(meanlog=10,sdlog=0.5); - //t50 ~ Beta(alpha=20, beta=7); - t50 ~ Normal(mean=0,sd=0.333); - b ~ Beta(alpha=40, beta=10); - gompertzPopFunc = gompertzPopFunc_t50(NInfinity=NInfinity,t50=t50, b=b,NA=0); - tree ~ CoalescentPopFunc(n=16, popFunc=gompertzPopFunc); - D ~ PhyloCTMC(tree=tree, L=L, Q=jukesCantor(), mu=1e-9); -} \ No newline at end of file + t50 ~ LogNormal(meanlog=2.3, sdlog=0.3); + b ~ LogNormal(meanlog=-1.5, sdlog=0.2); + NInfinity ~ LogNormal(meanlog=6.5, sdlog=0.5); + NA ~ LogNormal(meanlog=2.21, sdlog=0.1); + I_na ~ UniformDiscrete(lower=0, upper=1); + gompertzPopFunc = gompertzPopFunc_t50(NInfinity=NInfinity,t50=t50, b=b, NA=NA,I_na = I_na); + // n0 = gompertzPopFunc.getN0(); + // f0=n0/NInfinity; + tree ~ CoalescentPopFunc(n=40, popFunc=gompertzPopFunc); + D ~ PhyloCTMC(tree=tree, L=L, Q=jukesCantor(), mu=1e-2); + height = tree.rootAge(); + length = tree.treeLength(); +}