Individual based simulations of hybridizing populations, where the accumulation of junctions is tracked. Furthermore, mathematical equations are provided to verify simulation outcomes. Both simulations and mathematical equations are based on Janzen et al. (2018) and Janzen and Miro Pina (2020).

CRAN_Status_Badge R-CMD-check

Branch|[AppVeyor logo]|[Codecov logo] ---|---|--- master|Build status|


Janzen, T. , Nolte, A. W. and Traulsen, A. (2018), The breakdown of genomic ancestry blocks in hybrid lineages given a finite number of recombination sites. Evolution, 72: 735-750.

Lavretsky, P., Janzen, T. and McCracken, KG. (2019) Identifying hybrids & the genomics of hybridization: Mallards & American black ducks of Eastern North America. Ecology and Evolution 9: 3470-3490.

Janzen, T., MirĂ³ Pina, V. (2020) Estimating the time since admixture from phased and unphased molecular data. bioRxiv 2020.09.10.292441; doi:


Version 2.0 : merged many functions with similar functionality, added vignette that provides overview of all functionality. Version 1.9 : added c++ versions of the unphased and phased likelihoods. Version 1.8 : added multithreading using the TBB library. Version 1.7 : Further improved the recombination function following Hanno Hildenbrandt's suggestions Version 1.6 : Improved the recombination function run twice as fast Version 1.5.1: Added option to track the true number of junctions Version 1.5 : Added simulation functions to simulate phased an unphased data, including phasing error Version 1.5 : Added support for inferring the time since admixture based on phased and unphased data. Version 1.4 : Added support for estimating the number of junctions, and simulating the number of junctions, under a backcrossing scheme, using the code supplied in Lavretsky et al. 2019. Version 1.3 : Added support for estimating the time since admixture using unphased data. Version 1.3 : Added individual based simulations returning phased and unphased data. Version 1.3 : Updated entire package to Roxygen. Version 1.2 : Added support for estimating the expected number of junctions for arbitrarily distributed markers. Version 1.1 : Updated random number generation for picking recombination sites. Previous implementation was limited to 6 digit precision, current precision is at least double that, minimizing the probability of recombination occur twice in the same location for an infinite chromosome.

Try the junctions package in your browser

Any scripts or data that you put into this service are public.

junctions documentation built on March 18, 2022, 6:28 p.m.