computeG: Compute genomic relationship matrix

Description Usage Arguments Value Author(s) References Examples

Description

Use SNP markers to derive additive genomic relationship matrix. Missing marker is allowed and should be coded as NA.

Usage

1
computeG(snpmatrix, maf, impute = "mean", method)

Arguments

snpmatrix

A marker matrix with a dimension of n by m and the elements are coded as 0, 1, 2 or NA, where n and m indicate the total number of individuals and markers, accordingly.

maf

A minor allele frequency for quality control (e.g., 0.05).

impute

Imputation method for missing markers if applicable. Two methods of 'mean' and 'rbinom' are available, where the 'mean' imputes the missing marker using mean, and 'rbinom' imputes the missing marker by radom sampling from a binomial distribution. The default method is 'mean'. This argument will be ignored the snpmatrix does not inlcude missing markers.

method

A type of genomic relationship matrix, which includes 'G1' and 'G2' (VanRaden 2008).

Value

A n by n additive genomic relationship matrix.

Author(s)

Haipeng Yu and Gota Morota

Maintainer: Haipeng Yu haipengyu@vt.edu

References

VanRaden, P.M., 2008. Efficient methods to compute genomic predictions. Journal of dairy science, 91(11), pp.4414-4423.

Examples

1
2
3
4
5
6
7
8
# Load cattle data
data(GCcattle)

# Marker information
str(cattle.W)

# Compute genomic relationship matrix
G <- computeG(cattle.W, maf = 0.05, impute = 'mean', method = 'G1')

HaipengU/Connectedness documentation built on July 3, 2019, 12:21 p.m.