cross: Cross two individuals

View source: R/sim_meiosis.R

crossR Documentation

Cross two individuals

Description

Simulate the cross of two individuals to create a single progeny

Usage

cross(
  mom,
  dad,
  m = 10,
  p = 0,
  xchr = FALSE,
  male = FALSE,
  obligate_chiasma = FALSE,
  Lstar = NULL
)

Arguments

mom

An individual object, as produced by create_parent() or this function.

dad

An individual object, as produced by create_parent() or this function.

m

interference parameter for chi-square model

p

proportion of crossovers coming from no-interference process

xchr

If TRUE, simulate X chromosome

male

If TRUE, simulate a male (matters only if xchr=TRUE)

obligate_chiasma

If TRUE, require an obligate chiasma on the 4-strand bundle at meiosis.

Lstar

Adjusted chromosome length, if obligate_chiasma=TRUE. Calculated if not provided.

Details

Simulations are under the Stahl model with the interference parameter being an integer. This is an extension of the chi-square model, but with chiasmata being the superposition of two processes, one following the chi-square model and the other exhibiting no interference.

Value

A list with two components, for the individual's two chromosomes. Each is a list with alleles in chromosome intervals (as integers) and locations of the right endpoints of those intervals.

See Also

create_parent(), sim_meiosis(), sim_crossovers(), calc_Lstar()

Examples

mom <- create_parent(100, 1:2)
dad <- create_parent(100, 1:2)
child <- cross(mom, dad)

simcross documentation built on May 29, 2024, 2:41 a.m.