Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Latest commit

 

History

History
16 lines (11 loc) · 1.25 KB

README.md

File metadata and controls

16 lines (11 loc) · 1.25 KB

Simulations for "Spatial structure alters the site frequency spectrum produced by hitchhiking"

Well-mixed sweep codes

This folder contains forward and backward-in-time simulations for generating SFS for a well-mixed population which experienced a hard sweep.

well_mixed_forward_simulation.py simulates selective sweep in a well-mixed population. well_mixed_forward_simulation.py imports a .txt file generated by well_mixed_forward_simulation.py to perform coalescent simulation.

Figures

Run Figures_lean.ipynb to generate Figures 2- in the manuscript. It imports simulation results from forward_simulation_data and backward_simulation_data folders to make SFSs.

Spatial sweep codes

This folder contains forward and backward-in-time simulations for generating SFS for a spatially structured population under selection.

simulation_1D_sweep.c is a C code for simulating a Fisher wave starting at the left-most deme. simulation_1D_sweep_change_origin.c is similar to simulation_1D_sweep.c but has the index of the deme where the wave starts as an additional input value. backward_combined.py is a Python code that imports an output of a forward-in-time simulation and performs a coalescent simulation. It uses functions from functions_combined.py.