DOI: 10.5683/sp3/7fap0b
title: Hybridization and the coexistence of species: HZAM-Sym code and data files

description: &lt;b&gt;Abstract&lt;/b&gt;&lt;br/&gt;&lt;p style="text-align:start;text-indent:0px;"&gt;&lt;span&gt;&lt;span style="font-style:normal;"&gt;&lt;span&gt;&lt;span style="font-weight:normal;"&gt;&lt;span style="letter-spacing:normal;"&gt;&lt;span&gt;&lt;span&gt;&lt;span style="white-space:normal;"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;It is thought that two species can coexist if they use different resources present in the environment, yet this assumes that species are completely reproductively isolated. We model coexistence outcomes for two sympatric species that are ecologically differentiated but have incomplete reproductive isolation. The consequences of interbreeding depend crucially on hybrid fitness. When hybrid fitness is high, just a small rate of hybridization can lead to collapse of two species into one. Low hybrid fitness can cause population declines, making extinction of one or both species likely. High intrinsic growth rates result in higher reproductive rates when populations are below carrying capacity, reducing the probability of extinction and increasing the probability of stable coexistence at moderate levels of assortative mating and hybrid fitness. Very strong but incomplete assortative mating can induce low hybrid fitness via a mating disadvantage to rare genotypes, and this can stabilize coexistence of two species at high but incomplete levels of assortative mating. Given these results and evidence that it may take many millions of years of divergence before related species become sympatric, we postulate that coexistence of closely-related species is more often limited by insufficient assortative mating than by insufficient ecological differentiation.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
description: &lt;b&gt;Methods&lt;/b&gt;&lt;br /&gt;&lt;p&gt;This Dryad package contains data files and Julia and R code to run HZAM-Sym (Hybrid Zone with Assortative Mating, Sympatric case) simulations and to generate data figures shown in this paper:&lt;/p&gt;

&lt;p&gt;Irwin, D., and D. Schluter. &lt;span&gt;&lt;span style="font-style:normal;"&gt;&lt;span&gt;&lt;span style="font-weight:normal;"&gt;&lt;span style="letter-spacing:normal;"&gt;&lt;span&gt;&lt;span&gt;&lt;span style="white-space:normal;"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Hybridization and the coexistence of species. bioRxiv. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;https://doi.org/10.1101/2021.04.04.438369&lt;/p&gt;

&lt;p&gt;Note that the first bioRxiv version of the above manuscript was based on only the R code, whereas the second version incorporates results of the same model written in and graphed using Julia.&lt;/p&gt;

&lt;p&gt;Please see that second version of the bioRxiv paper for a full description of the model that produced the data.&lt;/p&gt;
description: &lt;b&gt;Usage notes&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The files in this package are each described below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HZAM_Sym_Julia_V1.jl&lt;/strong&gt;&lt;br&gt;
This is the Julia code that can be used to run HZAM-Sym. This Julia version was used to generate the results panels used in the second version of the paper.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HZAM_Sym_Julia_Dryad_results.zip&lt;/strong&gt;&lt;br&gt;
This compressed folder (which should be unzipped before use) contains .pdf and .png files of results panels and .jld2 files containing Julia data summarizing results of the simulations run using the Julia version of HZAM-Sym (see above). See the HZAM_Sym_Julia_V1.jl file for explanation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HZAM-Sym_release_1.0.R&lt;/strong&gt;&lt;br&gt;
This is the R code that can be used to run HZAM-Sym and generate the figures used in the paper (using the data files described below).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;simulation_data_HZAM_files.zip&lt;/strong&gt;&lt;br&gt;
This compressed folder (which should be unzipped before use) contains 6,762 files containing output from HZAM-Sym simulations. The code in the latter part of the "HZAM-Sym_release_1.0.R" file uses these data files to produce figures in the paper.&lt;/p&gt;
description: <b>Dryad version number:</b> 3
<b>Version status:</b> submitted
<b>Dryad curation status:</b> Published
<b>Sharing link:</b> https://datadryad.org/stash/share/9qrQUKgKAcGc8vZ9NHoQpF5qVGZJjtumv4oLa_Ii1Mg
<b>Storage size:</b> 199691679
<b>Visibility:</b> public