G.tuneup {ASRgenomics}R Documentation

Tune-up the the genomic relationship matrix G

Description

Generates a new matrix that can be blended, bended or aligned in order to make it stable for future use or matrix inversion. The input matrix should be of the full form (n \times n) with individual names assigned to rownames and colnames.

This routine provides three options of tune-up:

The user should provide the matrices \boldsymbol{G} and \boldsymbol{A} in full form (n \times n) and matching individual names should be assigned to the rownames and colnames of the matrices.

Based on procedures published by Nazarian and Gezan et al. (2016).

Usage

G.tuneup(
  G = NULL,
  A = NULL,
  blend = FALSE,
  pblend = 0.02,
  bend = FALSE,
  eig.tol = 1e-06,
  align = FALSE,
  rcn = TRUE,
  digits = 8,
  sparseform = FALSE,
  determinant = TRUE,
  message = TRUE
)

Arguments

G

Input of the genomic matrix \boldsymbol{G} to tune-up in full form (n \times n) (default = NULL).

A

Input of the matching pedigree relationship matrix \boldsymbol{A} in full form (n \times n) (default = NULL).

blend

If TRUE a blending with identity matrix \boldsymbol{I} or pedigree relationship matrix \boldsymbol{A} (if provided) is performed (default = FALSE).

pblend

If blending is requested this is the proportion of the identity matrix \boldsymbol{I} or pedigree-based relationship matrix \boldsymbol{A} to blend for (default = 0.02).

bend

If TRUE a bending is performed by making the matrix near positive definite (default = FALSE).

eig.tol

Defines relative positiveness (i.e., non-zero) of eigenvalues compared to the largest one. It determines which threshold of eigenvalues will be treated as zero (default = 1e-06).

align

If TRUE the genomic matrix \boldsymbol{G} is aligned to the matching pedigree relationship matrix \boldsymbol{A} (default = FALSE).

rcn

If TRUE the reciprocal conditional number of the original and the bended, blended or aligned matrix will be calculated (default = TRUE).

digits

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

sparseform

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

determinant

If TRUE the determinant will be calculated, otherwise, this is obtained for matrices of a dimension of less than 1,500 \times 1,500 (default = TRUE).

message

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

Value

A list with six of the following elements:

References

Christensen, O.F., Madsen, P., Nielsen, B., Ostersen, T. and Su, G. 2012. Single-step methods for genomic evaluation in pigs. Animal 6:1565-1571. doi:10.1017/S1751731112000742.

Nazarian A., Gezan S.A. 2016. GenoMatrix: A software package for pedigree-based and genomic prediction analyses on complex traits. Journal of Heredity 107:372-379.

Examples

# Example: Apple dataset.

# Get G matrix.
G <- G.matrix(M = geno.apple, method = "VanRaden")$G
G[1:5, 1:5]

# Blend G matrix.
G_blended <- G.tuneup(G = G, blend = TRUE, pblend = 0.05)
G_blended$Gb[1:5, 1:5]

# Bend G matrix.
G_bended <- G.tuneup(G = G, bend = TRUE, eig.tol = 1e-03)
G_bended$Gb[1:5, 1:5]


# Example: Loblolly Pine dataset with pedigree - Aligned G matrix.

A <- AGHmatrix::Amatrix(ped.pine)
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")$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 G and A.
Aclean <- match.G2A(A = A, G = G, clean = TRUE, ord = TRUE, mism = TRUE)$Aclean

# Align G with A.
G_align <- G.tuneup(G = G, A = Aclean, align = TRUE)
G_align$Gb[1:5, 1:5]



[Package ASRgenomics version 1.1.4 Index]