encode_gwas {martini} | R Documentation

## Change encoding of dataset

### Description

Converts the encoding from additive to another one.

### Usage

    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

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

[Package martini version 1.8.0 Index]