make_weighted_GRM: Construct a weighted G matrix from genotypes

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

This function ...

Usage

1

Arguments

genomat

matrix of genotypes in -1,0,1 format (i.e. 0 is heterozygous, 1 and -1 are opposing homozygous states)

weights

vector of weights for each of the SNPs in the genomat. Use a vector of 1s to avoid weighting.

Value

a weighted Genomic Relationship Matrix with cols and rows named according to the rownames in genomat. Uses the cpgen package implementation of Van Radens GRM method

Examples

1
2
3
4
5
6
# get an example genotype matrix
data(M)
# generate weights for the SNPs
wt <- runif(ncol(M), min = 1, max = 10)

make_weighted_GRM(M, wt)

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