H.inverse {ASRgenomics} | R Documentation |
Generates the inverse of the hybrid H matrix
Description
The single-step GBLUP approach combines the information from the pedigree relationship matrix
\boldsymbol{A}
and the genomic relationship matrix \boldsymbol{G}
in one
hybrid relationship matrix called \boldsymbol{H}
.
This function will calculate directly the inverse of this matrix \boldsymbol{H}
.
The user should provide the matrices \boldsymbol{A}
or
its inverse (only one of these is required) and the
inverse of the matrix \boldsymbol{G}
(\boldsymbol{G_{inv}}
) in its full form. Individual names should
be assigned to rownames
and colnames
, and individuals from
\boldsymbol{G_{inv}}
are verified to be all a subset within individuals from
\boldsymbol{A}
(or \boldsymbol{A_{inv}}
).
Usage
H.inverse(
A = NULL,
Ainv = NULL,
Ginv = NULL,
lambda = NULL,
tau = 1,
omega = 1,
sparseform = FALSE,
keep.order = TRUE,
digits = 8,
inverse = TRUE,
message = TRUE
)
Arguments
A |
Input of the pedigree relationship matrix |
Ainv |
Input of the inverse of the pedigree relationship matrix
|
Ginv |
Input of the inverse of the genomic relationship matrix
|
lambda |
The scaling factor for |
tau |
The scaling factor for |
omega |
The scaling factor for |
sparseform |
If |
keep.order |
If |
digits |
Set up the number of digits used to round the output matrix (default = |
inverse |
If |
message |
If |
Details
The generation of the \boldsymbol{H^{-1}}
matrix contains a few scaling factors
to help with the calculation of this inverse and
to allow further exploration of the combination of the
information from the \boldsymbol{A^{-1}}
and \boldsymbol{G^{-1}}
.
We follow the specifications described by Martini et. al (2018),
which is done by specifying the parameters \lambda
, or the pair
\tau
and \omega
.
The general expression used is:
\boldsymbol{H^{-1}}=\boldsymbol{A^{-1}}+\begin{bmatrix}\boldsymbol{0}&\boldsymbol{0}\\\boldsymbol{0}&(\tau\boldsymbol{G^{-1}}-\omega\boldsymbol{{A_{22}^{-1}}})\end{bmatrix}
and a more common representation of the above expression is found when \tau = \omega = \lambda
, as shown below:
\boldsymbol{H^{-1}}=\boldsymbol{A^{-1}}+\begin{bmatrix}\boldsymbol{0}&\boldsymbol{0}\\\boldsymbol{0}&\lambda(\boldsymbol{G^{-1}}-\boldsymbol{{A_{22}^{-1}}})\end{bmatrix}
If inverse = FALSE
the \boldsymbol{H}
matrix is provided instead of its inverse. This option will be deprecated and
it is better to use the function H.matrix.
The \boldsymbol{H}
matrix is obtained with the following equations:
\boldsymbol{H}=\boldsymbol{A}+\begin{bmatrix}\boldsymbol{A}_{12}\boldsymbol{A}_{22}^{-1}(\boldsymbol{G}-\boldsymbol{A}_{22})\boldsymbol{A}_{22}^{-1}\boldsymbol{A}_{21}&\boldsymbol{A}_{12}\boldsymbol{A}_{22}^{-1}(\boldsymbol{G}-\boldsymbol{A}_{22})\\(\boldsymbol{G}-\boldsymbol{A}_{22})\boldsymbol{A}_{22}^{-1}\boldsymbol{A}_{21}&(\boldsymbol{G}-\boldsymbol{A}_{22})\end{bmatrix}
Value
The inverse of the hybrid matrix \boldsymbol{H}
matrix, in full or sparse form with
required attributes to be used in asreml.
References
Christensen, O.F., Lund, M.S. 2010. Genomic prediction matrix when some animals are not genotyped. Gen. Sel. Evol. 42(2):1–8.
Christensen, O., Madsen, P., Nielsen, B., Ostersen, T., and Su, G. 2012. Single-step methods for genomic evaluation in pigs. Animal 6(10):1565–1571.
Legarra, A., Aguilar, I., and Misztal, I. 2009. A relationship matrix including full pedigree and genomic information. J. Dairy Sci. 92:4656-4663.
Martini, J.W.R., Schrauf, M.F., Garcia-Baccino, C.A., Pimentel, E.C.G., Munilla, S.,
Rogberg-Muñoz, A., Cantet, R.J.C., Reimer, C., Gao, N., Wimmer, V., and Simianer, H. 2018.
The effect of the H^{-1}
scaling factors \tau
and \omega
on the structure of H
in the single-step procedure.
Genet. Sel. Evol. 50:1-9.
Examples
# Get A matrix.
A <- AGHmatrix::Amatrix(data = ped.pine)
A[1:5,1:5]
dim(A)
# Read and filter genotypic data.
M.clean <- qc.filtering(
M = geno.pine655,
maf = 0.05,
marker.callrate = 0.2, ind.callrate = 0.20,
na.string = "-9",
plots = FALSE)$M.clean
# Get G matrix.
G <- G.matrix(M.clean, method = "VanRaden", na.string = "-9")$G
G[1:5, 1:5]
dim(G)
# Match G and A.
check <- match.G2A(
A = A, G = G,
clean = TRUE, ord = TRUE, mism = TRUE, RMdiff = TRUE)
# Align G matrix with A.
G_align <- G.tuneup(G = check$Gclean, A = check$Aclean, align = TRUE, sparseform = FALSE)$Gb
# Get Ginverse using the G aligned.
Ginv <- G.inverse(G = G_align, sparseform = FALSE)$Ginv
Ginv[1:5, 1:5]
dim(Ginv)
# Obtain Hinv.
Hinv <- H.inverse(A = A, Ginv = Ginv, lambda = 0.90, sparseform = TRUE)
head(Hinv)
attr(Hinv, "INVERSE")