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

weissmanlab/SFS_spatial_sweep_1d_Genetics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.6%
  • Other 0.4%