Code to define simulation parameters and to run simulations can be found in files starting with "Run_sim..." one for each of the simulations in the manuscript (one with 1000 replicates, one with 100 replicates, one for empirical data and one with population structure). Note that you need to have the programs "fsc" (fastsimcoal), "plink" (plink, obviously) and "gcta64" (for gcta64) present in the folder where you are running the simulation script. Due to copyright, these are not provided here. The "Run_sim..." scripts also requires the files 'parameters.R' and 'Simulation_functions.R' to be present in the working directory. Thus, when everything is set up properly, this script can be run on a cluster. The output from those are then parsed by code found in "analyse_and_figures.R" where the remaining analyses presented. All data necessary for the analyses can be found in this folder, but raw data from simulations can be found in a separata file data files. The function "HC_correction", found in file "functions.R" performs HC-correction. Also, since the package "GenABEL" is no longer available from CRAN (which the simualation code heavily depends on) it may still be possible to install it by the following R code: install.packages("GenABEL.data", repos="http://R-Forge.R-project.org") install.packages("./GenABEL_1.8-0.tar.gz", repos = NULL, type = "source")