compute_MAF {CJAMP}R Documentation

Compute minor allele frequency of genetic variants.

Description

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

Usage

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

# 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)


[Package CJAMP version 0.1.1 Index]