sim_ril_pedigree: Generate a ril pedigree

View source: R/sim_ril_pedigree.R

sim_ril_pedigreeR Documentation

Generate a ril pedigree

Description

Generate a pedigree for multi-way recombinant inbred lines (a table of individual, mom, dad, sex)

Usage

sim_ril_pedigree(
  ngen = 20,
  selfing = FALSE,
  parents = 1:2,
  firstind = max(parents) + 1
)

Arguments

ngen

Number of generations of inbreeding

selfing

If TRUE, use selfing

parents

Vector of the parents' IDs. Should be integers, and length must be a power of 2 (i.e., 2, 4, 8, ...)

firstind

Positive integer to assign to the first child. Must be greater than max(parents).

Value

A data frame with five columns: individual ID, mother ID, father ID, sex, and generation. Founders have 0 for mother and father ID. Sex is coded 0 for female and 1 for male.

See Also

sim_from_pedigree(), sim_ail_pedigree(), sim_do_pedigree(), sim_4way_pedigree()

Examples

tab <- sim_ril_pedigree(7)

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