While there is a native Python coalescent simulator called CoaSim, this is a very old application that does not run on modern Python versions. As such, if you want to do coalescent simulations with Python, Biopython offers a wrapper to fastsimcoal and the older simcoal.
Here, we will generate some configuration files for fastsimcoal with the demographic and genomic information. We will also run the coalescent simulator from Python.
You will need to obtain fastsimcoal from http://cmpg.unibe.ch/software/fastsimcoal2/. If you are using the Docker image, this is taken care of for you.
If you are using notebooks, this content is in
Take a look ...