maf | R Documentation |
Calculate the minor (or other) allele frequency.
maf(x, element = 2)
x |
an object of class vcfR or chromR |
element |
specify the allele number to return |
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.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.