# 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]
# \donttest{
# 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]
# }
Run the code above in your browser using DataLab