View source: R/checkKinshipOverrides.R
| checkKinshipOverrides | R Documentation |
Checks the structure and domain of an outside-information kinship override
table. The table supplies pairwise kinship coefficients
(id1, id2, kinship) that
applyKinshipOverrides writes into a computed kinship matrix,
replacing the pedigree-derived value for those pairs. It mirrors
checkGenotypeFile: it stop()s on structural or domain
errors and returns the (id-coerced) table when the input is acceptable.
checkKinshipOverrides(overrides)
overrides |
data.frame with id columns |
kinship is the kinship coefficient f (the probability that an
allele drawn at random from each of the two animals is identical by descent),
not the coefficient of relatedness r (= 2f for
non-inbred animals). Supplying r – e.g. 0.25 for half-sibs whose true
f is 0.125 – silently corrupts the matrix, so an off-diagonal value
above 0.5 (the maximum for a non-inbred pair) draws a warning here. The exact
positive-semi-definiteness bound is enforced by
applyKinshipOverrides once the matrix diagonal is known.
The validated overrides data.frame with id1 and
id2 coerced to character.
overrides <- data.frame(
id1 = c("A1", "A3"), id2 = c("A2", "A4"),
kinship = c(0.25, 0.125), stringsAsFactors = FALSE
)
checkKinshipOverrides(overrides)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.