Two-locus identity coefficients
Computes the 9*9 matrix of two-locus condensed identity coefficients of a pair of pedigree members, for a given recombination rate.
twoLocusIdentity(x, ids, rho, coefs = NULL, detailed = FALSE, verbose = FALSE)
x |
A pedigree in the form of a |
ids |
A character (or coercible to character) containing ID labels of two pedigree members. |
rho |
A number in the interval [0, 0.5]; the recombination rate between the two loci. |
coefs |
A character indicating which coefficient(s) to compute. A subset
of |
detailed |
A logical, indicating whether the condensed (default) or detailed coefficients should be returned. |
verbose |
A logical. |
Let A, B be two pedigree members, and L1, L2 two loci with a given recombination rate ρ. The two-locus identity coefficients Δ_ij(ρ), for 1 ≤ i,j ≤ 9 are defined as the probability that the identity state of the alleles of A and B are Σ_i at L1 and Σ_j at L2 simultaneously. (The ordering of the 9 states follows Jacquard (1974).)
For details about the algorithm, see Vigeland (2019).
By default, a symmetric 9*9 matrix containing the two-locus condensed identity coefficients Δ_ij.
If either coefs is explicitly given (i.e., not NULL), or detailed = TRUE, the computed coefficients are returned as a named vector.
M. D. Vigeland (2019) A recursive algorithm for two-locus identity coefficients (In progress)
### Full sibs ### x = nuclearPed(2) kapp = twoLocusIBD(x, ids = 3:4, rho = 0.25) jacq = twoLocusIdentity(x, ids = 3:4, rho = 0.25) stopifnot(all.equal(jacq[9:7,9:7], kapp, check.attributes = FALSE)) #' ### Parent-child ### x = nuclearPed(1) jacq = twoLocusIdentity(x, ids = c(1,3), rho = 0.25) stopifnot(jacq[8,8] == 1) ### Full sib mating ### x = fullSibMating(1) j = condensedIdentity(x, ids = 5:6) j2 = twoLocusIdentity(x, ids = 5:6, rho = 0.25) stopifnot(identical(unname(rowSums(j2)), j))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.