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

rowMAFs

Rowwise Minor Allele Frequency


Description

Computes for each SNP represented by a row of a matrix the frequency of the minor allele.

Usage

rowMAFs(x, check = TRUE)

Arguments

x

a matrix in which each row represents a SNP and each column a subject, where the genotypes of each SNP are coded by 1 (for the homozygous reference genotype), 2 (heterozygous), and 3 (homozygous variant). NAs are also allowed.

check

should it be checked if the matrix contains values differing from 1, 2, and 3? It is highly recommended to leave check = TRUE. Setting check = FALSE reduces the computation time only slightly.

Value

a vector containing the minor allele frequency of the SNPs represented by x.

Author(s)

Holger Schwender, holger.schwender@udo.edu


scrime

Analysis of High-Dimensional Categorical Data Such as SNP Data

v1.3.5
GPL-2
Authors
Holger Schwender, with a contribution of Arno Fritsch
Initial release
2018-12-01

We don't support your browser anymore

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