Hmatrix {AGHmatrix} | R Documentation |
Construction of Combined Relationship Matrix H
Description
Given a matrix A and a matrix G returns a H matrix. H matrix is the relationship matrix using combined information from the pedigree and genomic relationship matrices. First, you need to compute the matrices separated and then use them as input to build the combined H matrix. Two methods are implemented: 'Munoz' shrinks the G matrix towards the A matrix scaling the molecular relatadness by each relationship classes; 'Martini' is a modified version from Legarra et al. (2009) where combines A and G matrix using scaling factors. When method is equal 'Martini' and 'tau=1' and 'omega=1' you have the same H matrix as in Legarra et al. (2009).
Usage
Hmatrix(
A = NULL,
G = NULL,
markers = NULL,
c = 0,
method = "Martini",
tau = 1,
omega = 1,
missingValue = -9,
maf = 0,
ploidy = 2,
roundVar = 3,
ASV = FALSE
)
Arguments
A |
A matrix from function Amatrix |
G |
G matrix from function Gmatrix |
markers |
matrix marker which generated the Gmatrix |
c |
constant value of H computation, default: c=0 |
method |
"Martini" or "Munoz", default="Martini" |
tau |
to be used for Martini's method, default=1. |
omega |
to be used of Martini's method, default=1. |
missingValue |
missing value in data, default=-9. |
maf |
max of missing data accepted to each markerm default=0.05. |
ploidy |
data ploidy (an even number between 2 and 20), default=2. |
roundVar |
only used for Munoz's method, how many digits to consider the relationship be of same class, default=2. |
ASV |
if TRUE, transform matrix into average semivariance (ASV) equivalent (K = K / (trace(K) / (nrow(K)-1))). Details formula 2 of Fieldmann et al. (2022). Default = FALSE. |
Value
H Matrix with the relationship between the individuals based on pedigree and corrected by molecular information
Author(s)
Rodrigo R Amadeu, rramadeu@gmail.com
References
Feldmann MJ, et al. 2022. Average semivariance directly yields accurate estimates of the genomic variance in complex trait analyses. G3 (Bethesda), 12(6).
Munoz, PR. 2014 Unraveling additive from nonadditive effects using genomic relationship matrices. Genetics 198, 1759-1768
Martini, JW, et al. 2018 The effect of the H-1 scaling factors tau and omega on the structure of H in the single-step procedure. Genetics Selection Evolution 50(1), 16
Legarra, A, et al. 2009 A relationship matrix including full pedigree and genomic information. Journal of Dairy Science 92, 4656–4663
Examples
## Not run:
data(ped.sol)
data(snp.sol)
#Computing the numerator relationship matrix 10% of double-reduction
Amat <- Amatrix(ped.sol, ploidy=4, w = 0.1)
#Computing the additive relationship matrix based on VanRaden (modified)
Gmat <- Gmatrix(snp.sol, ploidy=4,
maf=0.05, method="VanRaden")
Gmat <- round(Gmat,3) #to be easy to invert
#Computing H matrix (Martini)
Hmat_Martini <- Hmatrix(A=Amat, G=Gmat, method="Martini",
ploidy=4,
maf=0.05)
#Computing H matrix (Munoz)
Hmat_Munoz <- Hmatrix(A=Amat, G=Gmat, markers = snp.sol,
ploidy=4, method="Munoz",
roundVar=2,
maf=0.05)
## End(Not run)