kinship | R Documentation |
Compute the matrix of kinship coefficients of all members of a pedigree. Both
autosomal and X-chromosomal versions are supported. The pedigree founders are
allowed to be inbred; see pedtools::founderInbreeding()
for how to set this
up, and see Examples below.
kinship(x, ids = NULL, Xchrom = FALSE)
kinshipX(x, ids = NULL)
x |
A |
ids |
Either NULL (default), or a vector of length 2, containing the IDs
of two (possibly equal) members of |
Xchrom |
A logical, indicating if the autosomal (default) or X-chromosomal kinship coefficients should be computed. |
For two (possibly equal) members A, B of a pedigree, their autosomal (resp. X-chromosomal) kinship coefficient is defined as the probability that a random allele from A and a random allele from B, sampled at the same autosomal (resp. X-chromosomal) locus, are identical by descent relative to the pedigree.
If ids = NULL
, a symmetric matrix containing all pairwise kinship
coefficients in x
. If ids
has length 2, the function returns a single
number.
inbreeding()
, kappa()
# Kinship coefficients in a nuclear family with two children
x = nuclearPed(2)
kinship(x)
# X chromosomal kinship coefficients in the same family
kinship(x, Xchrom = TRUE)
# Autosomal kinships if the mother is 100% inbred
founderInbreeding(x, 2) = 1
kinship(x)
# Similar for X:
founderInbreeding(x, 2, chromType = "X") = 1
kinship(x, Xchrom = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.