appendPed: Simulate new generations from an existing pedigree

View source: R/appendPed.R

appendPedR Documentation

Simulate new generations from an existing pedigree

Description

Simulate pedigree, genetic merits and phenotypes with random/assortative/disassortative matings followed by random/non-random selection of males and females with similar/different selection patterns in males and females, starting from an existing pedigree.

Usage

appendPed(
  ped,
  Va0,
  Ve,
  littersize = 1,
  ngen,
  mort.rate = 0,
  overlap.s = 0,
  overlap.d = 0,
  f.rate = 1,
  m.rate = 1,
  fsel = "R",
  msel = "R",
  f.order = "fsel",
  m.order = "msel",
  seed = NA
)

Arguments

ped

: The input pedigree data.frame with 9 columns: ID, SIRE, DAM, SEX, GEN (generation), PA (parent average), MS (Mendelian Sampling), E (environment and residuals), and P (phenotype). Note that PA + MS + E = P - \mu, where \mu is the population mean, and PA + MS = BV (genetic merit or breeding value). If MS and E are unknown, those can be set to 0. PA should be equal to the average of sire BV (SBV) and dam BV (DBV). If this condition is not met, PA - (SBV + DBV)/2 is added to MS and (SBV + DBV)/2 replaces PA.

Va0

: Additive genetic variance in the base generation (i.e., F0).

Ve

: Residual variance, constant across generations.

littersize

: Litter size, default = 1.

ngen

: Number of generations to simulate after the founder generation.

mort.rate

: Mortality rate per generation, after the availability of phenotype (e.g., birth weight, weaning weight) and before the age of maturity (i.e., before mating), default = 0. Maximum mort.rate = 0.5.

overlap.s

: Number of overlapping generations for sires, default = 0 for no generation overlap.

overlap.d

: Number of overlapping generations for dams, default = 0 for no generation overlap.

f.rate

: Proportion of females selected as dams, default = 1.

m.rate

: Proportion of males (<= f.rate) selected as sires, default = 1.

fsel

: If "R" (default), random selection on females; if "P", selection on phenotypes or true breeding values if Ve = 0; if "PA", selection on true parent averages. "-P" and "-PA" work in opposite direction of "P" and "PA", respectively.

msel

: If "R" (default), random selection on males; if "P", selection on phenotypes or true breeding values if Ve = 0; if "PA", selection on true parent averages. "-P" and "-PA" work in opposite direction of "P" and "PA", respectively.

f.order

: Ordering selected females for mating; if "fsel" (default), same as the selection order; if "R" random ordering; if "P", ordering based on phenotypes or true breeding values if Ve = 0; if "PA", ordering based on true parent averages. "-P" and "-PA" work in opposite direction of "P" and "PA", respectively.

m.order

: Ordering selected males for mating; if "msel" (default), same as the selection order; if "R" random ordering; if "P", ordering based on phenotypes or true breeding values if Ve = 0; if "PA", ordering based on true parent averages. "-P" and "-PA" work in opposite direction of "P" and "PA", respectively.

seed

: A numeric variable input to the random number generator for reproducible simulations, default = 'NA' for non-reproducible simulations.

Value

ped2 : New generations appended to the input pedigree data.frame.

Examples

ped = simulatePed(
    F0size = 100,
    Va0 = 9,
    Ve = 36,
    littersize = 2,
    ngen = 4,
    mort.rate = 0.05,
    overlap.s = 1,
    overlap.d = 0,
    f.rate = 0.8,
    m.rate = 0.5,
    fsel = "P",
    msel = "PA"
)
ped2 = appendPed(
    ped = ped,
    Va0 = 9,
    Ve = 36,
    littersize = 2,
    ngen = 2,
    mort.rate = 0.05,
    overlap.s = 1,
    overlap.d = 0,
    f.rate = 0.8,
    m.rate = 0.5,
    fsel = "R",
    msel = "R",
    f.order = "P",
    m.order = "PA",
    seed = 76
)


pedSimulate documentation built on Sept. 26, 2023, 9:06 a.m.