masreml: Universal REML-BLUP for SNP and Multi-allelic Genomic Prediction

masreml: Universal REML-BLUP for SNP and Multi-allelic Genomic Prediction

Description

Implements REML-BLUP genomic prediction using SNP (additive, dominance) and multi-allelic additive markers via a high-performance Rust backend. Supports multiple genomic relationship matrices (GRM) simultaneously, binary traits via Laplace approximation, EMMAX GWAS, and GWAS-assisted prediction (GWABLUP).

Statistical model

The general mixed linear model is:

\(y = Xb + \sum_{k} Z_k u_k + e\)

with independent random genetic effects \(u_k \sim \mathcal{N}(0,\,G_k \sigma_{g_k}^2)\) and residuals \(e \sim \mathcal{N}(0,\,I\sigma_e^2)\), where \(G_k\) is the genomic relationship matrix for component \(k\) (snp_add, snp_dom, mh_add, or pedigree). Variance components \((\sigma_{g_1}^2, \ldots, \sigma_{g_K}^2,\,\sigma_e^2)\) are estimated by REML; GEBVs are obtained by BLUP.

General assumptions

  • Random genetic effects for each component are normally distributed: \(u_k \sim \mathcal{N}(0,\,G_k \sigma_{g_k}^2)\).

  • Residuals are independent: \(e \sim \mathcal{N}(0,\,I\sigma_e^2)\).

  • Different random-effect components (\(u_1, u_2, \ldots\)) are mutually independent.

  • The GRM \(G_k\) captures realized genomic relationships; diagonal elements average approximately 1.

  • For binary traits, a single-step Laplace approximation is applied on the liability scale (logit or probit link).

How the model works (individual/population level)

masreml estimates genetic merit at the individual level using BLUPs derived from the mixed model, rather than directly estimating individual marker effects.

Variance components \((\sigma_{g_k}^2, \sigma_e^2)\) are first estimated by REML using one of four algorithms selectable via the method argument: AI-REML (default for continuous traits), HE regression (default for binary), EM-REML (stable fallback), or HI (HE-initialized AI). The GRM \(G_k\) is built from marker data via build_G_snp (VanRaden 2008), build_G_mh (Da 2015), or build_D_snp.

GEBVs (BLUPs) are then obtained by solving the mixed model equations. For a single additive component the BLUP prediction is:

= _g2,G,V{-1}(y - X), V = G_g^2 + I_e^2

GEBVs represent the total genomic merit of each individual, aggregating marker contributions through the GRM structure.

Main functions

masreml
REML-BLUP genomic prediction (main entry point). Accepts raw marker data or pre-built G matrices.
build_G_snp
SNP additive GRM (VanRaden 2008).
build_G_mh
Multi-allelic additive GRM (Da 2015).
build_D_snp
SNP dominance GRM (Da 2015).
build_A_ped
Pedigree numerator relationship matrix (Henderson 1976).
run_gwas
EMMAX genome-wide association study.
gwablup
GWAS-assisted GBLUP via weighted G.
cv_masreml
k-fold or leave-one-out cross-validation.

References

  • Meuwissen, T. H. E., Hayes, B. J., & Goddard, M. E. (2001). Prediction of total genetic value using genome-wide dense marker maps. Genetics, 157(4), 1819–1829. doi:10.1093/genetics/157.4.1819

  • VanRaden, P. M. (2008). Efficient methods to compute genomic predictions. Journal of Dairy Science, 91(11), 4414–4423. doi:10.3168/jds.2007-0980

  • Da, Y. (2015). Multi-allelic haplotype model based on genetic partition for genomic prediction and variance component estimation using SNP markers. BMC Genetics, 16(1), 144. doi:10.1186/s12863-015-0301-1

Author(s)

Maintainer: Agus Wibowo [email protected]