SNPrrBLUP: Genomic prediction by rrBLUP

View source: R/genomicSelectionPrediction.r

SNPrrBLUPR Documentation

Genomic prediction by rrBLUP

Description

Genotpye-to-phenotype prediciton via ridge regression best linear unbiased prediction (rrBLUP) model. The inputs is genotypes.

Usage

SNPrrBLUP(x,y,idx1,idx2,fix = NULL,model = FALSE)

Arguments

x

Genotypic matrix in numberic format (See transHapmap2numeric), row represents sample well column represents feature (SNP).

y

An numeric array of phenotype.

idx1

An array of index for training set.

idx2

An array of index for testing (predicted) set.

model

Boolean, if output the model, default FALSE.

fix

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

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

transHapmap2numeric

rrBLUP:
mixed.solve

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)

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

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