blupga: Basic BLUP|GA

Description Usage Arguments Value Examples

View source: R/BLUPGA.R

Description

This function runs the BLUP|GA method where certain SNPs are weighted in the a special GRM (S) prior to GBLUP.

Usage

1
blupga(G, Smat, phenodata, valset, verbose = T)

Arguments

G

GRM constructed using all available SNPs and all samples Defaults to NULL. Use make_GRM to get this.

phenodata

data frame with 2 or 3 columns. One col must be named 'ID' and contain sample IDs. Another col must be named 'y' and contain the phenotypes. If fixed effects are included then a 3rd col called 'FE' should contain the categorical effects.

valset

numeric vector of indices that defines which rows in phenodata will be set to NA and used for cross-validation Defaults to NULL.

S

Weighted G-matrix constructed using only selected SNPs and all samples Defaults to NULL. Use make_weighted_GRM to get this.

Value

A data frame containing the correlation between the genetic value (GEBV) and the fixed-effects adjusted phenotype of the individuals in the valset.

Since BLUP|GA is run for each value of omega (W) from 0.0 to 1.0 in increments of 0.10, each row of the returned data frame contains the cross-validation correlation at one value of omega (W). This allows the user to find the value of W at which the predictive ability (COR) is maximised.

Columns:

W

omega weighting for selected SNPS in candidate genes (0.0–1.0)

COR

cross validation predictive ability (0.0–1.0)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# get example genotype matrix and phenotype data
data(M)
data(pheno)

# select some 'special' SNPs from M to be weighted
GAsnps <- sample(1:ncol(M), 20)

# generate random weights for the 'special' SNPs
wt <- runif(length(GAsnps), min = 1, max = 10)
# make a weighted GRM for the 'special' SNPs
S <- make_weighted_GRM(M[,GAsnps], wt)
# make a standard GRM for all SNPs
G <- make_GRM(M)

# choose a validation set of 20 random individuals
val <- sample(1:nrow(pheno), 20)
results <- blupga(G, S, pheno, val)

dkainer/BLUPGA documentation built on Jan. 3, 2020, 1:09 a.m.