<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Simulation with RADinitio improves RADseq experimental design and sheds light on sources of missing data</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2020 Fall</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10187890</idno>
					<idno type="doi">10.1111/1755-0998.13163</idno>
					<title level='j'>Molecular Ecology Resources</title>
<idno>1755-098X</idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Angel G. Rivera‐Colón</author><author>Nicolas C. Rochette</author><author>Julian M. Catchen</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Restriction-site associated DNA sequencing (RADseq) has become a powerful and versatile tool in modern population genomics, enabling large-scale evolutionary and genomic analyses in otherwise inaccessible biological systems. With its widespread use, different variants on the protocol have been developed to suit specific experimental needs. Researchers face the challenge of choosing the optimal molecular and sequencing protocols for their reduced representation experimental design, an oftencomplicated process. Strategic errors can lead to biased data generation that has reduced power to answer biological questions. Here, we present RADinitio, simulation software for the selection and optimization of RADseq experiments via the generation of sequencing data that behave similarly to empirical sources. RADinitio provides an evolutionary simulation of populations, implementation of various RADseq protocols with customizable parameters, and thorough assessment of missing data.We test the efficacy of the software using different RAD protocols across several organisms, highlighting the importance of protocol selection on the magnitude and quality of data acquired. Additionally, we test the effects of RAD library preparation and sequencing on allelic dropout, observing that library preparation and sequencing often contributes more to missing alleles than population-level variation.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">| INTRODUC TI ON</head><p>Type II restriction enzymes have powered population genomic experiments since their identification in the 1970s <ref type="bibr">(Kelly &amp; Smith, 1970;</ref><ref type="bibr">Smith &amp; Welcox, 1970)</ref> being coupled with each new generation of technology to provide more markers, at lower costs <ref type="bibr">(Schl&#246;tterer, 2004)</ref>. Restriction-site Associated DNA sequencing (RADseq), which combines restriction enzymes with massively parallel, short-read sequencing, has further democratized population genomics <ref type="bibr">(Catchen et al., 2017)</ref>. RADseq has enabled numerous ecological and conservation genomics studies and has allowed for the development of genomic resources in non-model systems which were previously thought to be inaccessible and cost prohibitive <ref type="bibr">(Andrews, Good, Miller, Luikart, &amp; Hohenlohe, 2016;</ref><ref type="bibr">Narum, Buerkle, Davey, Miller, &amp; Hohenlohe, 2013)</ref>. While the original single-digest RADseq (sdRAD) protocol <ref type="bibr">(Baird et al., 2008;</ref><ref type="bibr">Etter, Bassham, Hohenlohe, Johnson, &amp; Cresko, 2011)</ref>, utilized just one type II restriction enzyme and mechanical shearing for the selection of genetic markers, other variants of reduced representation libraries employing restriction enzyme cutsites have been developed.</p><p>Among them, double-digest RADseq (ddRAD; <ref type="bibr">Peterson, Weber, Kay, Fisher, &amp; Hoekstra, 2012)</ref> selects markers with two type II restriction enzymes with different cut frequencies, whereas Genotypeby-Sequencing (GBS; <ref type="bibr">Elshire et al., 2011)</ref> uses a frequent-cutting restriction enzyme and PCR-based size selection. Different variants have also further modified these base protocols by including single-molecule indexing <ref type="bibr">(Bayona-V&#225;squez et al., 2019;</ref><ref type="bibr">Franchini, Monn&#233; Parera, Kautt, &amp; Meyer, 2017)</ref>, digestion with type IIb restriction endonucleases <ref type="bibr">(Wang, Meyer, McKay, &amp; Matz, 2012)</ref>, sequence capture <ref type="bibr">(Ali et al., 2016;</ref><ref type="bibr">Hoffberg et al., 2016)</ref>, nonenzyme specific adaptors <ref type="bibr">(Toonen et al., 2013)</ref>, or physical molecule enrichment <ref type="bibr">(Ali et al., 2016)</ref>. This family of protocols, referred hereafter as RADseq, while displaying individual benefits and disadvantages (discussed in <ref type="bibr">Andrews et al., 2016;</ref><ref type="bibr">Catchen et al., 2017;</ref><ref type="bibr">Davey et al., 2013;</ref><ref type="bibr">Puritz, Matz, et al., 2014;</ref><ref type="bibr">Rochette, Rivera-Col&#243;n, &amp; Catchen, 2019)</ref>, have been designed for specific experimental contexts, and are a testament of the applicability of the general molecular approach.</p><p>Independent of the specific molecular protocol used, RADseq has proven to be a versatile technique in a variety of genomics contexts, including the generation of linkage maps <ref type="bibr">(Amores, Catchen, Ferrara, Fontenot, &amp; Postlethwait, 2011;</ref><ref type="bibr">Amores, Wilson, Allard, Detrich, &amp; Postlethwait, 2017;</ref><ref type="bibr">Small et al., 2016)</ref>, de novo population genomics <ref type="bibr">(Jeffery et al., 2017;</ref><ref type="bibr">Portnoy et al., 2015)</ref>, landscape genomics <ref type="bibr">(Bay et al., 2018;</ref><ref type="bibr">Dudaniec, Yong, Lancaster, Svensson, &amp; Hansson, 2018)</ref>, reference-based genome scans <ref type="bibr">(Bassham, Catchen, Lescak, von Hippel, &amp; Cresko, 2018)</ref>, and phylogenomics/phylogeography <ref type="bibr">(Cristofari et al., 2016;</ref><ref type="bibr">Razkin et al., 2016;</ref><ref type="bibr">Suchan et al., 2017)</ref>.</p><p>Alongside its widespread use as a molecular protocol, a variety of bioinformatic software has been designed to work specifically with RADseq data <ref type="bibr">(Catchen et al., 2011;</ref><ref type="bibr">Catchen, Hohenlohe, Bassham, Amores, &amp; Cresko, 2013;</ref><ref type="bibr">Chong, Ruan, &amp; Wu, 2012;</ref><ref type="bibr">Eaton, 2014;</ref><ref type="bibr">Eaton &amp; Overcast, 2020;</ref><ref type="bibr">Melo &amp; Hale, 2019;</ref><ref type="bibr">Puritz, Hollenbeck, &amp; Gold, 2014)</ref>, and methods have been developed to optimize the application of these software after data generation <ref type="bibr">(Ilut, Nydam, &amp; Hare, 2014;</ref><ref type="bibr">McCartney-Melstad, Gidi&#351;, &amp; Shaffer, 2019;</ref><ref type="bibr">Paris, Stevens, &amp; Catchen, 2017;</ref><ref type="bibr">Rochette &amp; Catchen, 2017)</ref>. However, software and parameter optimization protocols are not effective if the underlying sequenced data has captured little of the true biological signal. Error in RADseq data can be traced to two nonmutually exclusive sources: (a) the unsuitable choice and application of a molecular protocol; and (b) problems with library preparation and sequencing. Regarding the selection of molecular protocol, it has been noted that different techniques are often chosen based on their popularity and experimental simplicity, potentially disregarding the suitability of different RADseq methods for different species and experimental designs <ref type="bibr">(Campbell, Brunet, Dupuis, &amp; Sperling, 2018)</ref>.</p><p>In addition, conducting an experiment without a sufficient assessment of the biological system and experimental design can result in a less than optimal library preparation, leading to poor analytical results <ref type="bibr">(Andrews et al., 2016;</ref><ref type="bibr">Davey et al., 2013;</ref><ref type="bibr">Puritz, Matz, et al., 2014)</ref>. Independent of the cause, the generation of low-quality data wastes efforts and resources, and therefore, it is in a researcher's best interests to select and apply a molecular protocol that yields the best data possible.</p><p>The likelihood of experimental success can be significantly increased with prospective data simulation, allowing for the exploration of simulated data generated under different experimental conditions, before sample collection, library preparation, and sequencing. These simulations would allow researchers to test the behaviour of different molecular protocols in their systems, as well as assessing the magnitude of data recovered given variable experimental conditions. While tools exist for the simulation of RADseq data, limitations in those tools prevent a complete assessment of the properties of sequences generated. SimrllS <ref type="bibr">(Eaton, Spriggs, Park, &amp; Donoghue, 2016</ref>) is a pipeline optimized for the simulation of phylogenomic data at various evolutionary scales but generates random sequence data that is highly artificial, with no relation to the species and genome of interest, and without any effects of library preparation and sequencing. simRAD <ref type="bibr">(Lepais &amp; Weir, 2014)</ref> can generate data from existing reference sequences, allowing to test for cutsite frequencies under different RADseq protocols, but it does so for a single sample without accounting for any genetic variation across individuals. ddRADseqtools (Mora-M&#225;rquez, Garc&#237;a-Olivares, Emerson, &amp; L&#243;pez de Heredia, 2017) can generate ddRAD data both from a reference sequence and via random sequence generation. It can simulate multiple library configurations, such as differences in insert size, adapter, PCR duplicates and coverage. While it also simulates variants for multiple samples, these are independent across individuals, and have only fixed effects over allele dropout. Finally, ddrage <ref type="bibr">(Timm, Weigand, Weiss, Leese, &amp; Rahmann, 2018)</ref> simulates ddRADseq data under multiple library configurations, in both a de novo and reference context. It can also generate variants that are shared across individuals. However, the modelling of allele dropout due to variants, and the effects of PCR duplicates, are generated from fixed probabilities and do not respond dynamically to the behaviour of the variants and the library preparation process. Aside from library preparation parameters, none of the available software can generate variants that are relevant for population genetics, meaning that they limit the capacity of testing RADseq protocols in a biologically meaningful context.</p><p>Here, we present RADinitio, a software for the assessment of RADseq experiments via the generation of simulated data. Our software builds on the coalescent simulation method of <ref type="bibr">Kelleher, Etheridge, and McVean (2016)</ref> to generate realistic population-level, genome-wide diversity under a user-defined demographic model. By generating genetic variants in a genome-wide context, the downstream library is generated within the constraints of an existing genotype pool, more accurately simulating downstream biological effects like allelic dropout. RADinitio also simulates multiple components of the RADseq library preparation process -including protocol type, restriction enzymes, fragment size selection, library amplification, and sequencing coverage. Metadata are generated across different parts of the pipeline, which ensures the traceability of the simulation process and enables downstream comparisons.</p><p>In addition to the prospective simulation of data, RADinitio allows for retrospective simulations, where an in silico library is generated based on the properties of an empirical RAD data set. The simulated sequences can then be used as a comparison against the empirical data; for example, as a neutral population for demographic analysis, as a control when modelling sources of error in the downstream processing, or as benchmark in the design and implementation of new analytical methods.</p><p>Using RADinitio, we explore parameters key to the design of a RADseq experiment and library preparation, such as the selection of a single or double-digest protocol, enzyme selection in a known reference genome, and RAD loci estimation with an unavailable reference. Additionally, we examine sources of error in RADseq data, and show that problems in library preparation and sequencing probably play a larger role in allele dropout than genetic polymorphism in a study population. RADinitio allows researchers to fully explore possible variables in their data generation process to ensure that their protocol selection and components of their library preparation process are performed optimally, within the limitations of technical and experimental error.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">| MATERIAL S AND ME THODS</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">| RADinitio pipeline</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.1">| Simulating a base metapopulation</head><p>Generation of genetic variants in RADinitio is based on the demographic models available in the mSprim simulation software <ref type="bibr">(Kelleher et al., 2016)</ref>. mSprime generates abstract genetic variants via the simulation of coalescent trees for various samples given a userdefined neutral demographic model, which can later be converted into individual haplotypes. For RADinitio, we generate one mSprime coalescent simulation for each chromosome/scaffold available in a reference sequence provided by the user (in FASTA format), using the length of this sequence as the mSprime input length value (Figure <ref type="figure">1a</ref>). By default, RADinitio provides mSprime with a simple island model (Figure <ref type="figure">1b</ref>) defined as a number of populations, each with a specific effective population size N e and with symmetrical per-generation migration rates. Other simulation parameters, including the mutation and recombination rates can also be defined by the user. In fact, the full complexity of mSprime can be invoked while keeping compatibility with RADinitio. The simulation of more complex, non-neutral evolutionary models is also possible through the integration of Slim <ref type="bibr">(Haller &amp; Messer, 2019)</ref> to the mSprime pipeline via pySlim <ref type="bibr">(Haller, Galloway, Kelleher, Messer, &amp; Ralph, 2019)</ref> and associated programs (Figure <ref type="figure">S1</ref>). The simulated non-neutral variants are natively handled by RADinitio alongside the neutral variants from mSprime.</p><p>The result of the mSprime coalescent simulations is a per-chromosome/scaffold genotype matrix stored as a VCF file <ref type="bibr">(Danecek et al., 2011)</ref> (Figure <ref type="figure">1c</ref>). These generated VCFs contain phased genotypes, but they are represented uniformly by the digits "0" and "1", not the actual identity (alleles) of the individual variants. RADinitio obtains the final genotypes by projecting the genotype matrix back to the reference sequence, associating reference alleles and generating alternative alleles (Figure <ref type="figure">1d</ref>). The alternative alleles are obtained by comparing the reference alleles against a user-defined substitution model, which can include indels. By default, this model has equal substitution probability for all nonreference nucleotides, with a fixed indel probability with length sampled from a Poisson F I G U R E 1 RADinitio simulates genetic variation over a reference sequence under the constrains of a demographic model. (a) A reference genome serves as basis for simulation space and future extraction of sequences. (b) Using mSprime, we simulate three populations (a-c) of different sizes (N e ), with a symmetric migration rate m, from which we sample chromosomes which will later become diploid individuals. (c) We observe the tree topology, mutations, and genotype matrix for a 6 Kb region in a hypothetical chromosome. The variants (black circles) are the product of coalescent simulation with recombination of our defined metapopulation over which mutations are added at a rate &#181; (coloured squares). (d) The mutations generated in (c) are converted to alleles by comparing the genotype matrix against the reference sequence. After obtaining reference alleles from the reference genome (grey circles), alternative alleles (coloured circles) are generated accordingly </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.2">| Defining RAD loci</head><p>Reference RAD loci are extracted via in silico digestion of the reference genome chosen by the user (Figure <ref type="figure">2a</ref>). RADinitio first iterates over all sequences in the reference genome, storing the position of each cutsite for the set of user-specified restriction enzymes. While individual-level polymorphism could lead to the presence of novel restriction cutsites in the genome, these events are assumed to be rare and would (Kb) -to simulate the inefficiency of shearing for small DNA fragments that are the product of close restriction cutsites <ref type="bibr">(Davey et al., 2013)</ref>.</p><p>A tally of the total number of loci and their position in the genome, including those marked as removed, is generated as an output table.</p><p>For each kept cutsite, sequences 1 Kb upstream and downstream are extracted and stored (in a FASTA file) as two separate tags, representing the reference state of all RAD loci and serving as a template for the downstream generation of alleles and sequencing reads.</p><p>In the case of a ddRAD library (Figure <ref type="figure">2b</ref>), RADinitio first stores and filters the positions of all forward cutsites, similar to the simulation of single-digest libraries. The extracted reference sequences are then scanned for the reverse cutsite, coming from the second, frequent-cutting restriction enzyme. The user must specify parameters for the in silico size selection, as this affects which loci are included in the library (allowing for a wider range of insert lengths results in more ddRAD loci). Only cutsites found within the range of the user defined insert size distribution, which is 150 bp wide by default, are kept. Reference sequences without reverse cutsites, or with cutsites outside the insert size range, are discarded, and a tally of all loci is generated for both kept and discarded tags. The sequence for surviving loci is truncated to the length of the distal-most reverse cutsite, allowing for the selection of different 3' cutsites across different reads coming from the same reference locus.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.3">| Per-individual RAD alleles</head><p>The genome-wide set of polymorphisms (SNPs and indels) generated by mSprime are intersected with the extracted RAD loci in order to only keep variants present within RAD loci, reducing the amount of downstream processing. For each sample, RADinitio iterates over all RAD loci, selecting the corresponding variants for each RAD allele (Figure <ref type="figure">2c</ref>,<ref type="figure">d</ref>). The reference locus sequence is then modified to include the corresponding allelic variants. Only sequences with intact cutsites (containing no mutations within the restriction enzyme recognition sequences) are saved, simulating the allele dropout process.</p><p>The program outputs per-sample FASTA files containing the modified allele sequences for each (diploid) RAD locus, and a report of the status of all RAD alleles across all samples.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.4">| Library amplification and sequencing</head><p>Paired-end reads are generated from the extracted RAD alleles after simulated library preparation and sequencing (Figure <ref type="figure">2e</ref> For sdRAD libraries, where molecule size is determined by mechanical shearing, an insert size is drawn from a normal distribution for each pair of reads, and a copy of the selected sequence is truncated to the determined length (Figure <ref type="figure">2e</ref>). Size selection is implicit as RADinitio assumes molecules will be selected based on the shearing properties defined by this distribution. For ddRAD, the inserts are determined by the restriction sites, which have been previously filtered to be in the selected size range, of the corresponding source locus (Figure <ref type="figure">2f</ref>). The inserts are then split into a sequenced pair of reads (by default, 2 &#215; 150 bp). The sequence is copied multiple times, to reflect its number of PCR clones, with shared PCR errors added accordingly. Random sequencing errors are finally added to each individual read pair based on an error distribution that follows the normal error pattern observed in Illumina sequencing, where the 3&#8242; end of the read accumulates more errors than the 5&#8242; end <ref type="bibr">(Glenn, 2011;</ref><ref type="bibr">Minoche, Dohm, &amp; Himmelbauer, 2011;</ref><ref type="bibr">Schirmer et al., 2015)</ref>. The model linearly increases the frequency of errors from the 5&#8242; frequency to the 3&#8242; value through the length of the read. Individual read IDs contain information about the original RAD locus and allele it originated from, its insert size, clone identifier, and duplicate number.</p><p>The results of the pipeline are paired-end, per-sample FASTA files.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">| Comparing RADinitio against empirical RAD data sets</head><p>RADinitio simulated libraries were retrospectively modelled after empirical RAD data sets to compare the read distribution and coverage obtained from simulated RAD loci. We selected two empirical RAD data sets that represent distinct applications of RAD protocols in the same biological system, the threespine stickleback, Gasterosteus Reads from both empirical and simulated data sets were aligned to the threespine stickleback reference genome (BROADS1, enSembl version 92) using bwa-mem <ref type="bibr">(Li, 2013;</ref><ref type="bibr">Li &amp; Durbin, 2009)</ref>, converted to BAM files and sorted using SamtoolS <ref type="bibr">(Li et al., 2009)</ref>, and assembled as RAD loci using StackS v2.4 <ref type="bibr">(Rochette et al., 2019)</ref>. We filtered alignments by removing RAD loci present in less than 80% of all sequenced individuals using the StackS populationS module. The insert size and coverage distribution for all data sets was obtained using the detailed output of the StackS gStackS module.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">| Assessing number of RAD loci across reference genomes</head><p>We calculated the number of RAD loci obtained under different library configurations across different reference genomes. We selected species with previously published RAD data sets: the threespine stickleback Gasterosteus aculeatus <ref type="bibr">(Bassham et al., 2018;</ref><ref type="bibr">Hohenlohe et al., 2010;</ref><ref type="bibr">Nelson &amp; Cresko, 2018;</ref><ref type="bibr">Stuart et al., 2017)</ref>, the yellow warbler Setophaga petechia <ref type="bibr">(Bay et al., 2018)</ref>, the postman butterfly Heliconius melpomene <ref type="bibr">(Davey et al., 2017;</ref><ref type="bibr">Nadeau et al., 2014)</ref>, and the bush monkeyflower Mimulus aurantiacus <ref type="bibr">(Chase, Stankowski, &amp; Streisfeld, 2017;</ref><ref type="bibr">Stankowski et al., 2019)</ref>. We used available reference sequences for each of the species: stickleback -BROADS1 (enSembl version 92), Heliconius -Hmel2.5 (lepbaSe version 4), warbler -draft assembly <ref type="bibr">(Bay et al., 2018)</ref>, monkeyflower -Mauranticus_v1.0 (www. mimub ase.org). When running RADinitio, we only simulated over chromosome sequences for stickleback, Heliconius, and monkeyflower;</p><p>only for scaffolds larger than 5 Kb for the yellow warbler genome. The --tally-rad-loci command from RADinitio was used, which provides the number of RAD loci in a reference sequence under defined library parameters. For all genomes, we simulated sdRAD libraries using the GC-rich 8 bp cutter SbfI (CC/TGCAGG), the GC-rich 6 bp cutter PstI (C/TGCAG), and the AT-rich 6 bp cutter EcoRI (G/AATTC). ddRAD libraries were also generated for each of the main forward cutters, using both the AT-rich 4 bp MseI (T/TAA) and the GC-rich 4 bp MspI (C/CGG) reverse cutters. For each two-enzyme combination, ddRAD libraries were simulated using a narrow (75 bp), intermediate (150 bp), and broad (300 bp) insert size range, all centred around 350 bp.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.4">| Estimating RAD loci number in the absence of a reference</head><p>To mimic the process of estimating the number of expected loci in a species with no reference genome, we compared the number of </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.5">| Allele dropout estimation under different sequencing parameters</head><p>We performed two different simulations using the stickleback genome to generate populations with different base levels of genetic polymorphism using the RADinitio --make-population option. The first run simulated four subpopulations, each with an effective population size of 5,000, a mutation rate of 7 &#215; 10 -8 mutations per base per generation, a recombination rate of 3 &#215; 10 -8 recombination events per base per generation, a symmetric per-generation migration rate of 0.001, and an indel probability of 0.01. From each population, we sampled 25 diploid individuals, for a total of 100 sequenced samples.</p><p>The second run simulated a population under the same parameters, except for an effective population size of 25,000 to increase genetic polymorphism. The expected genome-wide nucleotide diversity (&#960;) in these populations was 0.0058 and 0.0114, respectively.</p><p>For these two populations, we simulated both single-and double-digest RAD libraries under different DNA template and sequencing conditions. sdRAD libraries were generated using the SbfI restriction enzyme, a mean insert size of 350 bp (&#177;35 bp), and 2 &#215; 150 bp paired-end reads. The first library was generated in silico using "good" quality source DNA (defined as having a large number of DNA templates, or a template to sequence ratio of 4:1), PCR amplified for 12 cycles, and sequenced at 15&#215; depth of coverage. The second library had "poor" starting DNA (defined as a small number of DNA templates, or a template to sequence ratio of 1:4), was ampli- sequences. Since all the simulated reads contain meta information regarding their allele of origin, we can identify the status of an allele across samples. For our analyses, any allele with a final coverage of two or less (after removing PCR duplicates) is considered dropped, as they will be effectively invisible to any downstream analysis. For both components of allelic dropout, we quantified the distribution of the number of individuals for which a given allele is recovered (samples per allele). Higher samples per allele values represent lower rates of allelic dropout, or an increased chance of a given allele being recovered or "sequenced" in the library.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">| RE SULTS</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">| RADinitio simulations resemble empirical RAD loci</head><p>To confirm that the loci reconstructed from RADinitio-simulated reads behave similarly to empirical RAD loci, we performed simulations modelled after two published threespine stickleback RAD data sets <ref type="bibr">(Nelson &amp; Cresko, 2018;</ref><ref type="bibr">Stuart et al., 2017)</ref> and compared the distribution of recovered insert sizes and average sequencing coverage across loci. We performed two simulations, both representing applications of distinct RAD protocols and sequencing strategies.</p><p>The first, a single-digest PstI RAD library with 2 &#215; 250 bp paired reads and narrow, highly overlapping insert size distribution from <ref type="bibr">Nelson and Cresko (2018)</ref>. The second, a double-digest library generated with NlaIII and MluCI, with an insert size range between 295 and 340 bp, and sequenced using 2 &#215; 100 bp paired-end reads from <ref type="bibr">Stuart et al. (2017)</ref>.</p><p>Reads from the empirical sdRAD library are produced from molecules generated from a narrow insert size (Figure <ref type="figure">3a</ref>, red line). Due to the long read lengths of this data set, the majority of paired-end reads overlap, generating a continuous distribution of coverage between the single-and paired-end regions of the locus (Figure <ref type="figure">3a</ref>, blue polygons). Our simulated reads generated under similar conditions in silico (Figure <ref type="figure">3c</ref>) replicate the insert and coverage distributions of the empirical data. By sampling insert sizes from a normal distribution, RADinitio replicates the random shearing and size selection of molecules in the library preparation, which leads to a bell-shaped distribution of both insert size and coverage across the paired-end region of the locus. This sampling process replicates the variation in inserts between loci and across individuals successfully mimicking mechanical shearing in real single-digest libraries (Figure <ref type="figure">S2</ref>).</p><p>In contrast, the 100 bp ddRAD reads generate a coverage distribution in which the 5' and 3' ends of any given locus are sequenced, but no overlap occurs between single-and paired-end </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">| RADinitio can quantify the number of RAD loci across different reference genomes</head><p>When designing a RADseq-based experiment, it is essential to know the extent of a genome a RAD library will cover, based on the number of loci present, so that the amount of required sequencing can be determined. When a reference genome is available, this estimation is straightforward as it mostly requires quantifying the number of restriction enzyme recognition sequences in the genome of interest. Aside from counting the number of restriction sites present in the genome, RADinitio takes a locus-based approach in which the two tags generated from a single restriction site (one on each strand of DNA) are treated as independent objects that can interact with other elements in the library simulation process, such as proximity to other tags and their relative position in a given insert distribution. This allows for detailed estimation of the number of RAD loci in insert size-dependent libraries, such as ddRAD, or to model the behaviour of loci when restriction sites are frequent and/or close to one another.</p><p>Across the different species studied, the overall number of RAD loci is roughly proportional to the size of the genome. The yellow warbler assembly (1.26 Gb in length) has an overall higher number of loci than the other species (Figure <ref type="figure">4c</ref>). Within a single species, the number of loci can vary by an order of magnitude, depending on the enzyme employed. In the threespine stickleback (Figure <ref type="figure">4a</ref>), we recover 35,871 and 265,048 SbfI and PstI loci, respectively. Similar results are observed in Heliconius, with 1,942 SbfI and 136,011 EcoRI loci. Interestingly, while we expect the GC content of the genome to play a role in the enzyme restriction site frequency, we observed that for both stickleback (Figure <ref type="figure">4a</ref>) and warbler (Figure <ref type="figure">4c</ref>), the number of PstI loci (6 bp, GC-rich cutter), was higher than EcoRI loci (6 bp ATrich cutter), even when both genomes are between 42%-44% GC.</p><p>For ddRAD libraries, the number of loci recovered was proportional to the frequency of the rare cutter in the genome. SbfI sites are rare across both Heliconius (Figure <ref type="figure">4b</ref>) and Mimulus (Figure <ref type="figure">4d</ref>), and therefore ddRAD loci with SbfI as the main cutter are even less frequent. Across all genomes, loci were more frequent for MseI, an ATrich cutter, which follows the expectation given the GC frequency of the studied genomes. Across all simulated ddRAD libraries the number of recovered loci is proportional to the library insert size, which is expected given that larger windows provide more sequence in which the secondary restriction site can occur.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">| Modelling RAD loci in the absence of a reference genome</head><p>Given the suitability of RADseq protocols for non-model systems, many RAD analyses are performed on species lacking a reference genome. If a reference is not available, RADinitio simulations can be applied to closely related species in order to explore the expected behaviour of the empirical data. In a RAD analysis in the brown trout (Salmo trutta) <ref type="bibr">Paris et al. (2017)</ref> recovered between 60-85,000 SbfI RAD loci, depending on the filtering parameters applied to the data (Figure <ref type="figure">5</ref>). Lacking a brown trout reference genome, Paris and colleagues used information about the number of RAD loci observed in the Atlantic salmon, a congener to the brown trout, to optimize de novo assembly parameters post-data generation.</p><p>A similar simulation framework can be applied to estimate properties of the data before sequencing, most commonly by quantifying the number of expected markers to account for limitations in sequencing. Expanding the framework used by <ref type="bibr">Paris et al. (2017)</ref>, we quantified the expected number of SbfI RAD loci across species closely related to the brown trout and for which a genome is available (Figure <ref type="figure">5</ref>), using various estimation parameters. First, estimation methods that only considered the size of the genome and nucleotide frequencies underestimate the actual number of restriction sites. For example, across the Atlantic salmon chromosomes RADinitio identifies 87,198 SbfI RAD loci, whereas estimating just using genome size and genome size plus GC% returns between 68,366 and 39,392 loci, respectively. When we compare our estimates against the empirical data, we observe that across all species, estimates based on the count of SbfI sites are of similar magnitude to empirically recovered loci across various levels of missing data filtering in the empirical brown trout data set (Figure <ref type="figure">5</ref>).</p><p>While the overall similarity in locus number follows evolutionary relatedness <ref type="bibr">(Lien et al., 2016)</ref>, given genome evolution in Salmonids, some patterns are more complex. As expected, the Atlantic salmon displays the most similar SbfI RAD loci distribution to the observed brown trout empirical data. The rainbow trout and Arctic char are both in the sister clade to Salmo but display different SbfI loci numbers. Under this metric, the char's locus distribution appears more similar to the grayling's despite greater evolutionary distance. They do, however, share similar rediploidization histories following the salmonid genome duplication <ref type="bibr">(Christensen et al., 2018;</ref><ref type="bibr">Varadharajan et al., 2018)</ref> and comparable genome architecture. The northern pike, a species sister to salmonids, has a smaller number of loci, which is expected given its smaller genome, and would thus not serve as an adequate model for estimating RAD loci in the brown trout unless there were no alternatives. By performing estimates based on a variety of related species of different evolutionary distances, we can bound our expectations for our genome of interest.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.4">| Effects of polymorphism and library preparation on allele dropout</head><p>The effects of allelic dropout have been extensively discussed in the literature as one of the main caveats in RADseq <ref type="bibr">(Arnold, Corbett-Detig, Hartl, &amp; Bomblies, 2013;</ref><ref type="bibr">Davey et al., 2013;</ref><ref type="bibr">Gautier et al., 2013;</ref><ref type="bibr">Puritz, Matz, et al., 2014)</ref>. Mutations to a restriction site sequence can cause variation in the presence or absence of a particular RAD locus within and among populations and individuals <ref type="bibr">(Arnold et al., 2013)</ref>. Depending on the scale, this allelic dropout can affect the estimation of population genetic parameters <ref type="bibr">(Arnold et al., 2013;</ref><ref type="bibr">Gautier et al., 2013)</ref>. However, the prevalence F I G U R E 5 RADinitio can estimate the number of RAD loci de novo. Left panel, empirical SbfI RAD loci recovered in the Brown Trout by <ref type="bibr">Paris et al. (2017)</ref>. Colours of the bars represent the metric used in their analysis to retain loci. R40, R60, and R80 represent loci present in 40%, 60%, and 80% of individuals, respectively. Integrated unique loci are loci recovered in the brown trout that mapped uniquely to the Atlantic salmon genome. Right panel, number of recovered SbfI RAD loci from simulations across several related species. Green bars represent the number of loci recovered with RADinitio. Blue and purple bars represent the number of loci found based on the frequency of the SbfI recognition sequence in the species' genome using both 50% and the genome's actual GC content (40%-42%), respectively and impact of allelic dropout due to mutations to a restriction site have not been extensively studied. Moreover, how much contribution genetic polymorphism has over dropout, in comparisons to components of library preparation and sequencing, is not yet fully understood. To test the effects of genetic polymorphism and library preparation and sequencing on allele dropout, we simulated populations with low (Figure <ref type="figure">6</ref>, columns 1 and 3) and high polymorphism (Figure <ref type="figure">6</ref>, columns 2 and 4), across sdRAD (Figure <ref type="figure">6</ref>, columns 1 and 2) and ddRAD libraries (Figure <ref type="figure">6</ref>, columns 3 and 4).  <ref type="formula">2017</ref>) filters sequences for which less than 80% of samples are present. In this example, even the lowest observed value for allele-level dropout (Figure <ref type="figure">6d</ref>) means that on average an allele is present in 86% of samples.</p><p>Library preparation and sequencing is a sampling process of the alleles present in an individual, whose biases may impact the alleles that can be recovered downstream. We modelled this bias in sampling by preparing in silico RAD libraries enriched and sequenced under variable conditions, originating from the simulated populations described above.</p><p>First, we simulated a library based on good quality DNA (see Methods for a definition of "good" and "poor" quality) and sequenced at a coverage of 15&#215; (Figure <ref type="figure">6</ref>, row 2). Coverage of 15&#215; means that, on average, an allele would be sequenced 7.5 times if no other biases were present. Because DNA quality is good, the effect of PCR duplicates is minimal, but sampling biases due to relatively low per-allele coverage result in an increase in allele dropout of around 10% (for example, Figure <ref type="figure">6a</ref> -97.7% versus Figure <ref type="figure">6e</ref> -85.8%). This alone accounts for increases in dropout greater to those observed due to of increases in polymorphism (Figure <ref type="figure">6a</ref> -97.7% versus Figure <ref type="figure">6b</ref> -90.1%).</p><p>Poor DNA template quality, which can bias library enrichment, increases dropout by up to 60% (Figure <ref type="figure">6</ref>, row 3) when compared to polymorphism-based dropout alone. While sequencing coverage is still 15&#215;, there are fewer DNA templates, so the sequencing capacity is filled by more PCR-generated duplicates. After analytically removing duplicates (since they add no new information), the depth of each locus falls to 3-5&#215;, which limits the even sampling of alleles and results in dropout even when the allele is present in the individual. In contrast, while DNA quality is still poor, an increase in total sequencing depth to 30&#215; (Figure <ref type="figure">6</ref>, row 4) results in a post-duplicate removal depth of coverage of 8-10&#215;. While still low for many downstream analyses, this resulting coverage allows for the recovery of alleles in 60%-70% of samples.</p><p>The effects of allele dropout due to library preparation and sequencing can have significant differences over downstream biological inferences. For example, when analysing our simulated data sets using the StackS 2 pipeline, we observe that in data sets with poor quality DNA and low coverage the recovery of variant sites is severely reduced, negatively impacting downstream measures of genetic diversity (Table <ref type="table">S1</ref>). When assembling loci aligned to the reference genome and keeping markers present in over 80% of samples, only 69,000 variant sites were identified in this data set, less than half of the expected variant sites (150,000) across the simulated population. This reduction results in a drastic underestimation of &#960; for variant sites that is half (&#960; = 0.09255) of those observed in data sets without technical sources or missing data (&#960; = 0.21019) (Table <ref type="table">S1</ref>).</p><p>This assessment suggests that the sampling properties of the library preparation process contributes extensively to the loss of alleles in experimental RAD libraries. While allele dropout due to natural polymorphism is real and has an effect over downstream biological inferences, we find that for data sets with quality issues, technical sources of allele dropout are dominant. At a population level, dropout caused by sampling biases in library preparation and sequencing can be indistinguishable from that caused by natural polymorphism, leading to increased missing data.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">| D ISCUSS I ON</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">| Applying RADinitio to a new RADseq experimental design</head><p>As researchers approach the design of a new RADseq experiment they face a series of fundamental questions related to the suitability of specific protocols to their experimental design. In the absence of prior genomic resources, is RADseq even suitable for their biological system? If so, what is the best RAD protocol to use in the experiment? While the answer depends on a number of variables including budget, experience with the protocols, access to the necessary resources, number of genetic markers needed for the underlying biological inference, among others, it is advisable to examine these questions in the early stages of experimental design. While the final decision is at the hands of the researcher, RADinitio simulations provide guidance on the behaviour of a specific protocol, and its results serve as a roadmap for the final experimental design.</p><p>When a reference genome is available, the simulation with RADinitio is straightforward. To assess the number of expected genetic markers under different protocols, the program can be run using the reference genome of interest and different protocol and enzyme combinations using the -tally-rad-loci option, as shown in RADseq is frequently applied in the absence of a reference genome, complicating the initial estimation of the expected number of genetic markers. Empirically, these estimates can be obtained by a trial sequencing run with the biological system of interest -where one or a few samples are prepared and sequenced usually alongside another library. However, this approach can be limited by a lack of access to the necessary materials for the respective protocols (including the synthesis of new barcoded adapters), inexperience in the molecular protocols, or lack of access to collaborators willing to devote sequencing space to the trial samples. This last point presents an additional limitation, as it will limit the trial run just to the parameter of the library being sequenced. In the absence of these resources, RADinitio allows researchers to explore several molecular protocols and/or enzyme combinations in related species. The simplest approach is using a related reference genome as a base for simulation, as described in Figure <ref type="figure">5</ref>. Understandably, this approach is not free of biases, as results will be affected by the evolutionary relationships between the focal species and the simulation base; however, testing across several related species may identify any incompatible evolutionary biases.</p><p>The tally of RAD loci is the simplest application of RADinitio, for which no demographic model is necessary. However, a demographic model can be employed if the investigator wishes to understand how a specific level of polymorphism in a population will affect library construction. At its default implementation, the mSprime island model (Figure <ref type="figure">1b</ref>) is used to generate a base-level of genetic variation for a number of populations and individuals sampled from each population, which will inform the researcher as to the expected number of polymorphic RAD loci and the broad impacts of missing data (due to cutsite mutation). If a researcher wishes to go further, to employ a simulation to test a particular hypothesis or match a known demographic property of the focal species, more complex demographic scenarios can be implemented in mSprime via the RADinitio advanced options. It is also possible to use other advanced simulation systems with RADinitio, such as Slim, although it requires additional steps in the analysis outside of RADinitio.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">| Choosing the right RAD protocol matters</head><p>The success of a RADseq experiment strongly depends on the selection of a library protocol and restriction enzyme(s), as these define the genetic markers used post-analysis for reaching biological inferences. Given the variation in the magnitude of RAD loci obtained across different genomes (Figure <ref type="figure">4</ref>) it is important for researchers to choose an enzyme/protocol that suits their biological system and experimental design. Choosing a set of restriction enzymes that cut the genome too infrequently could lead to a reduced sampling of linkage blocks across chromosomes. This reduced sampling has been subject to arduous debate in the RADseq community <ref type="bibr">(Catchen et al., 2017;</ref><ref type="bibr">Lowry et al., 2016;</ref><ref type="bibr">McKinney, Larson, Seeb, &amp; Seeb, 2017)</ref> and could be detrimental for certain experimental designs, such as when identifying signatures of selection in a genome. On the opposite side of the spectrum, massively oversampling the genome could lead to problems with reduced sequencing coverage and more allelic dropout when the experimenter is not aware of the magnitude of the data generated per-individual.</p><p>Additionally, even after choosing the right RAD protocol and restriction enzyme(s), researchers need to be aware of the effects of other library preparation components -such as insert sizes -on the data to be generated. While insert size selection does not have an effect in the recovery of loci in sdRAD libraries, it can impact assembly and coverage of loci when performing paired-end sequencing <ref type="bibr">(Rochette et al., 2019)</ref>. Narrow insert ranges will reduce the length of the resulting loci, whereas broad ones can negatively impact coverage across the paired-end reads generated from random shearing.</p><p>In contrast, locus recovery is affected by insert sizes in ddRAD libraries -broader inserts allow for more secondary restriction sites to be recovered across more molecules, causing more loci to be kept but leading to increased variability in coverage across paired-reads.</p><p>The original ddRAD protocol <ref type="bibr">(Peterson et al., 2012)</ref> used a narrow insert range between 50 and 100 bp, in part because of limitations in sequencing capacity at the time of the publication. Given an increase in capacity in modern Illumina sequencers, the protocol might not be limited to these narrow size ranges in current ddRAD experiments.</p><p>Advances in sequencing capacity, as well as increased accessibility to resources for library preparation procedures means that some of the concepts outlined in these original protocol publications <ref type="bibr">(Baird et al., 2008;</ref><ref type="bibr">Etter et al., 2011;</ref><ref type="bibr">Peterson et al., 2012)</ref>, such as insert size selection and its effects over paired-end sequence and marker selection, might be outdated for the preparation of current RAD libraries. Understandably, researchers will use the protocol that is the most accessible, often using the same library procedures a collaborator has used in the past. While we do not advocate against this practice, our intention is for investigators to explore their protocol of interest on their system of study -and its suitability in their biological system and experimental design -before making the time and monetary investment in library preparation and sequencing.</p><p>RADinitio allows for this exploration of protocol selection, restriction enzyme(s), and sequencing requirements in the early stages of the experimental process.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">| How to properly mitigate allelic dropout</head><p>The absence of alleles due to the presence of polymorphisms in individuals of the study population is an inevitable aspect of RADseq experiments. However, this fact does not limit the capacity of RADseq as a tool for population and conservation genetics or phylogenomics.</p><p>Poor template DNA, as well as errors in molecular library generation and sequencing strategy, are likely to account for a greater portion of missing data than natural polymorphism. Our simulations highlight that most issues encountered by experimenters may be due to problems with DNA quality, library preparation, and sequencing, and not by genetic variation within their biological system. The effects of poor data generation are often indistinguishable from true biological noise and without detailed assessment of the sequencing data -via</p></div></body>
		</text>
</TEI>
