mac: Compute the minor allele count.

macR Documentation

Compute the minor allele count.

Description

mac computes the smallest allele count for a given vector of genotype counts.

Usage

mac(X)

Arguments

X

a vector or matrix with genotype counts (AA, AB, BB)

Value

a vector of the minor allele counts

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

See Also

maf

Examples

   X <- as.vector(rmultinom(1,100,c(0.5,0.4,0.1)))
   names(X) <- c("AA","AB","BB")
   print(X)
   print(mac(X))

HardyWeinberg documentation built on May 7, 2022, 5:05 p.m.