We will now simulate population structure. Let's start with an island model and then create a one-dimensional stepping-stone model. We will study FST behavior on these models and distinguish between deme-level statistics and meta-population level statistics. Strictly speaking, we will simulate fragmentation models by splitting into islands or stepping-stones.
Read the first recipe (Introducing forward-time simulations) as it introduces the basic programming framework. If you are using the Notebook files, the content is in Chapter05/Pop_Structure.ipynb
.
Take a look at the following steps:
- Let's start with some basic code from the first recipe:
from collections import defaultdict, OrderedDict from copy import deepcopy import simuPOP as sp from simuPOP import demography num_loci = 10 pop_size = 50 num_gens = 101 num_pops = 10 migs = [0, 0.005, 0.01, 0.02, 0.05, 0.1] init_ops = OrderedDict() pre_ops...