kinship | R Documentation |
Compute the matrix of pairwise kinship coefficients in 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, simplify = TRUE, Xchrom = FALSE)
x |
A |
ids |
Either NULL (default), or a vector of ID labels in |
simplify |
A logical. by default TRUE. See Value. |
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.
A symmetric N * N matrix, where N is the number of pedigree members,
or length(ids)
if this is given, containing the pairwise kinship
coefficients. If ids
has length 2, and simplify = TRUE
, 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.