PT - JOURNAL ARTICLE AU - Ilya Shlyakhter AU - Pardis C. Sabeti AU - Stephen F. Schaffner TI - <em>Cosi2</em> : An efficient simulator of exact and approximate coalescent with selection AID - 10.1101/005090 DP - 2014 Jan 01 TA - bioRxiv PG - 005090 4099 - http://biorxiv.org/content/early/2014/05/14/005090.short 4100 - http://biorxiv.org/content/early/2014/05/14/005090.full AB - Motivation Efficient simulation of population genetic samples under a given demographic model is a prerequisite for many analyses. Coalescent theory provides an efficient framework for such simulations, but simulating longer regions and higher recombination rates remains challenging. Simulators based on a Markovian approximation to the coalescent scale well, but do not support simulation of selection. Gene conversion is not supported by any published coalescent simulators that support selection.Results We describe cosi2, an efficient simulator that supports both exact and approximate coalescent simulation with positive selection. cosi2 improves on the speed of existing exact simulators, and permits further speedup in approximate mode while retaining support for selection. cosi2 supports a wide range of demographic scenarios including recombination hot spots, gene conversion, population size changes, population structure and migration.cosi2 implements coalescent machinery efficiently by tracking only a small subset of the Ancestral Recombination Graph, sampling only relevant recombination events, and using augmented skip lists to represent tracked genetic segments. To preserve support for selection in approximate mode, the Markov approximation is implemented not by moving along the chromosome but by performing a standard backwards-in-time coalescent simulation while restricting coalescence to node pairs with overlapping or near-overlapping genetic material. We describe the algorithms used by cosi2 and present comparisons with existing selection simulators.Availability A free C++ implementation of cosi2 is available at http://broadinstitute.org/∼ilya/cosi2.Contact ilya@broadinstitute.org