H.matrix {ASRgenomics}R Documentation

Generates 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 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 \boldsymbol{A} in full form (na \times na) (default = NULL).

Ainv

Input of the inverse of the pedigree relationship matrix \boldsymbol{A}^{-1} in full form (na \times na) (default = NULL).

Ginv

Input of the inverse of the genomic relationship matrix \boldsymbol{G}^{-1} in full form (ng \times ng) (default = NULL).

lambda

The scaling factor for (\boldsymbol{G}^{-1}-\boldsymbol{A}^{-1}_{22}) (default = NULL).

tau

The scaling factor for \boldsymbol{G}^{-1} (default = 1).

omega

The scaling factor for \boldsymbol{A}^{-1}_{22} (default = 1).

sparseform

If TRUE it generates the requested matrix in sparse form to be used directly in asreml with required attributes (default = FALSE).

keep.order

If TRUE the original order of the individuals from the \boldsymbol{A} or \boldsymbol{A_{inv}} matrix is kept. Otherwise the non-genotyped individuals are placed first and then genotyped individuals (default = TRUE).

digits

Set up the number of digits used to round the output matrix (default = 8).

message

If TRUE diagnostic messages are printed on screen (default = TRUE).

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. 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 = 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]



[Package ASRgenomics version 1.1.4 Index]