Learn R Programming

pedSimulate (version 0.1.2)

simulatePed: Simulate pedigree, genetic merits and phenotypes

Description

Simulate Pedigree, genetic merits and phenotypes with random mating followed by (non)random selection with different patterns in males and females.

Usage

simulatePed(
  F0size,
  f.rate = 1,
  m.rate = 1,
  mort.rate = 0,
  littersize = 1,
  ngen,
  overlap.s = 0,
  overlap.d = 0,
  fullsib = TRUE,
  parentprogeny = TRUE,
  Va0,
  Ve,
  fsel = "R",
  msel = "R"
)

Arguments

F0size

: Even number of founder animals. No mortality and selection in this generation.

f.rate

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

m.rate

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

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.

littersize

: Litter size, default = 1.

ngen

: Number of generations to simulate.

overlap.s

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

overlap.d

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

fullsib

: If FALSE, avoid fullsib matings, default = TRUE. Further information provided in Details.

parentprogeny

: If FALSE, avoid parent-progeny matings, default = TRUE. Further information provided in Details.

Va0

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

Ve

: Environment (plus residual) variance, set constant across generations.

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; redundant if f.rate = 1. "-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; redundant if m.rate = 1. "-P" and "-PA" work in opposite direction of "P" and "PA", respectively.

Value

ped : The output pedigree data.frame. Further information provided in Details.

Details

fullsib = FALSE : Avoid fullsib matings in each generation by replacing the male mate (SIRE) with a random SIRE among the selected sires, until no fullsib mating is left. If due to a small population bottleneck there is any fullsib mating remained, it would be reported.

parentprogeny = FALSE : Avoid parent-progeny matings in each generation by replacing the male mate (SIRE) with a random SIRE among the selected sires, until no parent-progeny mating is left. If due to a small population bottleneck there is any parent-progeny mating remained, it would be reported.

The output pedigree data.frame (ped) has 9 columns: ID, SIRE, DAM, SEX, GEN (generation number starting with 0 for the base generation), PA (parent average), MS (Mendelian Sampling), E (environment and residuals), and P (phenotype).

Examples

Run this code
# NOT RUN {
ped = simulatePed(
    F0size = 100,
    f.rate = 0.8,
    m.rate = 0.5,
    mort.rate = 0.05,
    littersize = 2,
    ngen = 4,
    overlap.s = 1,
    overlap.d = 0,
    fullsib = FALSE,
    parentprogeny = FALSE,
    Va0 = 9,
    Ve = 36,
    fsel = "P",
    msel = "PA"
)

# }

Run the code above in your browser using DataLab