Package: radinitio
RADinitioRADinitiois a pipeline for the assessment of RADseq experiments via prospective and retrospective data simulation. Sequencing data is generatedde novofrom a population of individuals via a coalescent simulation under a user-defined demographic model usingmsprime. The genetic variants in each sample are simulated in a genomic context that can impact downstream generation of RAD loci and sequencing reads. The per-individual sequences are then treated to anin silicoRADseq library preparation. The components of the library are defined by the user, allowing for the exploration of parameters including restriction enzyme selection, insert size, sequencing coverage, and PCR duplicate distribution (generated using thedecoratiosoftware).RADinitiosimulations can also be applied retrospectively by comparing and modelling sources of error in empirical datasets. The purpose ofRADinitiois for researchers to fully explore possible variables in their data generation process to ensure that their protocol selection and library preparation is performed optimally, within the limitations of technical and experimental error.CitationIf you useRADinitioin your work, please cite the2021Mol Ecol Resourmanuscript:Rivera-Colon, AG, Rochette, NC, Catchen, JM. (2021) Simulation with RADinitio improves RADseq experimental design and sheds light on sources of missing data.Mol Ecol Resour21: 363-378.https://doi.org/10.1111/1755-0998.13163InstallationRADinitiocan be installed from the Python Package Index (PyPI) using:python3-mpipinstallradinitioMore information regarding this installation can be obtained at theRADinitioPyPI Project page.Users can installRADinitioin their local Python directories using the--userflag:python3-mpipinstallradinitio--userAlternatively, the software can be downloaded from theCatchen Labwebsite and installed using the following commands:python3-mpipinstallradinitio-version.tar.gzOr for a local installation:python3-mpipinstallradinitio-version.tar.gz--userFor more information regarding thepipinstallation, please visit thepip user-guide.Requirements and dependenciesRADinitiorequires Python 3.9 or higher.RADinitiodepends on the following non-default Python packages:msprime(Kelleher et al. 2016;Baumdicker et al. 2022;https://tskit.dev/msprime/docs/latest/intro.html)decoratio(Rochette et al. 2023;https://pypi.org/project/decoratio/)scipy(Harris et al. 2020;https://scipy.org/)numpy(Virtanen et al. 2020;https://numpy.org/)Running thepipinstallation, from both PyPI or the the direct installation will take care of all dependencies, includingmsprime,decoratio,scipy,numpy.RADinitio manualA complete version of theRADinitiomanual including instructions for installation, documentation of command line variables, description of output files, and a tutorial to run the pipeline can be found at theRADinitiowebsite(Note: needs to be updated toRADinitiov1.2.0).Pipeline structureRADinitiois designed as a series of independent functions that simulate different aspects of the RADseq library preparation process. The pipeline can be broken down into three main steps:Variant generation and processingVariants are generated withmsprimefrom a user-defined demographic model. Independent simulations are run for different chromosomes/scaffolds present in a user-provided reference genome. The simulated variants are then projected against the reference genome to obtain the reference alleles, which are then converted into alternative alleles using a user-defined model. By default,RADinitiosimulates usingmsprime's island models; however, users can simulate more complex models using the Python API.Extraction of RAD allelesThe reference genome isin silicodigested to obtain a series of reference RAD loci. This can be done using a single or double enzyme digestion, for single- and double-digest RADseq, respectively. The positions of the reference loci in the genome are then used to filter the simulated variants for all samples to include only variants present in RAD loci, improving downstream performance. When RAD alleles are extracted, the reference RAD loci are modified to include the corresponding genetic variants for each sample. This process can alter a cutsite's sequence, resulting in a dropped allele for that sample.Simulate library enrichment and sequencingOnce extracted, the alleles for each sample are randomly sampled to obtain paired-end sequences for each allele template. The alleles are sampled with replacement, proportional to the desired sequencing coverage of the library. Each iteration of the sampling is treated as an independent sequence template that is truncated to a random length sampled from a simulated insert size distribution (or digested with a second enzyme, as is the case with ddRAD). An optional PCR duplicate distribution, as specified using thedecoratiosoftware, can be applied to the sampling process, resulting in the duplicate sampling of unique template sequences. This process can also introduce random error to the sequence, simulating the generation of PCR errors. Finally, paired end sequences are generated from each template, each with its own unique (simulated) sequencing error.The corresponding functions for each stage can be run independently. We do provide a wrapper script,radinitio, that calls the top-levelradinitio.simulate()function which runs the pipeline from start to finish. Advanced users can run the pipeline through the Python API, which allows for the generation of more complex demographic models, define finer details of the library preparation process, and run components of the pipeline independently.Command line interfaceThe simplest way to runRADinitiois to execute the module via theradinitiocommand line
wrapper, which (by default) calls the top-levelradinitio.simulate()function, which runs all the stages of the
pipeline.Usage & optionsTheradinitioprogram options are the following:radinitio--genomepath--out-dirdir[pipeline-stage][--chromosomespath]\[(demographicmodeloptions)][(libraryoptions)][(pcroptions)][(advancedoptions)]Pipeline stages (these options are mutually exclusive)--simulate-all: Run all theRADinitiostages (simulate a population, make a library, and sequence the library) (Default)--make-population: Simulate and process variants. Produces genome-wide VCF.--make-library-seq: Simulate and sequence a RAD library. Requires existingradinitio.make-populationrun.--tally-rad-loci: Calculate the number of kept RAD loci in the genome.Required input/output-g,--genome: (str) Path to reference genome (fasta file, may be gzipped).Required-o,--out-dir: (str) Path to an output directory where all files will be written.RequiredInput genome options-l,--chromosomes: (str) File containing the list of chromosomes (one per line) to simulate. (default =None)-i,--min-seq-len: (int) Minimum length in bp required to load a sequence from the genome fasta. (default = 0)Demographic model (simple island model)-p,--n-pops: (int) Number of populations (demes) in the island model. (default = 2)-n,--pop-eff-size: (float) Effective population size of each simulated deme. (default = 5000)-s,--n-seq-indv: (int) Number of individuals sampled from each population. (default = 10)Library preparation/sequencing-b,--library-type: (str) Library type (sdRAD or ddRAD). (default =sdRAD)-e,--enz: (str) Restriction enzyme (SbfI,PstI,EcoRI,BamHI, etc.). (default =SbfI)-d,--enz2: (str) Second restriction enzyme for double digest (MspI,MseI,AluI, etc.). (default =MspI)-m,--insert-mean: (int) Insert size mean in bp. (default = 350)-t,--insert-stdev: (int) Insert size standard deviation in bp. (default = 37)-j,--min-insert: (intorNone) Minimum insert length in bp; overridesinsert-meanandinsert-stdev. (default =None)-x,--max-insert: (intorNone) Maximum insert length in bp; overridesinsert-meanandinsert-stdev. (default =None)-v,--coverage: (int) Sequencing coverage. (default = 20)-r,--read-length: (int) Sequence read length. (default = 150)-f,--read-out-fmt: (str) Format for the output reads, FASTA or FASTQ. (default =fasta)PCR model options-c,--pcr-model: (str) PCR amplification model fromdecoratio. Available models are log-normal (lognormal), log-skew-normal (logskewnormal), inherited efficiency (inheff), and inherited efficiency beta (inheffbeta). (default =None)-y,--pcr-cycles: (int) Number of PCR cycles. (default =None)--pcr-deco-ratio: (float)Depth/complexity ratio.  (default = 0.1)--pcr-inheff-mean: (float) Mean amplification factor for inherited efficiency amplification models (inheffandinheffbeta). (default = 0.7)--pcr-inheff-sd: (float) Standard deviation for the amplification factor in the inherited efficiency amplification models (inheffandinheffbeta). (default = 0.1)--pcr-lognormal-sd: (float) Standard deviation for log-normal (lognormal) and log-skew-normal amplification models (logskewnormal).  (default = 0.2)--pcr-lognormal-skew: Skew for log-skew-normal (logskewnormal) amplification model.  (default = -1)make-library-seq()-specific options--make-pop-sim-dir: (str) Directory containing a previousradinitio.make-populationrun. Cannot be the same asout-dir.Additional options-V,--version: Print program version.-h,--help: Display this help message.Advanced options (can be left default for the large majority of cases)--genome-rec-rate: (float) MsprimeOptions: Average per-base per-generation recombination rate for the whole genome. (default = 3e-8)--genome-mut-rate: (float) MsprimeOptions: Average per-base per-generation mutation rate for the whole genome. (default = 7e-8)--pop-mig-rate: (float) MsprimeOptions: Total per-population per-generation immigration rate. (default = 0.001)--pop-growth-rate: (float) MsprimeOptions: Population per-generation growth rate. (default = 0.0)--lib-bar1-len: (int) LibraryOptions: Length of the forward-read barcode in bp. (default = 5)--lib-bar2-len: (int) LibraryOptions: Length of the reverse-read barcode in bp. (default = 0)--lib-5-error: (float) LibraryOptions: Frequency of sequencing errors at the 5' end of the reads. (default = 0.001)--lib-3-error: (float) LibraryOptions: Frequency of sequencing errors at the 3' end of the reads. (default = 0.01)--lib-min-dist: (int)  LibraryOptions: Minimum distance between adjacent loci from different cutsites in bp. (default = 1000)--lib-base-len: (int) LibraryOptions: Base length for reference locus extraction in bp. (default = 1000)--lib-max-prop-n: (float) LibraryOptions: Maximum proportion of Ns that can be present in the reference locus sequence. (default = 0.1)--mut-indel-prob: (float) MutationModel: Probability of indels. (default = 0.01)--mut-ins-del-ratio: (float) MutationModel: Ratio of insertions to deletions. (default = 1.0)--mut-subs-model: (str) MutationModel: Substitution Model, equal probability among all substitutions (equal), transitions are 2x more likely (ts), or transversions are 2x more likely (tv). (default =equal)--pcr-pol-error: (float) PCRDups: Probability of PCR errors, based on the error rate of the Phusion HF polymerase. (default = 4.4e-7)ExamplesGetting startedThe simplestRADinitiosimulation requires just the specification of a reference genome fasta (--genome) and an output directory (--out-dir). The reference sequence (reference.fa.gzin this example) is a fasta file containing the genomic sequences of one or more chromosomes/scaffolds. The reference sequences can be at a chromosome-level, or broken into smaller scaffold sequences. The file can be compressed (gzipped) or uncompressed.Using the default parameters runs the whole simulation pipeline and generates all possible outputs (--simulate-all). This will simulate a standard island model for 2 populations, sequencing 10 individuals per population (20 total). The single-digest library will be made with the enzymeSbfI, using the default insert size distribution (mean 350 bp and stdev 35bp) and generating 2x150bp reads at 20x coverage.radinitio--simulate-all\# Execute the complete pipeline (--simulate-all default)--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./simple-simulation/# Path to output directoryControlling the input reference sequencesTheradinitiocommand line options allow the user to control which sequences in the reference genome are used for the simulations, without the need to modify the input fasta file. The next example uses a chromosome list file (specified with--chromosomes). This file contains a list with the sequence IDs that the user wants to use for the simulation, one per line. The IDs in this file must be as they appear on thereference.fa(NOTE: without the ">", as this is part of the fasta header!). The file follows the following structure:chr1
chr2
chr3
...Only the sequences on the list will be used as input for the simulations. This is important when working with highly fragmented assemblies or those with many small unplaced scaffolds, allowing the user to simulate only over the chromosome-scale sequences, for example. If this option is not provided,RADinitiowill simulate over all the sequences in the input fasta.Here we run the same defaultRADinitiosimulation as before, but instead we provide achrom_list.txtfile containing the IDs of the target sequences of interest.radinitio--simulate-all\# Execute the complete pipeline (--simulate-all default)--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./simple-simulation/\# Path to output directory--chromosomes./genome/chrom_list.txt# Path to the list of the target chromosomesIn addition to the use of--chromosomes, the input sequences can be filtered according to their length using the--min-seq-lenoption. The simulations will be performed only for sequences larger than the specified value. Here, we run the defaultRADinitiosimulation, keeping only sequences larger than 1 Mbp.radinitio--simulate-all\# Execute the complete pipeline (--simulate-all default)--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./simple-simulation/\# Path to output directory--min-seq-len1000000# Only keep reference sequences larger than 1,000,000 bpTheradinitio.logfile reports the number of sequences read from the reference genome fasta file, as well as those kept after selection/filtering. For example, here the reference genome contained 1,844 total sequences; however, we only selected 24 (e.g., 24 chromosomes) for downstream analysis.Loadingthegenome...Read1,844sequencesfromtheinputFASTA.Loaded24chromosome/scaffoldsequences.Modifying the library parametersRADinitioallows the user to specify the parameters of their simulated RADseq library. By default, as done in the previous examples, the software simulates a single-digest RADseq (sdRAD) library, following the protocols published byBaird et al. (2008)andEtter et al. (2011). This library uses theSbfIrestriction enzyme to generate a library with an insert size distribution of an mean length of 350bp (standard deviation 37bp), coverage of 20x, read length of 150bp (2x150bp paired-end), and no PCR amplification. The default simulation is equivalent to:radinitio--simulate-all\# Execute the complete pipeline--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./simulations_sdRAD/\# Path to output directory--library-typesdRAD\# Simulate a single-digest library--enzSbfI\# Use the SbfI enzyme--insert-mean350\# Insert size mean of 350bp--insert-stdev37\# Insert size stdev of 37bp--coverage20\# Depth of coverage of 20x--read-length150# Read length of 150bp (paired-end 2x150bp)Instead, we can generate a library under completely different parameters. Here, we generate a double-digest RADseq (ddRAD) library, based on thePeterson et al. (2012)protocol. This library uses thePstIrestriction enzyme as the main (or rare) cutter andMspIas the secondary (or common) cutter. Instead of the default insert size distribution (which uses insert size mean and standard deviation), we are specifying a fixed insert size range of 225-475 bp. We are also sequencing this library using 2x100bp paired-end reads (instead of the default 150bp) at a higher coverage of 30x. Additionally, we are retaining only sequences larger than 10 Kbp for the simulations.radinitio--simulate-all\# Execute the complete pipeline--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./simulations_ddRAD/\# Path to output directory--min-seq-len10000# Only keep reference sequences larger than 10,000 bp--library-typeddRAD\# Simulate a double-digest library--enzPstI\# Use the PstI enzyme as the main (rare) cutter--enz2MspI\# Use the MspI enzyme as the secondary (common) cutter--min-insert225\# Min insert size of 225 bp--max-insert475\# Max insert size of 475 bp--coverage30\# Depth of coverage of 30x--read-length100# Read length of 100bp (paired-end 2x100bp)More advanced parameters for the library preparation options are available in the command line options (e.g.,--lib-bar1-lento specify the length of barcode sequences removed from the reads, or--lib-5-error/--lib-3-errorto control sequencing errors). However, these options can be left default for the vast majority of simulations. Advanced users can additionally control these options in theradinitio.LibraryOptions()class in the Python API.PCR duplicates modelRADinitiocan be used to simulate and study PCR duplicates, a common artifact in empirical RADseq libraries, which have wide-spread implications for allelic dropout and genotyping accuracy. For further details on the effects of PCR duplicates in RADseq libraries, seeRochette et al. (2023),Rivera-Colón et al. (2021), andRivera-Colón & Catchen (2022).TheRADinitiopipeline can simulate a PCR model, which generates a distribution of PCR clone sizes and errors, which are then used when sampling sequencing reads. This model introduces both PCR duplicate reads and mutations in the sequencing reads, mimicking the error patterns seen in real-life RADseq libraries. The generation of this PCR model is off by default; however, the user can define the parameters of an amplification model from theradinitiowrapper command line options, or with theradinitio.PCRDups()class in the Python API.When no--pcr-modelis selection, theradinitio.logreports the following information:PCRmodeloptions:PCRamplificationmodel:None(NoPCR)PCRcycles:NonePCRduplicaterate:0.00%We see that no PCR model was selected (defaults toNone). Thus, there were no PCR cycles applied, and the PCR duplicate rate is 0% (i.e., each individual sequencing reads was sampled from an unique template).In contrast, the user can choose and apply a PCR model to the downstream data. Since version1.2.0,RADinitiouses the PCR models described by thedecoratiosoftware (Rochette et al. 2023). These PCR models are largely comprised of two steps: 1) an amplification model (which describes the amplification probability and noise applied over some number of PCR cycles) and 2) a depth/complexity ratio which describes how the sequenced reads are sampled from the pool of amplified molecules.The different PCR models can be specified inradinitiousing the--pcr-modelflag. Two main types of models are available, each with two main variants (4 models total). First, the inherited efficiency models described inBest. et al. (2015). When choosing--pcr-model inheffthe user controls the amplification probability and noise by controlling the mean (--pcr-inheff-mean) and standard deviation (--pcr-inheff-sd) of a normal distribution defining the amplification probability of the virtual molecules across a number of PCR amplification cycles (--pcr-cycles). A related model,inheffbeta, uses a beta distribution for parametrization purposes instead of the normal distribution, and produces similar results. By default,radinitiouses 0.7 and 0.1 for the mean and standard deviation of these distributions, respectively.The second class of amplification models defined the amplification probability based on a log-normal distribution. Both models (lognormalandlogskewnormal) use the standard deviation of the distribution (specified with--pcr-lognormal-sd) as the main parameter controlling amplification probability and noise. Thelogskewnormalmodel uses the skew of the distribution (--pcr-lognormal-skew) as an additional parameter. For more information of these models and their specification please check thedecoratiomanuscript (Rochette et al. 2023) and documentation (https://bitbucket.org/rochette/decoratio/src/master/).In addition to the amplification model, the other (and more important parameter) controlling the PCR duplicate distribution is thedepth/complexityratio. This value describes the ratio of sequenced molecules (the depth of coverage) to the molecular complexity (the number of unique molecules). In other words, if sequencing at 30x, but the complexity is 10 molecules, the library has a depth/complexity ratio of 3:1. This means that, while it is possible to sequence 30 reads, only 10 of them can have unique information and the remaining 20 reads will be duplicates.radinitiousers can specify this ratio using the--pcr-deco-ratiooption. Smaller values (<1) will generally reduce the rate of PCR duplicates seen in the simulated library. SeeRochette et al. (2023)for further information regarding the depth/complexity ratio.Simulating libraries with low/moderate PCR duplicate rateUsing the models and parameters described above,radinitiousers can simulate a RADseq library containing a low-to-moderate number of PCR duplicates. We are using the default library construction parameters (single-digest withSbfI, 20x coverage, 2x150bp reads, 350bp insert mean and 37bp insert stdev). Additionally, we are applying an inherited efficiency amplification model (--pcr-model inheff). The mean amplification probability is 45% (--pcr-inheff-mean 0.45) with a standard deviation of 20% (--pcr-inheff-sd 0.2) for 12 cycles of PCR (--pcr-cycles 12). This means that a DNA molecule would have a 45% chance of being amplified in each of the 12 PCR cycles. This distribution produces both lower and noisier amplification probabilities than the default inherited efficiency model (mean of 0.7 and stdev of 0.1). Finally, we are also setting the depth/complexity ratio to 1:10 (--pcr-deco-ratio 0.10).radinitio--simulate-all\# Execute the complete pipeline--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./simulations_sdRAD/\# Path to output directory--library-typesdRAD\# Simulate a single-digest library--enzSbfI\# Use the SbfI enzyme--insert-mean350\# Insert size mean of 350bp--insert-stdev37\# Insert size stdev of 37bp--coverage20\# Depth of coverage of 20x--read-length150\# Read length of 150bp (paired-end 2x150bp)--pcr-modelinheff\# Inherited efficiency amplification model--pcr-cycles12\# Amplify for 12 PCR cycles--pcr-inheff-mean0.45\# Mean amplification of 45%--pcr-inheff-sd0.2\# Stdev amplification of 20%--pcr-deco-ratio0.10# De/Co ratio of 1:10 or 0.1After running this simulation, we can see the description of the PCR model on theradinitio.logfile:PCRmodeloptions:PCRamplificationmodel:inheff:12:0.45:0.2PCRcycles:12depth/complexityratio:0.1PCRduplicatesrate:17.432%This PCR model generated a PCR duplicate rate of 17.4%. We can see a per-clone size breakdown of the frequency of these duplicates (i.e., the proportion of clones with a given number of duplicates) in thesequenced_clone_distrib.tsvfile. Additionally, the log reports the parameters of the model, including the number of cycles, depth/complexity ratio, and the "model string". This "model string" (inheff:12:0.45:0.2in this example) is the definition of the model, as specified bydecoratio. In this example, the string describes (in order, separated by ":"): 1) the selected model (inheff), number of PCR cycles (12), mean amplification probability (0.45), and the amplification probability standard deviation (0.2). Different models used byRADinitiohave different specifications and model string. See thedecoratiodocumentation for additional details on model specifications.Simulating libraries with high PCR duplicate ratesRADinitiousers can also change the PCR amplification models to simulated RADseq libraries with elevated duplicate rates. While this is something researchers want to avoid in their empirical libraries, experimenting with high PCR duplicates in simulations may be useful (e.g., to observe how the added noise affects the recovery and genotyping of loci and the reconstruction of biological information).In this example, we repeat the general library construction process from above (single-digest withSbfI, 20x coverage, 2x150bp reads, 350bp insert mean); however, we modify the PCR parameters to 1) increase the noise of the inherited efficiency amplification model , and 2) drastically increase the depth/complexity ratio (from 0.1 to 10).radinitio--simulate-all\# Execute the complete pipeline--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./simulations_sdRAD/\# Path to output directory--library-typesdRAD\# Simulate a single-digest library--enzSbfI\# Use the SbfI enzyme--insert-mean350\# Insert size mean of 350bp--insert-stdev37\# Insert size stdev of 37bp--coverage20\# Depth of coverage of 20x--read-length150\# Read length of 150bp (paired-end 2x150bp)--pcr-modelinheff\# Inherited efficiency amplification model--pcr-cycles12\# Amplify for 12 PCR cycles--pcr-inheff-mean0.25\# Mean amplification of 25%--pcr-inheff-sd0.5\# Stdev amplification of 50%--pcr-deco-ratio10# De/Co ratio of 10:1 or 10After completing the simulation, we evaluate the results provided in theradinitio.logfile.PCRmodeloptions:PCRamplificationmodel:inheff:12:0.25:0.5PCRcycles:12depth/complexityratio:10PCRduplicatesrate:94.019%We obtain 94% PCR duplicates! Notice how we didn't change the number of PCR cycles, after all, the individual contribution of the number of cycles to PCR duplicate is negligible (seeRochette et al. (2023)). This increase in PCR duplicates is mainly the product of the depth/complexity ratio, as we are sequencing 10x more reads than there are available molecules in the library. This is further exacerbated by the increased noisiness in the PCR amplification. While this is an extreme case, it provides an example of the behavior of the PCR models inRADinitioand provides useful guidelines for the monitoring of empirical RADseq experiments when elevated PCR duplicate rates are observed.WARNING: Very noisy PCR amplification models can take a long time to run. Similarly, models withveryextreme values can also fail due to several reasons. For example, if amplified clones reach very large sizes, they can trigger infinity-related errors when extracting the amplified clone size distribution.Changing the demographic modelTheradinitiowrapper script simulates a population using an island model frommsprime(Kelleher et al. 2016;Baumdicker et al. 2022). By default, this model simulates two populations, each with an effective population size (Ne) of 5,000 individuals. Ten individuals are sampled and sequenced per population, for a total of 20 individuals in the library.The wrapper script allow the user to modify some parameters of this model. For example, the user can change the number of populations (--n-pops), the effective size of the populations (--pop-eff-size), and the number of sampled individuals per population (--n-seq-indv). Other parameters, e.g., controlling the migration rate (--pop-mig-rate), growth rate (--pop-growth-rate), and mutation rate (--genome-mut-rate), are available in the advanced options.As an example, we can run a new simulation (running the whole pipeline with--simulate-all) simulating a new island model with 4 populations, each with an effective population size (Ne) of 2,500 individuals. We sampled 25 individuals per population, for a total of 100 sequenced individuals. We will also increase the total per-population, per-generation immigration rate between these populations to 2.5%. The library is generated with default parameters (e.g., single-digest withSbfI, coverage of 20x, read length of 150bp, insert distribution of 350bp, stdev 35bp, no PCR).radinitio--simulate-all\# Execute the complete pipeline--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./sims_sdRAD_4pops/\# Path to output directory--n-pops4\# Number of populations in the island model--pop-eff-size2500\# Effective size (Ne) of the populations--n-seq-indv25\# Number of individuals to sequence per-population (100 total)--pop-mig-rate0.025# Per generation immigration rate--library-typesdRAD\# Simulate a single-digest library--enzSbfI# Use the SbfI enzymeThe options in the wrapper are useful for more general simulations, e.g., studying the effects of genetic diversity over the final RADseq library. However, they are limited to a relatively simple island model and the parameters are applied equaly to all populations (i.e., all populations will be of the same size and migration rates will be symmetrical). More detailed demographic models are available through themsprimedocumentation.RADinitiousers can implement these complex simulations using themsprimePython API, after which they can generatein silicoRADseq libraries from the simulated populations (see section on--make-library-seqbelow).Tallying RAD loci in the genomeThe most common application ofRADinitiois simulating anin silicodigestion to estimate the number of RADseq loci in an experiment. This estimation is commonly used to estimate sequencing coverage and individuals in a library during experimental design (see section 2.3 inRivera-Colón & Catchen (2022)for an example).An estimation of the number of RADseq loci in a genome can be easily generated using the--tally-rad-locioption in theradinitiowrapper script. This option only identifies and filters the RADseq loci found in the genome based on the library properties, skipping the simulation of the population(s) and the generation of sequencing reads.For example, here we tally the number of RADseq loci in the genome using the default library parameters (single-digest library withSbfI).radinitio--tally-rad-loci\# Execute just the tallying of loci--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./tally_sbfi_loci/\# Path to output directory--library-typesdRAD\# Simulate a single-digest library--enzSbfI# Use the SbfI enzymeTheradinitio.logfile will report the distribution of RAD loci found in the genome. In this case, based on the single-digestSbfIsimulation we find the following information in theradinitio.log(for versions1.2.0or higher):ExtractingRADloci...Foundatotalof6,120SbfIlociinthegenome(usethisnumberforcoveragecalculations).Removed3loci(0.0%)tooclosetotheendsofthereferencesequences.Removed2loci(0.0%)containingexcess(>10.0%)ofNsinsequence.Removed428loci(7.0%)incloseproximity(<1000bp)toanotherlocus.Retained5,687loci(92.9%)fordownstreamanalysis.See`./output/tally-rad-loci/ri_sdRAD_sbfI/ref_loci_vars/reference_rad_loci.stats.gz`foradetaileddescriptionoftheper-cutsitepositionandstatus.In this example,RADinitiofound 6,120SbfIloci in the genome. Since this is a single-digest library, this means 3,060 instances of theSbfIrecognition sequence (CC|TGCAGG) were found in the genome. Each cutsite yields two loci: one in the negative and one in the positive DNA strand. The two loci originating from a single restriction enzyme cutsite are treated as separate objects and are independently filtered. As stated by the log, these 6k loci can be used to estimate sequencing coverage and number of pooled individuals in the real library.However, not all loci are retained for downstream analysis.RADinitiofilters certain loci based on the properties of the sequence. For example, here 3 loci are removed from the analysis as they are too close to the end of the sequence. This distance is equal to the base size of each reference locus. By default, this distance is 1Kbp, and can be controlled with the--lib-base-lenadvanced option. These loci are removed since it would not be possible to extract a complete sequence from the reference. Also, loci can be removed if their reference sequence contains an excess of uncalled bases (orNs), by default 10% (controlled with the--lib-max-prop-nadvanced option). These loci are removed to prevent extracting loci spanning large gaps or regions with uncertain sequences.More commonly, loci are removed due to their proximity to one another, as happened for 428 (or 7% of loci here). A locus is removed when it is under 1,000 bp (by default, controlled by--lib-min-dist) away from a another locus originating from a different restriction enzyme cutsite. This filtering process serves two purposes: first, it mimics the real-life process of shearing efficiency during library preparation, where shearing efficiency decreases for smaller DNA molecules, reducing the chance of recovering a molecule of the right size. Secondly, it removes loci originating from tandemly duplicated and/or repetitive cutsites. Many of these loci would be overlapping with one another in a real RADseq library, and their enzymatic digestion and shearing would be impacted by their close proximity.Lastly, thereference_rad_loci.stats.gzfile (full path provided in theradinitio.log) provides a locus-by-locus description of the status of each loci. The file reports the ID for the sequence in which the locus is located (#chrom_id), the basepair coordinate in which the main cutsite was found (cut_pos), the direction of the tag (tag_dir) in the DNA strand, and thestatusof each locus. An individual locus can be kept for downstream analysis (kept) or removed for one of the reasons described above, e.g., too close the end of the sequence (rm_chrom_end) or too close to an adjacent locus (rm_too_close).#chrom_id  cut_pos  tag_dir  statuschr111811negkept
chr111811poskept
chr2329negrm_chrom_end
chr2329poskept
chr324972negkept
chr324972poskept
chr43940negkept
chr43940poskept
chr415514negkept
chr415514poskept
chr55137negkept
chr55137poskept
chr522829negkept
chr522829posrm_too_close
chr522954negrm_too_close
chr522954poskept
chr614834negrm_excess_Ns
chr614834posrm_excess_Ns
chr627346negkept
chr627346poskept
...We can alter the properties of the simulated library to look at how the number of estimated loci changes. In this example, we will simulate a new single-digest library changing the restriction enzyme from the defaultSbfI(which was an 8-bp recognition sequence) toEcoRI(which has the 6-bp recognition sequenceG|AATTC).radinitio--tally-rad-loci\# Execute just the tallying of loci--genome./genome/reference.fa.gz\# Path to reference genome--out-dir./tally_ecoRI_loci/\# Path to output directory--library-typesdRAD\# Simulate a single-digest library--enzEcoRI# Use the EcoRI enzymeFrom this simulation we obtain:ExtractingRADloci...Foundatotalof25,836EcoRIlociinthegenome(usethisnumberforcoveragecalculations).Removed14loci(0.0%)tooclosetotheendsofthereferencesequences.Removed26loci(0.1%)containingexcess(>10.0%)ofNsinsequence.Removed4,648loci(18.0%)incloseproximity(<1000bp)toanotherlocus.Retained21,148loci(81.8%)fordownstreamanalysis.As expected, given the smaller restriction enzyme recognition sequence, we find far moreEcoRIloci in the genome--25.8 thousand compared to the 6 thousand found withSbfI. When preparing an empirical library, the user would have to take into account how this order of magnitude difference in the number of loci would impact sequencing coverage and the number of samples in a library. Most importantly, we see how the increase in the number of loci impacts their filtering, as a higher proportion of loci are removed due to close proximity.Tallying loci in ddRAD librariesThe identification of loci in single-digest loci in RADseq libraries depends only on the distribution of the restriction enzyme recognition sequence in the genome. However, in ddRAD libraries the retained loci are impacted by the enzyme combination in addition to the insert size range (see Figure 4 inRivera-Colón et al. 2021).RADinitioallows users to simulate both the enzyme selection and insert size range when tallying loci from ddRAD libraries.Here, we tally the number of loci in a ddRAD library generated using theEcoRIenzyme as the main cutter andMseIas the secondary (common) cutter. We are using the default insert size distribution (mean of 350bp and stdev of 37bp). This distribution corresponds to a mimumum insert size of 276bp and a max insert size of 424bp (i.e., can also be specified with the--min-insert/--max-insertoptions).radinitio--tally-rad-loci\# Execute just the tallying of loci--genome./genome/reference.fa.gz\# Path to the reference genome--out-dir./count_ddrad_loci/\# Path to output directory--library-typeddRAD\# Simulate double-digest library--enzEcoRI\# Use the EcoRI enzyme as the main (rare) cutter--enz2MseI\# Use the MseI enzyme as the secondary (common) cutter--min-insert276\# Minimum insert size of 276 bp--min-insert424# Maximum insert size of 424 bpAfter running this simulation we find:ExtractingRADloci...Foundatotalof16,064EcoRI-MseIloci(insertsizerange:276-424bp)inthegenome(usethisnumberforcoveragecalculations).Note:anadditional9,550lociwerefoundoutsidethetargetinsertsizerange.Removed4loci(0.0%)tooclosetotheendsofthereferencesequences.Removed11loci(0.1%)containingexcess(>10.0%)ofNsinsequence.Removed2,898loci(18.0%)incloseproximity(<1000bp)toanotherlocus.Retained13,151loci(81.9%)fordownstreamanalysis.As for the single-digest examples above, for ddRAD libraries theradinitio.logfile reports a total number of loci found in the genome (16 thousand in this example) which can be used for coverage estimations. Similarly, the log reports the filter of loci due to proximity with other loci and/or to the edge of sequences. A key difference between the single- and double-digest simulations is thatRADinitioreports the presence of additional ddRAD loci present outside the size range. The line starting withNotereports that, in addition to our 16 thousand loci, an additional 9,550 are found outside the 276-424bp size range. These loci are reported with the status ofrm_no_dd_cutsin thereference_rad_loci.stats.gzfile. By changing the size range, the user can determine the number of additional loci retained under different library conditions.Here, we simulate the same library as before (ddRAD withEcoRIandMseI); however, we increase the size selection range by about 100bp (50bp in each direction), from 225bp to 475bp.radinitio--tally-rad-loci\# Execute just the tallying of loci--genome./genome/reference.fa.gz\# Path to the reference genome--out-dir./count_ddrad_loci/\# Path to output directory--library-typeddRAD\# Simulate double-digest library--enzEcoRI\# Use the EcoRI enzyme as the main (rare) cutter--enz2MseI\# Use the MseI enzyme as the secondary (common) cutter--min-insert225\# Minimum insert size of 225 bp--min-insert475# Maximum insert size of 475 bpAfter simulating a ddRAD library with this increased insert size range we find:ExtractingRADloci...Foundatotalof20,465EcoRI-MseIloci(insertsizerange:225-475bp)inthegenome(usethisnumberforcoveragecalculations).Note:anadditional5,149lociwerefoundoutsidethetargetinsertsizerange.Removed4loci(0.0%)tooclosetotheendsofthereferencesequences.Removed11loci(0.1%)containingexcess(>10.0%)ofNsinsequence.Removed3,667loci(17.9%)incloseproximity(<1000bp)toanotherlocus.Retained16,783loci(82.0%)fordownstreamanalysis.The number of found loci increased from 16 thousand to over 20 thousand. The 100bp-increase in the insert size range lead to about 4 thousand more loci being included in the library. We see that over 5 thousand more loci are still found outside the size range, and thus this parameter could be further optimized to recover more loci.Note, however, that many of these loci might not be recoverable experimentally, e.g., too small to be feasibly sequenceable (if they are smaller than the desired read length) or larger than the capacity of the PCR and/or sequencer. Thus, the objective is not to recover all the available loci in the genome.Simulating a population and generating genomic variantsThe--make-populationoption from theradinitiowrapper allows the user to run the initial stage of theRADinitiopipeline, simulating a population using themsprimeisland model and generating a genome-wide VCF with the simulated genetic variants. This mode is library agnostic, and does not extract RADseq loci nor generates sequencing reads. The purpose of this mode is to generate a fixed set of genetic variants that can then be processed under a variety of library configurations (see--make-library-seqexample below).In this example, we will runRADinitiounder the--make-populationmode. We will simulate an island model of 6 populations or demes, each with an effective population size of 10,000. We will sequence 25 individuals per population, or 150 individuals in total. Additionally, we will filter the input genome to only keep sequences larger than 1 Mbp.radinitio--make-population\# Simulate the population only--genome./genome/reference.fa.gz\# Path to the reference genome--min-seq-len1000000\# Only keep reference sequences larger than 1,000,000 bp--out-dir./mpop_p6_ne10k_n25/\# Path to output directory--n-pops6\# Simulate 6 populations--pop-eff-size10000\# Each population has an Ne of 10,000--n-seq-indv25# Sample 25 individuals per populationThis mode will generate three main outputs (see description of outputs below):Anmsprime_vcfs/directory with the raw simulated variants for each individual sequenceA genome-wide VCF containing the combined sequences from all simulated chromosomes (ref_loci_vars/ri_master.vcf.gz)A population map file (popmap.tsv) containing the ID of each individual and assignment to a given population.Simulate a library from an existing population and variantsUsing the--make-library-seqoption from theradinitiowrapper, the user can generate anin silicoRADseq library using an existing population simulation. Most commonly, this existing population will be the product of anradinitio --make-populationsrun; however,--make-library-seqcan be generated from a custommsprime(or other simulators such asSLiMorstdpopsim) run made by the user.To runradinitioin the--make-library-seqpipeline stage, the user must provide a directory containing an existing population simulation (--make-pop-sim-dir). This directory must not be the same output directory for the run, and must contain a genome-wide master VCF as well as a population map, as described above for--make-population.Here, we take our previous simulation of 6 populations and 150 individuals and simulate a single-digest RADseq library. The library will have a mean insert size of 450 bp (stdev of 50bp), will be PCR amplified using a default inherited efficiency model for 9 cycles, and sequenced to 30x of coverage. The output of 2x100 bp reads will be exported in fastq format (--read-out-fmt fastq). We will additionally simulate over a specific set of chromosomes in the reference sequence.radinitio--make-library-seq\# Simulate and sequence a library--genome./genome/reference.fa.gz\# Path to reference genome--chromosomes./genome/chrom.list\# Path to the list of the target chromosomes--out-dir./SbfI_library/\# Path to the output directory--make-pop-sim-dir./mpop_p6_ne10k_n25/\# Path to the previous `make-populations` run--library-typesdRAD\# Simulate single-digest library--enzSbfI\# Use the SbfI enzyme--insert-mean450\# Insert size mean of 450bp--insert-stdev50\# Insert size std deviation of 50bp--pcr-modelinheff\# Inherited efficiency amplification model--pcr-cycles9\# Amplify for 9 PCR cycles--coverage30\# Sequence to 30x coverage--read-length100\# Read length of 100bp (2x100bp paired-end)--read-out-fmtfastq# Export reads in FASTQ formatAdditionally, we will simulate a double-digest library over that same existing population. The ddRAD library will be generated with thePstIandMspIrestriction enzymes, and size selected for a 250-450bp insert size range. The library will be PCR amplified using an inherited efficiency model for 9 cycles, and sequenced to 30x of coverage using 2x100bp reads, in fastq format. We will additionally simulate over a specific set of chromosomes in the reference sequence.radinitio--make-library-seq\# Simulate and sequence a library--genome./genome/reference.fa.gz\# Path to reference genome--chromosomes./genome/chrom.list\# Path to the list of the target chromosomes--out-dir./PstI-MspI_library/\# Path to the output directory--make-pop-sim-dir./mpop_p6_ne10k_n25/\# Path to the previous `make-populations` run--library-typeddRAD\# Simulate double-digest library--enzPstI\# Use the PstI enzyme as the main (rare) cutter--enz2MspI\# Use the MspI enzyme as the secondary (common) cutter--min-insert250\# Minimum insert size of 250 bp--min-insert450# Maximum insert size of 450 bp--pcr-modelinheff\# Inherited efficiency amplification model--pcr-cycles9\# Amplify for 9 PCR cycles--coverage30\# Sequence to 30x coverage--read-length100\# Read length of 100bp (2x100bp paired-end)--read-out-fmtfastq# Export reads in FASTQ formatAdditional examplesHow to generate a chromosome list fileThe simplest way to generate a chromosome list file is to extract the sequence IDs from the desired fasta. The IDs must not begin with the ">" character as this is part of the fasta header convention and not part of the ID. This can be done by piping a few commands in Bash:Open the gzipped file into the stream (zcat)Select the lines starting with>(grep)Remove any comments present after whitespace (cut)Remove the>(tr)Save to new file# Create a chrom_list.tsv from all the sequences in the gzipped referencezcatreference.fa.gz|grep'^>'|cut-f1-d' '|tr-d'>'>chrom_list.tsvThe user can apply other filters to remove additional sequences.Another way of generating a chromosome list file is by parsing the genomic index (*.fai) generated bysamtools faidx. SeeSAMtoolsdocumentationfor additional options. From the gzipped fasta...# Uncompress genomegunzipreference.fa.gz# Run samtools faidxsamtoolsfaidxreference.fa# Re-compress the genomegzipreference.faThe generated index follows the following structure (seedocs):scaf137000176061scaf260500376516061chr137057500991636061chr231613927377742926061chr329895000699151226061chr4291669041003083756061chr5292220051299613996061...The first and second columns correspond to the sequence IDs (notice they don't have the ">") and lengths, respectively. We can generate a chromosome list by, for example, filtering the sequences by length. Here we filter thefaifile to generate a chromosome list containing only sequences larger than 1Mbp using the programawk:catreference.fa.fai|awk'$2 > 1000000 {print $1}'>chrom_list.1mbp.tsvOutput directoriesThe outputs of a defaultradinitio --simulate-allrun are:$ls*
output_directory:
popmap.tsvradinitio.logsequenced_clone_distrib.tsv

output_directory/msprime_vcfs:
chr1.vcf.gzchr7.vcf.gzchr13.vcf.gzchr19.vcf.gz
chr2.vcf.gzchr8.vcf.gzchr14.vcf.gzchr20.vcf.gz
chr3.vcf.gzchr9.vcf.gzchr15.vcf.gzchr21.vcf.gz
chr4.vcf.gzchr10.vcf.gzchr16.vcf.gzchr22.vcf.gz
chr5.vcf.gzchr11.vcf.gzchr17.vcf.gzchr23.vcf.gz
chr6.vcf.gzchr12.vcf.gzchr18.vcf.gzchr24.vcf.gz

output_directory/rad_alleles:
msp_00.alleles.fa.gzmsp_10.alleles.fa.gz
msp_01.alleles.fa.gzmsp_11.alleles.fa.gz
msp_02.alleles.fa.gzmsp_12.alleles.fa.gz
msp_03.alleles.fa.gzmsp_13.alleles.fa.gz
msp_04.alleles.fa.gzmsp_14.alleles.fa.gz
msp_05.alleles.fa.gzmsp_15.alleles.fa.gz
msp_06.alleles.fa.gzmsp_16.alleles.fa.gz
msp_07.alleles.fa.gzmsp_17.alleles.fa.gz
msp_08.alleles.fa.gzmsp_18.alleles.fa.gz
msp_09.alleles.fa.gzmsp_19.alleles.fa.gz
dropped_alleles.tsv.gz

output_directory/rad_reads:
msp_00.1.fa.gzmsp_07.1.fa.gzmsp_14.1.fa.gz
msp_00.2.fa.gzmsp_07.2.fa.gzmsp_14.2.fa.gz
msp_01.1.fa.gzmsp_08.1.fa.gzmsp_15.1.fa.gz
msp_01.2.fa.gzmsp_08.2.fa.gzmsp_15.2.fa.gz
msp_02.1.fa.gzmsp_09.1.fa.gzmsp_16.1.fa.gz
msp_02.2.fa.gzmsp_09.2.fa.gzmsp_16.2.fa.gz
msp_03.1.fa.gzmsp_10.1.fa.gzmsp_17.1.fa.gz
msp_03.2.fa.gzmsp_10.2.fa.gzmsp_17.2.fa.gz
msp_04.1.fa.gzmsp_11.1.fa.gzmsp_18.1.fa.gz
msp_04.2.fa.gzmsp_11.2.fa.gzmsp_18.2.fa.gz
msp_05.1.fa.gzmsp_12.1.fa.gzmsp_19.1.fa.gz
msp_05.2.fa.gzmsp_12.2.fa.gzmsp_19.2.fa.gz
msp_06.1.fa.gzmsp_13.1.fa.gz
msp_06.2.fa.gzmsp_13.2.fa.gz

output_directory/ref_loci_vars:
reference_rad_loci_SbfI.fa.gzri_master.vcf.gz
reference_rad_loci_SbfI.stats.gzTop level directoryThe main (or top level) output directory of aradinitiosimulation run. Contains three text files, in addition to several subdirectories described below.Population MapA population map file (popmap.tsv) containing the ID of each individual and assignment to a given population. The popmap file is a tab-delimited file, with sample IDs in the first column, and population IDs in the second column. When running theradinitiowrapper, the sample IDs are labelled according to themsprimesimulation have themsp_prefix (ortsk_, inmsprime1.0.0+ versions).msp_00<tab>pop0
msp_01pop0
msp_02pop0
msp_03pop1
msp_04pop1
msp_05pop1
...PCR clones distributionThesequenced_clone_distrib.tsvcontains information regarding the sequenced clone distribution. This distribution is the product ofdecoratio's PCR model and is representative of the PCR duplicates observed in the simulated reads, if any. By default, no PCR cycles are enabled, thus the model returns:clone_sizen_errorsclone_prob000101.0110In this distribution, 100% of reads originate from a sequenced clone of size 1 (a clone containing a single molecule) without any errors. Since there was no PCR amplification, the original template molecule is sampled and "sequenced". However, if PCR cycles are defined by the user using the PCR models more complex clones can be sampled, resulting in PCR duplicates.clone_sizen_errorsclone_prob000100.722149118.58233e-05200.211999213.77304e-05221.25639e-05300.0521028311.10092e-05325.04165e-06331.72311e-06
...Here, theclone_sizedescribes the number of molecules in a clone. A clone size ofnmeans thatnmolecules where sampled from a single clone.ncopies of the same sequence will be saved as reads, withn - 1being PCR duplicates. Moreover, clones can also contain molecules with PCR error (n_errors). A clone of sizencan contain up tonmolecules with error.clone_probis the probability of sampling a clone with given size and error properties, and describes the distribution of PCR duplicates and errors in the simulated data.Log fileTheradinitio.logfile is generated in the top level output directory. It contains information about theRADinitioversion, a time stamp of the current run, as well as information on the different stages of the program.Msprime VCFsThemsprime_vcfs/directory containing the genetic variants simulated bymsprime(derived from thetskit.TreeSequence.write_vcf()function) for each individual chromosome.Reference loci/vars directoryTheref_loci_varscontains the reference information for the simulated RAD loci as well as the genome-wide variants generated from the population simulation.Genomic VCFA genome-wide VCF containing the combined sequences from all simulated chromosomes (ri_master.vcf.gz). Here, the variants simulated bymsprime, which may encode unspecified alleles, are projected against the sequence of the reference genome to determine the identify of the reference alleles. To determine alterative alleles,RADinitioimplements aMutationModel(), which can mutate the reference alleles based on a substitution model (specified with--mut-subs-model) and introduce indels at a specified rate (--mut-indel-prob).Reference RAD lociThe reference loci file reports the sequence of all the reference loci present in the genome, i.e., the genomic sequence corresponding to the 1 Kbp spanning the extracted loci. These sequenced are exported as a gzipped fasta file (reference_rad_loci.fa.gz).>t0000nref_pos=chr1:10818-11817
TGCAGGACTCTGTACAGCAGTTCACACACTTATACCTCCTGAGACGTGTTGTACATTTGTC...
>t0001pref_pos=chr1:11814-12813
TGCAGGATCAGACCATTGTGTTGTTATTGAGAGCTAGCGTTAGCTCCACCTCAAACCGGTA...
>t0002pref_pos=chr2:332-1331
TGCAGGGAGGGTGGGAGAACTTTCTCCGTTAACAAAAAATGAGGCTCCGTCTCTGTGATTC...
>t0003nref_pos=chr3:23979-24978
TGCAGGTCAGTGAACTCACCCCCACTGCAGGCGTCCTCTGGACTGAACCAACAGAAGCTGG...
>t0004nref_pos=chr3:24974-25973
TGCAGGCGATCCAGTCCACAGACCGGCTACCTGGATCATGCCGACGTCCGACAGTGTCTCC...The sequence IDs of each locus are composed oftfor "true locus", number representing the ordering of the cutsite in the genome (e.g.,0000for the first cutsite on position 11,811 of chr1), and eithernorpto denote loci in the negative and positive strand, respectively. The fasta header also provides the coordinates of the locus sequence in the reference. Note that locus from the negative strand have been reverser complimented, with the restriction enzyme overhang present at the 5' of the sequence.Locus StatusThereference_rad_loci.stats.gzfile provides a locus-by-locus description of the status of each loci. The file reports the ID for the sequence in which the locus is located (#chrom_id), the basepair coordinate in which the main cutsite was found (cut_pos), the direction of the tag (tag_dir) in the DNA strand, and thestatusof each locus. An individual locus can be kept for downstream analysis (kept) or removed for one of the reasons described above, e.g., too close the end of the sequence (rm_chrom_end) or too close to an adjacent locus (rm_too_close). When simulating ddRAD libraries, the file will also report loci with additional secondary cutsites outside the insert size range (rm_no_dd_cuts).#chrom_id  cut_pos  tag_dir  statuschr111811negkept
chr111811poskept
chr2329negrm_chrom_end
chr2329poskept
chr324972negkept
chr324972poskept
chr43940negkept
chr43940poskept
chr415514negkept
chr415514poskept
chr55137negkept
chr55137poskept
chr522829negkept
chr522829posrm_too_close
chr522954negrm_too_close
chr522954poskept
chr614834negrm_excess_Ns
chr614834posrm_excess_Ns
chr627346negkept
chr627346poskept
...RAD allelesTherad_alleles/directory contains per-individual gzipped fasta files containing the RAD alleles for each simulated sample. For each allele, the fasta headers contains the following information:>reference_locus_id:sample_id:allele_iHere,reference_locus_idrefers to the original reference locus the allele was generated.sample_idis themsprimesample id, andallele_irefers to the allele number (a1ora2in diploid individuals).>t0n:msp_0:a1
TGCAGGCACGCAAGCGGCTCTAGGGATTCCTTGAGAGGAAAAATGCAACGCTGGTTTAACG...
>t0n:msp_0:a2
TGCAGGCACGCAAGCGGCTCTAGGGATTCCTTGAGAGGAAAAATGCAACGCTGGTTTAACG...
>t1p:msp_0:a1
TGCAGGGGCCCCCGCACCACACGTTGGGAACCCCTGATTGACCAGAAACATATTAAAGTTG...
>t1p:msp_0:a2
TGCAGGGGCCCCCGCACCACACGTTGGGAACCCCTGATTGACCACAAACATATTAAAGTTG...RAD readsTherad_reads/contains per-individual gzipped paired-end fasta (or fastq) files containing the RAD reads for each simulated sample. For each individual read, the fasta headers contains the following information:reference_locus_id:sample_id:allele_i:clone_id:duplicate_i/read_pairThe basename of the read, which containsreference_locus_id:sample_id:allele_i, comes from the source locus of the reads.clone_idrefers to the source template id, whileduplicate_iis the duplicate number for each read in the clone.read_pairis the standard designation for paired-end reads,/1for forward read and/2for the corresponding paired read.Notice in the fasta example below that for reads 3 and 4, they both have aclone_idof 3. Read 3 has aclone_iof 1, meaning is the first read in the clone. Read 4 has aclone_idof 2, meaning it is the second read in the clone and thus a duplicate product of PCR.>t5n:msp_0:a2:1:1/1
TGCAGGCTTAGGCTACACCCAACGAGCCACTGGGTGCAGTTGGACCCGAGGGATCTGTAT...
>t4n:msp_0:a1:2:1/1
TGCAGGTCTCCTGCTACCACCATTCCACCTGTGCAGCTCATCCAGAATGCAGCAGCTCCA...
>t2n:msp_0:a2:3:1/1
TGCAGGAAGAGACGAACCCATCGCCAGTACCACCCCCTGTACATCTGACATCACTCTTAC...
>t2n:msp_0:a2:3:2/1
TGCAGGAAGAGACGAACCCATCGCCAGTACCACCCCCTGTACATCTGACATCACTCTTAC...
>t5p:msp_0:a1:4:1/1
TGCAGGGCTTCCACTCCATACTTGTAAAATTAGGGGAAAACACTTTTTTTAACCTCCCAG...The contents ofrad_reads/contain the main output of RADinitio. These reads behave as empirical paired-end reads and are fully compatible with the majority of bioinformatic software. Reads can be exported in both fasta (default) and fastq formats, as specified by the--read-out-fmtoption in theradinitiowrapper. Both output formats report the sample allele information, as well as the identity of PCR clones.Questions?If you have any questions or are encountering any problems when runningRADinitio, please drop your questions in theStacks-users mailing list.ChangelogRADinitio1.2.2- 2024 Feb 20Others: Changed Python requirements to>=3.9.0, since support for older versions has been dropped fromnumpyand other dependencies.RADinitio1.2.1- 2023 Jun 26Bug Fix: Updated error insetup.pypython version requirements.Others: Fixed typos and other small errors in the docs.RADinitio1.2.0- 2023 Jun 23Feature: Updated todecoratioPCR amplification modelsFeature: Updated reporting of RAD loci tallyFeature: Several advanced options available inradinitiowrapperBug Fix: Program now prints warning and stops when no sequences are loaded from genome.Other: General re-working and refactoring of main functions.Notes: Long overdue update! Finally had time to work on some very needed changes.RADinitio1.1.1- 2019 Sep 12Bug Fix: Fixed compatibility with updated version ofmsprimeandtskitRADinitio1.1.0- 2019 Aug 06Feature: Added pipeline substage functions (make-population,make-library-seq,tally-rad-loci)Feature: Added log of dropped alleles when inserting variants.Bug Fix: Fixed report of insert sizes in various logsBug Fix: Fixed error inNlaIIIenzymeOther:msprimemodel generation now added as a function in__init__Other: Changed default value for template/read ratio in PCR modelOther: Added--versionflag in main wrapper. Also reported in other intermediary files.Other: General formatting updates to logs.RADinitio1.0.3- 2019 May 16Fixed bug when reporting number of loci in logChanged the requirements of the output directory - it now MUST existRADinitio1.0.2- 2019 May 13Updated contents of package distribution build.RADinitio1.0.1- 2019 May 13FASTA parser now handles empty lines and comments.Program reports when non-canonical characters are present in the genome.RADinitio1.0.0- 2019 May 08First public release of RADinitio.AuthorsAngel G. Rivera-ColonInstitute of Ecology and Evolution, University of OregonDepartment of Evolution, Ecology, and Behavior, University of Illinois at Urbana-Champaignarcolon14@gmail.comNicolas RochetteDepartment of Evolution, Ecology, and Behavior, University of Illinois at Urbana-Champaignnic.rochette@gmail.comJulian CatchenDepartment of Evolution, Ecology, and Behavior, University of Illinois at Urbana-Champaignjcatchen@illinois.edu