sim_pedigree: Create a pedigree for a cross

View source: R/sim_pedigree.R

sim_pedigreeR Documentation

Create a pedigree for a cross

Description

Creates a pedigree for a bi-parental, recombinant inbred line family. Options are available for partial selfing, backcrossing, and random mating.

Usage

sim_pedigree(n.par, n.ind, bcpar, n.bcgen = 0, n.selfgen = Inf)

Arguments

n.par

The number of founding parents. May be 2 (for a 2-way cross) or 4 (for a 4-way cross).

n.ind

The number of initial F_1 individuals that are created. By single-seed decent, this is also the number of final inbred individuals.

bcpar

The recurrant parent in backcrossing. If not NULL (default), must point to one of the two parents (for a 2-way cross) or four parents (for a 4-way cross).

n.bcgen

The number of backcross generations to the parent specified by bc.par.

n.selfgen

The number of selfing generations. For instance, n.self.gen = 5 would produce a F_6 family. If Inf, the pedigree defines "complete" selfing. If not, selfing is "partial."

Value

A matrix of class pedigree with 5 columns. The first column contains the individual id, the second column contains the individual ids for the mom, the third column contains the individual ids for the dad, the fourth column contains sex indicators, and the fifth column contains generations indicators.


neyhartj/qgsim documentation built on Nov. 11, 2023, 4:08 p.m.