maf2genoFreq: Genotype frequencies

View source: R/quantgen.R

maf2genoFreqR Documentation

Genotype frequencies

Description

Calculate the genotype frequencies at a bi-allelic SNP, from its minor allele frequency, assuming Hardy-Weinberg equilibrium.

Usage

maf2genoFreq(maf)

Arguments

maf

frequency of the minor allele, a

Value

vector of genotype frequencies

Author(s)

Timothee Flutre

Examples

## Not run: set.seed(1859)
genos <- sample(x=c(0,1,2), size=n, replace=TRUE, prob=maf2genoFreq(maf))
table(genos)

## End(Not run)

timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.