This repository provides the python code used to generate Figures in the article "Frequent asymmetric migrations suppress natural selection in spatially structured populations" by Alia Abbara and Anne-Florence Bitbol, and "Mutant fate in spatially structured populations on graphs: connecting models to experiments" by Alia Abbara, Lisa Pagani, Celia García-Pareja, and Anne-Florence Bitbol.
"struct_pop.py" is the python code, and "Code_demo.ipynb" is a jupyter notebook that illustrates the use of elementary functions of the code. In particular, we show how to define graph structure (including Dirichlet cliques), simulate evolutionary dynamics, and compute fixation probability of a mutant.