Build SNP Dominance Relationship Matrix

Build SNP Dominance Relationship Matrix

Description

Constructs the SNP dominance relationship matrix (D) following Da et al. (2015). Captures non-additive (dominance) genetic relationships among individuals. Can be used alongside the additive G matrix in masreml() to partition genetic variance into additive and dominance components.

Usage

build_D_snp(W)

Arguments

W numeric matrix (n x m) of raw genotype codes, where n is the number of individuals and m is the number of SNP markers. Values must be 0, 1, or 2. Same format as build_G_snp.

Value

numeric matrix (n x n) of dominance relationships.

References

Da et al. (2015) Multi-allelic haplotype model based on genetic partition for genomic prediction and variance component estimation using SNP markers. BMC Genet. 15:100.

See Also

build_G_snp, masreml

Examples

library("masreml")

W <- matrix(sample(0:2, 100*50, replace=TRUE), 100, 50)
rownames(W) <- paste0("ind", 1:100)

# Additive + dominance model
fit <- masreml(
  y       = y,
  markers = list(snp_add = W, snp_dom = W)
)
summary(fit)