Combined relationship matrix H
H.mat.RdGiven a matrix A and a matrix G returns a H matrix with the C++ Armadillo library.
Arguments
- A
Finite symmetric additive relationship matrix based on pedigree. Row and column names must be identical, non-empty and unique.
- G
Finite symmetric additive relationship matrix based on marker data. Row and column names must be identical, non-empty and unique; every individual must also occur in
A.- tau
As described by Martini et al. (2018).
- omega
As described by Martini et al. (2018).
- tolparinv
Finite positive diagonal increment used for one retry when a required positive-definite factorization fails. An error is raised if the retry also fails.
Details
Let subscripts 1 and 2 denote non-genotyped and genotyped individuals, respectively. The genotyped block is
\(H_{22}=[\tau G_{22}^{-1}+(1-\omega)A_{22}^{-1}]^{-1}\).
The remaining corrections are computed using Cholesky solves with \(A_{22}\), rather than explicitly forming its inverse for the default weights.
When omega=1 and tau>0, \(H_{22}=G_{22}/\tau\); redundant inversions are avoided while retaining the diagonal retry for singular inputs.
The retry increment is applied separately to \(A_{22}\), \(G_{22}\), or the genotyped precision block when required.
The returned matrix is dense. Its row and column order is rev(unique(c(rownames(G), rownames(A)))), including when there is just one genotyped individual.
H.mat operates on already constructed relationship matrices,
not marker dosages. It is therefore ploidy-independent and requires
no ploidy argument. A polyploid genomic matrix from
A.mat(markers, ploidy=P) can be supplied as G.
The pedigree matrix A must already reflect the intended
inheritance model and base population; H.mat does not build
a polyploid pedigree, account for double reduction, or infer these
assumptions.
Ensure that A and G use compatible additive relationship
scales and base populations, or explicitly choose suitable
tau and omega. In particular, ASV and EJ matrices need
not match a pedigree matrix's scale automatically. Dominance and
epistatic matrices are not substitutes for the additive inputs.
Value
H Matrix with the relationship between the individuals based on pedigree and corrected by molecular information
References
Covarrubias-Pazaran G (2016) Genome assisted prediction of quantitative traits using the R package sommer. PLoS ONE 11(6): doi:10.1371/journal.pone.0156744
Martini, J. W., Schrauf, M. F., Garcia-Baccino, C. A., Pimentel, E. C., Munilla, S., Rogberg-Munoz, A., ... & Simianer, H. (2018). The effect of the H-1 scaling factors tau and omega on the structure of H in the single-step procedure. Genetics Selection Evolution, 50(1), 16.
Examples
####=========================================####
####random population of 20 lines with 100 markers
####=========================================####
M <- matrix(rep(0,20*100),20,100)
for (i in 1:20) {
M[i,] <- sample(c(-1,0,0,1), size=100, replace=TRUE)
}
rownames(M) <- 1:nrow(M)
v <- sample(1:nrow(M),10)
M2 <- M[v,]
A <- A.mat(M) # assume this is a pedigree-based matrix for the sake of example
G <- A.mat(M2)
H <- H.mat(A,G)
# colfunc <- colorRampPalette(c("steelblue4","springgreen","yellow"))
# hv <- heatmap(H[1:15,1:15], col = colfunc(100),Colv = "Rowv")
#### Polyploid genomic input; A must be a compatible pedigree matrix
M4 <- 2 * (M + 1)
A4 <- A.mat(M4, ploidy=4) # stand-in only, not a polyploid pedigree
G4 <- A.mat(M4[v,,drop=FALSE], ploidy=4)
H4 <- H.mat(A4, G4)