IBD (kappa) coefficients
Computes the three IBD coefficients summarising the relationship between two non-inbred individuals. Both autosomal and X chromosomal versions are implemented.
kappaIBD(x, ids = labels(x), inbredAction = 1) kappaIbdX(x, ids, sparse = NA, verbose = FALSE)
x |
A pedigree in the form of a |
ids |
A character (or coercible to character) containing ID labels of two or more pedigree members. |
inbredAction |
An integer telling the program what to do if either of
the |
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. |
For non-inbred individuals a and b, their autosomal IBD coefficients (κ0, κ1, κ2) are defined as follows:
κ_i = P(a and b share i alleles IBD at a random autosomal locus)
The autosomal kappa coefficients are computed from the kinship coefficients. When a and b are both nonfounders, the following formulas are well-known:
κ2 = φ_MM * φ_FF + φ_MF * φ_FM
κ1 = 4 * φ_ab - 2 * κ2
κ0 = 1 - κ1 - κ2
Here φ_MM denotes the kinship coefficient between the mothers of a and b, and so on. If either a or b is a founder, then κ2 = 0, while the other two formulas remain as above.
The X chromosomal IBD coefficients are defined as in the autosomal case, with the exception that κ2 is undefined when at least one of the two individuals is male. Hence the computation is greatly simplified when males are involved. Denoting the standard kinship coefficient by φ, the formulas are:
Both male: (κ0, κ1, κ2) = (1-φ, φ, NA)
One male, one female: (κ0, κ1, κ2) = (1-2*φ, 2*φ, NA)
Two females: As in the autosomal case.
If ids has length 2: A numeric vector of length 3: (κ0,
κ1, κ2).
If ids has length > 2: A data frame with one row for each pair of
individuals, and 5 columns. The first two columns contain the ID labels,
and columns 3-5 contain the IBD coefficients.
Unless inbredAction = 2, the coefficients of pairs involving inbred
individuals (inbred females in the X version) are reported as NA.
Furthermore, the X chromosomal κ2 is NA whenever at least one of
the two individuals is male.
### Siblings x = nuclearPed(2) k = kappaIBD(x, 3:4) stopifnot(identical(k, c(.25, .5, .25))) ### Quad half first cousins x = quadHalfFirstCousins() k = kappaIBD(x, leaves(x)) stopifnot(identical(k, c(17/32, 14/32, 1/32))) ### Paternal half brothers with 100% inbred father # Genetically indistinguishable from an (outbred) father-son relationship x = halfSibPed() ids = 4:5 # Set founder inbreeding fou = commonAncestors(x, ids) # robust to label change founderInbreeding(x, fou) = 1 k = kappaIBD(x, ids) stopifnot(identical(k, c(0, 1, 0)))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.