addMissingParents: Add missing parents to a pedigree adjacency matrix

Description Usage Arguments Value Examples

View source: R/addMissingParents.R

Description

Add missing parents to a pedigree adjacency matrix

Usage

1
addMissingParents(a, maxLinearInbreeding = Inf, genderSym = FALSE)

Arguments

a

An adjMatrix object

maxLinearInbreeding

A nonnegative integer, or Inf (default). If this is a finite number, it disallows mating between pedigree members X and Y if X is a linear descendant of Y separated by more than the given number. For example, setting maxLinearInbreeding = 0 forbids mating between parent-child, grandparent-grandchild, a.s.o. If maxLinearInbreeding = 1 then parent-child matings are allowed, but not grandparent-grandchild or higher.

genderSym

A logical. If TRUE, pedigrees which are equal except for the gender distribution of the added parents, are regarded as equivalent, and only one of each equivalence class is returned. Example: paternal vs maternal half sibs.

Value

A list of adjMatrix objects where all columns sum to either 0 or 2.

Examples

1
2
3
4
5
a = adjMatrix(c(1,0,0,0), sex=c(1,1))
addMissingParents(a)

b = adjMatrix(rbind(rep(1,4), 0,0,0), sex=c(1,1,1,1))
addMissingParents(b)

magnusdv/pedbuildr documentation built on Oct. 9, 2019, 2:51 p.m.