est_SNPeffects: estimate the additive effect of each SNP upon a trait (i.e....

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

estimate the additive effect of each SNP upon a trait (i.e. quick GWAS). SNPs are provided in a genotype matrix.

Usage

1
est_SNPeffects(phenodata, genomat, valset, fixmat = NULL, method = "emmax")

Arguments

phenodata

data frame with 2 columns. One col must be named 'ID' and contain sample IDs. Another column must be named 'y' and contain the phenotypes. Defaults to NULL.

genomat

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

valset

vector of indices Defaults to NULL.

Value

a vector of squared SNP effects, one per SNP in genomat, estimated with the EMMAX GWAS method from the cpgen package.

Examples

1
2
3
4
5
6
7
# get an example genotype matrix
data(M)
# get an example phenotype data frame
data(pheno)
# choose a validation set of 20 random individuals
val <- sample(1:nrow(pheno), 20)
est_SNPeffects(pheno, M, val)

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