encode_gwas: Change encoding of dataset

Description Usage Arguments Value Examples

View source: R/legacy.R

Description

Converts the encoding from additive to another one.

Usage

1
encode_gwas(X, encoding)

Arguments

X

Genotype matrix with SNPs encoded as 0 for major homozygous, 1 for heterozygous and 2 for minor homozygous.

encoding

Genetic model assumed: additive, recessive, dominant or codominant.

Value

A genotype matrix

Examples

1
2
X <- as(minigwas[["genotypes"]], "numeric")
martini:::encode_gwas(X, "recessive")

martini documentation built on Nov. 8, 2020, 5:39 p.m.