Condensed identity coefficients
Computes the 9 condensed identity coefficients of pairwise relationships in a
pedigree. Founders of the pedigree may be inbred; use
pedtools::founderInbreeding() to set this up.
condensedIdentity(x, ids, sparse = NA, verbose = FALSE, checkAnswer = verbose)
x |
A pedigree in the form of a |
ids |
A character (or coercible to character) containing ID labels of two or more pedigree members. |
sparse |
A positive integer, indicating the pedigree size limit for using sparse arrays (as implemented by the slam package) instead of ordinary arrays. |
verbose |
A logical |
checkAnswer |
A logical. If TRUE, and the |
The implementation is a modified version of Karigl's recursive algorithm (1981).
If ids has length 2: A vector of length 9, containing the condensed
identity coefficients.
If ids has length > 2: A data frame with one row for each pair of
individuals, and 11 columns. The first two columns contain the ID labels,
and columns 3-11 contain the condensed identity coefficients.
G. Karigl (1981). A recursive algorithm for the calculation of identity coefficients Annals of Human Genetics, vol. 45.
# One generation of full sib mating. # (One of the simplest examples with all 9 coefficients nonzero.) x = fullSibMating(1) j1 = condensedIdentity(x, ids = 5:6) stopifnot(all.equal(j1, c(2, 1,4, 1, 4, 1, 7, 10, 2)/32)) # Recalculate the coefficients when the founders are 100% inbred founderInbreeding(x, 1:2) = 1 condensedIdentity(x, ids = 5:6)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.