mafvector: Calculate the Minor Allele Frequency (MAF) for a matrix with...

View source: R/mafvector.R

mafvectorR Documentation

Calculate the Minor Allele Frequency (MAF) for a matrix with (0,1,2) genotype data

Description

Function mafvector calculates genotype counts columnwise and determines the minor allele frequency for each column.

Usage

mafvector(X)

Arguments

X

A matrix of with (0,1,2) genotype data, individuals in rows, markers in columns.

Details

mafvector calculates the frequency of the minor allele irrespective of the coding; i.e., irrespective of whether the genotype data represent major or minor allele counts. Missing values are discarded for the calculation of the MAF.

Value

a vector

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

Examples

  data(SimulatedPedigree)
  p <- mafvector(SimulatedPedigree[,1:10])
  print(p)

Jacquard documentation built on Sept. 17, 2024, 5:09 p.m.