Skip to contents

Gamma is the relationship among the base populations the metafounders stand for (Legarra et al. 2015), defined as (2P - 1)'(2P - 1) / (m / 2) with P the allele frequencies of the bases (Legarra et al. 2024a), which makes it invariant to which allele is counted. Two estimators are offered, the ones of the reference program gammaf90. "pseudo_em" (default) iterates Gamma <- Gamma + Gamma (V' G V - Q2' V) Gamma, with G = Z Z' / (m / 2) centred at 0.5, Q2 the gene fractions of each metafounder in the genotyped animals and V = (A22^Gamma)^-1 Q2 (Legarra et al. 2024b). It stays positive semi-definite and is accurate whether the genotyped animals are spread over the generations or only in the last ones. "gls" estimates the base allele frequencies by generalized least squares (Garcia-Baccino et al. 2017) and builds Gamma from them; it is biased when the genotyped animals are far from the bases (diagonal up, off-diagonal down). "ml", for a single metafounder, is the maximum likelihood of Legarra et al. (2024b): with one metafounder A^gamma = (1 - gamma/2) A + gamma 11', and the Gaussian likelihood of the markers is a function of gamma through three summaries of A22 and G, maximized on [0, 2). It reports the log-likelihood and a standard error from its curvature; the markers enter as independent, so linkage disequilibrium makes that error optimistic.

Usage

estimate_gamma(
  pedigree,
  genotypes,
  metafounders,
  method = c("pseudo_em", "gls", "ml"),
  start = NULL,
  tol = 1e-08,
  maxiter = 1000L,
  bounded = TRUE,
  verbose = interactive()
)

Arguments

pedigree

data.frame animal, sire, dam, with every unknown parent given as a metafounder label

genotypes

list with ids and m (animals x markers, 0/1/2, no NA)

metafounders

the metafounder labels

method

"pseudo_em" (default), "gls", or "ml" (one metafounder only)

start

starting Gamma for "pseudo_em"; 0.01 I by default, as gammaf90

tol

convergence on the largest absolute change of Gamma between iterations

maxiter

maximum pseudo-EM iterations

bounded

"gls" only: keep the estimated base frequencies in [0, 1]

verbose

print one line per iteration

Value

object of class br_gamma: gamma (with dimnames), method, converged, iterations, trace (largest change per iteration), estimable, p_base (markers x metafounders), eigenvalues, n_markers and var_scale, 1 + mean(diag)/2 - mean(Gamma), the factor that relates the genetic variance on the metafounder base to the usual one (1 - gamma/2 with one metafounder, Legarra et al. 2015); with "ml" also loglik, se and boundary

Details

Every unknown parent in pedigree must be one of the metafounders labels, the convention of gammaf90. Genotypes must be complete (impute beforehand: imputing by the mean shrinks the variance of a marker and pulls Gamma down), and the same markers have to be used wherever this Gamma is used. The result enters any fitter as gamma = est$gamma. A metafounder with no genotyped descendant is not estimable: its row and column are zero, as gammaf90 does, and the singular Gamma goes through the pseudo-inverse of the fitters.

The genotype matrix may be double, integer or raw and is read as it is, marker by marker. Nothing of size genotyped x genotyped is formed, not even for "ml": its summaries come from sparse solves on the Schur complement of the non-genotyped block of A^-1, by blocks of markers.

References

Legarra, A., Christensen, O.F., Vitezica, Z.G., Aguilar, I. & Misztal, I. (2015). Genetics 200:455-468.

Garcia-Baccino, C.A. et al. (2017). Genetics Selection Evolution 49:34.

Legarra, A., Bermann, M., Mei, Q. & Christensen, O.F. (2024a). Genetics Selection Evolution 56:34.

Legarra, A. et al. (2024b). Genetics Selection Evolution 56:35.