This package contains the simulation code for simulations used in Höllinger I {1,2}, Pennings PS {3}, Hermisson J {1,2}: Polygenic adaptation: From sweeps to subtle frequency shifts, 2018. {1} Mathematics and BioSciences Group, Faculty of Mathematics and Max F. Perutz Laboratories, University of Vienna, Vienna, Austria {2} Vienna Graduate School of Population Genetics, Vienna, Austria {3} Department of Biology, San Francisco State University, California, USA ilse.hoellinger@univie.ac.at joachim.hermisson@univie.ac.at We provide the simulation code in the scripts folder. The output of the simulations will be written to the output folder. Simulation code is devided in several parts: (1) R file: ParameterInput.r Here all parameters can be entered. This script then loops after all parameter combinations, by calling on the Methods set up provided in the two .cpp (C++) files. Also provide working directory here: that should be the folder where the scripts are. Currently the paths are set,such that the output is put in a folder ../output, one level up from the working directory. (2) C++ Methods: - PolygenAdaptation_RedundantTrait.cpp polygenic adaptation of a binary trait with complete redundancy within its genetic basis, lnkage equilibrium between the loci, haploid individuals - PolygenAdaptation_RelaxedRedundancyTrait.cpp polygenic adaptation with relaxed redundancy, linkage equilibrium between the loci, haploid individuals For both .cpp file the number of loci that needs to be simulated has to be changed within the beginning of the .cpp file itself. all other parameters can be set in the ParameterInput.r file. Output of the.cpp file is a Rcpp::List. (3) There are four additinal files (2 of each), - WriteFile*.r are needed to create a correctly readable output-file of the C++ Methods into .json and .csv files. They are a bit different, because the output of the two provided PolygenAdaptation*.cpp are different - RunSample*.r is used to create the defines the class Run, which corresponds to one replicate, or a single line of the Rcpp::List.