H.matrix {ASRgenomics}  R Documentation 
Generates the hybrid H
matrix
Description
The singlestep 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 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}}
).
This function is a wrapper of the H.inverse function.
Usage
H.matrix(
A = NULL,
Ainv = NULL,
Ginv = NULL,
lambda = NULL,
tau = 1,
omega = 1,
sparseform = FALSE,
keep.order = TRUE,
digits = 8,
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 = 
message 
If 
Details
This function is currently equivalent to using H.inverse with (inverse = FALSE
).
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 hybrid matrix \boldsymbol{H}
matrix, in full or sparse form.
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. Singlestep 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:46564663.
Martini, J.W.R., Schrauf, M.F., GarciaBaccino, C.A., Pimentel, E.C.G., Munilla, S.,
RogbergMuñ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 singlestep procedure.
Genet. Sel. Evol. 50:19.
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 = M.clean, method = "VanRaden", na.string = "9")$G
G[1:5, 1:5]
dim(G)
# Match G2A.
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 aligned G.
Ginv < G.inverse(G = G_align, sparseform = FALSE)$Ginv
Ginv[1:5, 1:5]
dim(Ginv)
# Obtaining H.
H < H.matrix(A = A, G = Ginv, lambda = 0.90, sparseform = FALSE)
H[1:5, 1:5]