Meiosis: Simulation of meiosis in plant breeding research

Travis-CI Build Status CRAN_Status_Badge Coverage Status

Meiosis is a lean R package for the simulation of meiosis events in diploid (or allo-polyploid) plant species for genetic research in plant breeding.


You can install bcgvr from its GitHub repository. You first need to install the devtools package.


Then install Meiosis with

devtools::install_github("DominikMueller64/Meiosis", build_vignettes = TRUE)

Windows users need to make sure that Rtools is installed.


A simple example for simulating Meiosis based on genotypic data is give here:

## Simulate some data
L <- c(332, 221) ## length of chromosomes
n_loci <- c(20L, 43L) ## number of loci on chromosomes
## Simulate genetic positions of loci
positions <- lapply(seq_along(n_loci), function(i) sort(runif(n_loci[i], 0, L[i])))
## Simulate genotypic data for an individual
ind <- replicate(2L, lapply(n_loci, function(n) sample(c(0L, 1L), n, TRUE)), simplify = FALSE)
## Construct a parameter list necessary for simulating Meiosis (needs to be done once)
xoparam <- Meiosis::create_xoparam(L)

Meiosis::meiosis_geno(ind, positions, xoparam) ## Simulate a new gamete
Meiosis::cross_geno(ind, ind, positions, xoparam) ## Simulate a new individual
Meiosis::self_geno(ind, positions, xoparam) ## Simulate a new selfing
Meiosis::dh_geno(ind, positions, xoparam) ## Simulate a new doubled haploid


A vignette describing the functionality of the package and the data structures is available from within R.

vignette('Introduction', package = 'Meiosis')


Parts of the core functionality and documentation of Meiosis was inspired and adapted, respectively, from the package simcross of Karl Broman.


Dominik Mueller


This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

A copy of the GNU General Public License, version 3, is available at

Try the Meiosis package in your browser

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

Meiosis documentation built on May 29, 2017, 3:46 p.m.