Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

maf

Minor allele frequency


Description

Calculate the minor (or other) allele frequency.

Usage

maf(x, element = 2)

Arguments

x

an object of class vcfR or chromR

element

specify the allele number to return

Details

The function maf() calculates the counts and frequency for an allele. A variant may contain more than two alleles. Rare alleles may be true rare alleles or the result of genotyping error. In an attempt to address these competing issues we sort the alleles by their frequency and the report statistics based on their position. For example, setting element=1 would return information about the major (most common) allele. Setting element=2 returns information about the second allele.

Value

a matrix of four columns. The first column is the total number of alleles, the second is the number of NA genotypes, the third is the count and fourth the frequency.


vcfR

Manipulate and Visualize VCF Data

v1.12.0
GPL-3
Authors
Brian J. Knaus [cre, aut] (<https://orcid.org/0000-0003-1665-4343>), Niklaus J. Grunwald [aut] (<https://orcid.org/0000-0003-1656-7602>), Eric C. Anderson [ctb], David J. Winter [ctb], Zhian N. Kamvar [ctb] (<https://orcid.org/0000-0003-1458-7108>), Javier F. Tabima [ctb] (<https://orcid.org/0000-0002-3603-2691>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.