simul.pedigree: Simulation of pedigree structure

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/simul.pedigree.r

Description

This function can be used to simulate a pedigree for a given number of generations and individuals. Function assumes random mating within generations. Inbred individuals may be generated by chance.

Usage

1
simul.pedigree(generations = 2, ids = 4, animals = FALSE, familySize = 1)

Arguments

generations

integer. Number of generations to simulate

ids

integer or vector of integers. Number of genotypes in each generation. If length equal one, the same number will be replicated and used for each generation.

animals

logical. Should a pedigree for animals be simulated (no inbreeding)? See 'Details'.

familySize

numeric. Number of individuals in each full-sib family in the last generation.

Details

If animals=FALSE, the parents for the current generation will be randomly chosen out of the genotypes in the last generation. If Par1 = Par2, an inbreed is generated. If animal=TRUE, each ID is either sire or dam. Each ID is progeny of one sire and one dam.

Value

An object of class pedigree with N=sum(ids) genotypes.

Author(s)

Valentin Wimmer

See Also

simul.phenotype, create.pedigree, plot.pedigree

Examples

1
2
3
4
5
6
# example for plants
ped <- simul.pedigree(gener = 4, ids = c(3, 5, 8, 8))
plot(ped)
# example for animals
peda <- simul.pedigree(gener = 4, ids = c(3, 5, 8, 8), animals = TRUE)
plot(peda)

synbreed documentation built on March 12, 2021, 3:01 a.m.