GBLUP: Genomic prediction by GBLUP (kinship matrix input)

View source: R/genomicSelectionPrediction.r

GBLUPR Documentation

Genomic prediction by GBLUP (kinship matrix input)

Description

Genotpye-to-phenotype prediciton via genomic best linear unbiased prediction (GBLUP) model. The inputs is genotypes.

Usage

GBLUP(amat,y,idx1,idx2,fix = NULL,model = FALSE)

Arguments

amat

Additive relationship matrix, which compute from genetic matrix (See A.mat).

y

An numeric array of phenotype.

idx1

An array of index for training set.

idx2

An array of index for testing (predicted) set.

fix

A matrix containing other variables as fixed effects in mixed model.

model

Boolean, if output the model, default FALSE.

Value

A array for predicted value.

Author(s)

Qian Cheng, Shuqin Jiang, Xiangfeng Wang

References

Endelman, J.B. 2011. Ridge regression and other kernels for genomic selection with R package rrBLUP. Plant Genome 4:250-255. doi: 10.3835/plantgenome2011.08.0024

See Also

rrBLUP:
A.mat:
kin.blup

Examples

## Not run! 
## load hapmap data (genomic data) of MZ hybrids
data(MZ)

## load phenotypic data of MZ hybrids
data(phe)

## pre-process for G2P prediction 
rownames(MZ) <- MZ[,1]
MZ <- MZ[,-c(1:11)]
MZ.t <- t(MZ)

## conversion
MZ.n <- transHapmap2numeric(MZ.t)
dim(MZ.t)
## Additive relationship matrix compute
library(rrBLUP)
amat <- A.mat(MZ.n)

## prediction
idx1 <- sample(1:1404,1000)
idx2 <- setdiff(1:1404,idx1)
predRes <- GBLUP(amat,phe$EW,idx1,idx2,fix = NULL,model = FALSE)

GOVS-pack/GOVS documentation built on Oct. 9, 2022, 8:29 a.m.