In [1]:
import sys
sys.path.append('../src')
from popgen import *
%matplotlib inline

Decline with different end sizes


In [2]:
m = Bottleneck(gens=100)
m.bgen = 50
m.start_size = 2000
m.end_size = [50, 100, 250, 750]
m.num_msats = 20
BasicView(m, [ExpHe(), ObsHe(), NumAlleles()], ['mean'], with_model=True)
m.run()


Expansion


In [3]:
m = Bottleneck(gens=20)
m.bgen = 10
m.start_size = 10
m.end_size = 1000
m.num_msats = 200
BasicView(m, [ExpHe(), ObsHe(), LDNe()], with_model=True)
m.run()


Studying the behavior of an estimator (LDNe)

LDNe (do not run)


In [ ]:
m = Bottleneck(gens=100)
m.bgen = 50
m.start_size = 100
m.end_size = 1000
m.num_msats = 20
BasicView(m, [ExpHe(), LDNe()])
m.run()


LDNe (do not run) - sample size effects


In [ ]:
m = Bottleneck(gens=20)
m.bgen = 10
m.num_msats = 100
m.start_size = 200
m.end_size = 50
m.sample_size = [10, 20, 50]
BasicView(m, [LDNe()], max_y=[m.start_size * 3])
m.run()

LDNe - Ne influences Ne^


In [ ]:
m = Bottleneck(gens=20)
m.bgen = 10
m.start_size = 500
m.end_size = [400, 50]
m.sample_size = 50
m.num_stats = 50
BasicView(m, [ExpHe(), LDNe()], max_y=[None, m.start_size * 2])
m.run()

LDNe - number of msats


In [ ]:
m = Bottleneck(gens=20)
m.bgen = 10
m.start_size = 100
m.end_size = 50
m.num_msats = [10, 20, 50]
BasicView(m, [ExpHe(), LDNe()], max_y=[None, m.start_size * 2])
m.run()

In [ ]: