ip_op: Opportunity of purging

View source: R/opurging.R

ip_opR Documentation

Opportunity of purging

Description

The potential reduction in individual inbreeding load can be estimated by means of the opportunity of purging (O) and expressed opportunity of purging (Oe) parameters described by Gulisija and Crow (2007). Whereas O relates to the total potential reduction of the inbreeding load in an individual, as a consequence of it having inbred ancestors, Oe relates to the expressed potential reduction of the inbreeding load. Only Oe is computed by default. Estimates of O and Oe need to be corrected in complex pedigrees (see Details below). Both corrected (named "O" and "Oe" by default), and non-corrected (suffixed with "_raw") are returned.

Usage

ip_op(
  ped,
  name_Oe = "Oe",
  compute_O = FALSE,
  name_O = "O",
  Fcol = NULL,
  ncores = 1L,
  genedrop = 0,
  seed = NULL,
  complex = NULL
)

Arguments

ped

A dataframe containing the pedigree. Individual (id), maternal (dam), and paternal (sire) identities are mandatory columns.

name_Oe

A string naming the new output column for the expressed opportunity of purging (defaults to "Oe")

compute_O

Enable computation of total opportunity of purging (disabled by default)

name_O

A string naming the new output column for total opportunity of purging (defaults to "O")

Fcol

Name of column with inbreeding coefficient values. If none is used, inbreeding will be computed.

ncores

Number of cores to use for parallel computing (default = 1)

genedrop

Number of genedrop iterations run to compute partial inbreedng. If set to zero (as default), exact coefficients are computed.

seed

Sets a seed for the random number generator (only if genedrop is enabled).

complex

Enable correction for complex pedigrees (deprecated in v1.3, both raw and corrected measures of "Oe" are returned now).

Details

Model used here assume fully recessive, high effect size alleles (Gulisija and Crow, 2007).

In simple pedigrees, the opportunity of purging (O) and the expressed opportunity of purging (Oe) are estimated as in Gulisija and Crow (2007). For complex pedigrees involving more than one autozygous individual per path from an individual to an ancestor, O and Oe in the closer ancestors need to be discounted for what was already accounted for in their predecessors. To solve this problem, Gulisija and Crow (2007) provide expression to correct O and Oe (see equations 21 and 22 in the manuscript).

Here, an heuristic approach is used to prevent the inflation of O and Oe, and avoid the use of additional looped expressions that may result in an excessive computational cost. To do so, only the contribution of the most recent ancestors in a path will be considered. Specifically, the method skips contributions from "far" ancestors k, such that Fj(k) > 0, where j is an intermediate ancestor, both referred to an individual i of interest. Fj(k) refers to the partial inbreeding of j for alleles derived from k (see ip_Fij). This may not provide exact values of O and Oe, but we expect little bias, since more distant ancestors also contribute lesser to O and Oe.

Both types of estimates (corrected and non-corrected) are returned (non-corrected estimates, prefixed with "_raw").

Value

The input dataframe, plus an additional column containing Oe and Oe_raw estimates (additional columns for O can appended by enabling compute_O = TRUE).

References

  • Gulisija D, Crow JF. 2007. Inferring purging from pedigree data. Evolution 61(5): 1043-1051.

See Also

ip_Fij

Examples

# Original pedigree file in Gulisija & Crow (2007)
pedigree <- tibble::tibble(
  id = c("M", "K", "J", "a", "c", "b", "e", "d", "I"),
  dam = c("0", "0", "0", "K", "M", "a", "c", "c", "e"),
  sire = c("0", "0", "0", "J", "a", "J", "b", "b", "d")
)
pedigree <- purgeR::ped_rename(pedigree, keep_names = TRUE)
ip_op(pedigree, compute_O = TRUE)

purgeR documentation built on Aug. 16, 2023, 9:07 a.m.