#!/usr/bin/env python # coding: utf-8 # In[2]: import sys sys.path.append('../src') from popgen import * get_ipython().run_line_magic('matplotlib', 'inline') # ## (dominant) Selection vs Drift # In[3]: m = SelectionPop(gens=100) m.freq = 0.05 m.sel = [0.05, 0.05, 0.2] m.neutral_loci = 9 #m.sel_type = ['recessive', 'hz_advantage', 'dominant'] m.sel_type = 'dominant' m.pop_size = [50, 200, 10000] BasicViewTwo(m, FreqDerived(), highlight=[0]) m.run() # ## Recessive # In[ ]: m = SelectionPop(gens=100) m.freq = 0.05 m.sel = [0.05, 0.2] m.neutral_loci = 9 m.sel_type = 'recessive' m.pop_size = [50, 200, 10000] BasicViewTwo(m, FreqDerived(), highlight=[0]) m.run() # ## Hz advantage # In[ ]: m = SelectionPop(gens=100) m.freq = 0.05 m.sel = [0.05, 0.2] m.neutral_loci = 9 m.sel_type = 'hz_advantage' m.pop_size = [50, 200, 10000] BasicViewTwo(m, FreqDerived(), highlight=[0]) m.run() # In[ ]: