title: Cosi2: an efficient simulator of exact and approximate coalescent with selection.
abstract: BACKGROUND
  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.
  
  
  METHODS
  A free C++ implementation of cosi2 is available at http://broadinstitute.org/mpg/cosi2.
authors.affiliation: Broad Institute of MIT and Harvard, MA 02142 and Department of Organismic and Evolutionary Biology, Harvard University, Cambridge, MA 02138, USA Broad Institute of MIT and Harvard, MA 02142 and Department of Organismic and Evolutionary Biology, Harvard University, Cambridge, MA 02138, USA.
authors.forename: Ilya
authors.initials: I
authors.lastname: Shlyakhter
authors.affiliation: Broad Institute of MIT and Harvard, MA 02142 and Department of Organismic and Evolutionary Biology, Harvard University, Cambridge, MA 02138, USA Broad Institute of MIT and Harvard, MA 02142 and Department of Organismic and Evolutionary Biology, Harvard University, Cambridge, MA 02138, USA.
authors.forename: Pardis C
authors.initials: PC
authors.lastname: Sabeti
authors.affiliation: Broad Institute of MIT and Harvard, MA 02142 and Department of Organismic and Evolutionary Biology, Harvard University, Cambridge, MA 02138, USA.
authors.forename: Stephen F
authors.initials: SF
authors.lastname: Schaffner
mesh_terms: D000465:Algorithms; D002875:Chromosomes; D003710:Demography; D005785:Gene Conversion; D005828:Genetics, Population / Q000379:methods*; D008390:Markov Chains; D008957:Models, Genetic; D011156:Population Density; D011995:Recombination, Genetic; D012641:Selection, Genetic