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
and the genomic relationship matrix
in one
hybrid relationship matrix called
.
This function will calculate directly the inverse of this matrix
.
The user should provide the matrices
or
its inverse (only one of these is required) and the
inverse of the matrix
(
) in its full form. Individual names should
be assigned to
rownames
and colnames
, and individuals from
are verified to be all a subset within individuals from
(or
).
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 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
and
.
We follow the specifications described by Martini et. al (2018),
which is done by specifying the parameters
, or the pair
and
.
The general expression used is:
and a more common representation of the above expression is found when , as shown below:
If inverse = FALSE
the
matrix is provided instead of its inverse. This option will be deprecated and
it is better to use the function H.matrix.
The matrix is obtained with the following equations:
Value
The inverse of the hybrid matrix 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 scaling factors
and
on the structure of
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")