DOI: 10.5061/dryad.qfttdz0mc
title: Simulation code for: Clones on the run - the genomics of a recently expanded partially clonal species

description: Why species that in their core areas mainly reproduce sexually become
 enriched with clones in marginal populations ("geographic
 parthenogenesis") remains unclear. Earlier hypotheses have emphasised
 that selection might promote clonality because it protects locally adapted
 genotypes. On the other hand, it also hampers recombination and adaptation
 to changing conditions. The aim of the present study was to investigate
 the early stages of range expansion in a partially clonal species and what
 drives an increase in cloning during such expansion. We used genome-wide
 sequencing to investigate the origin and evolution of large clones formed
 in a macroalgal species (Fucus vesiculosus) during a recent expansion into
 the postglacial Baltic Sea. We found low but persistent clonality in core
 populations, while at range margins, large dominant clonal lineages had
 evolved repeatedly from different sexual populations. A range expansion
 model showed that even when asexual recruitment is less favourable than
 sexual recruitment in core populations, repeated bottlenecks at the
 expansion front can establish a genetically eroded clonal wave that
 spreads ahead of a sexual wave into the new area. Genetic variation
 decreased by drift following repeated bottlenecks at the expansion front.
 This resulted in the emerging clones having low expected heterozygosity,
 which corroborated our empirical observations. We conclude that
 Baker's Law (clones being favoured by uniparental reproductive
 assurance in new areas) can play an important role during range expansions
 in partially clonal species, resulting in a complex spatiotemporal mosaic
 of clonal and sexual lineages that might persist during thousands of
 generations.
description: This dataset consists of a custom-made simulation code of the
 mathematical model employed in the study (written in Matlab; .m file), and
 the simulation outputs (.mat files). Matlab was used to run the
 simulations and analyze the simulation outputs.
description: Files can be accessed using MATLAB.
description: # Simulation code for: Clones on the run - the genomics of a recently
 expanded partially clonal species
 The simulations used in
 “Clones on the run - the genomics of a recently expanded partially clonal
 species” by R.T. Pereyra, M. Rafajlović, P. De Wit, M. Pinder, A. Kinnby,
 M. Töpel and K. Johannesson are written and executed in Matlab. This
 Matlab code (.m file) is named here ‘main_fixedMaxN.m’. The explanations
 of the notations used, and of the main steps in the model are explained in
 the comments in this .m file. ## Description of the data and file
 structure The raw simulation outputs for the model with both short- and
 long-range dispersal are contained in .mat files with names starting with
 ‘YesLong_’. Each filename further specifies parameter values for the
 corresponding simulation, i.e., MaxN, mean long-range dispersal distance
 (dist), death rate d, per-individual total dispersal probability (mT),
 probability that a migrant disperses by long-range dispersal (pL), and
 per-clone loss of sexual function (sLoss), with ‘p’ within numerals
 denoting ‘point’ so that ‘d0p1’ means that d=0.1 (and similarly for the
 other parameters). The explanations of the matrices and vectors in the
 files can be found in the comments in the main code (the above mentioned
 .m file). The raw simulation results for the model with only short-range
 dispersal are contained in .mat files with names starting with ‘NoLong_’.
 The name format is the same as for ‘YesLong_’ files described above,
 except that here for each parameter set, the name also specifies the run
 counter (as for each parameter set, 200 independent runs were performed).
 This is specified at the end of the filename in the form ‘_runX’, with X
 ranging from 1 to 200. The explanations of the matrices and vectors in the
 files can be found in the comments in the main code (the above mentioned
 .m file). ## Code/Software The code is written in Matlab.