computeG: Compute genomic relationship matrix

Description Usage Arguments Value Author(s) References Examples

View source: R/computeG.R

Description

Use single nucleotide polymorphisms markers to derive an additive genomic relationship matrix. Missing markers are allowed, but should be coded as NA.

Usage

1
computeG(snpmatrix, maf = 0.05, impute = "rbinom", method = "G1")

Arguments

snpmatrix

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

maf

A minor allele frequency cutoff for quality control. The default minor allele frequency is 0.05.

impute

Perform genotype imputation for missing markers if applicable. Two methods of 'mean' and 'rbinom' are available, where the 'mean' imputes missing markers using mean and 'rbinom' imputes the missing markers by random sampling from a binomial distribution. The default method is 'rbinom'. This argument will be ignored if the snpmatrix does not include any missing markers.

method

A type of genomic relationship matrix including 'G1' and 'G2' (VanRaden 2008). The default method is 'G1'.

Value

An 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 = 'rbinom', method = 'G1')

HaipengU/GCA2 documentation built on March 1, 2021, 7:41 a.m.