compute_MAF: Compute minor allele frequency of genetic variants.

Description Usage Arguments Value Examples

Description

Function to compute the minor allele frequency (MAF) of one or more genetic variants.

Usage

1
compute_MAF(genodata)

Arguments

genodata

Numeric vector or dataframe containing the genetic variants in columns. Must be in allelic coding 0, 1, 2.

Value

A vector containing the minor allele frequencies of the variants.

Examples

1
2
3
4
5
6
7
8
# Example of a single variant
set.seed(10)
genodata <- stats::rbinom(2000, 2, 0.3)
compute_MAF(genodata)

# Example of a set of variants
genodata <- generate_genodata()
compute_MAF(genodata)

CJAMP documentation built on May 1, 2019, 9:15 p.m.