minorAlleleFrequency: Minor Allele Frequency (MAF) Detection

Description Usage Arguments Value Author(s) Examples

View source: R/SNPfreq_functions.R

Description

A set of functions that allow for detection of SNP MAF, allow for filtering SNPs by MAF, and creating a histogram of SNP MAF.

Usage

1
2
3
minorAlleleFrequency(SNPmat)
filterSNPs(SNPmat, minMAF = 0.05)
mafHist(SNPmat)

Arguments

SNPmat

Matrix of SNPs to used in the function.

minMAF

Minimun MAF value of SNPs you'd like to keep. Default value is set to 0.05 but can be set to other values as needed

Value

minorAlleleFrequency

Returns a vector of MAFs.

filterSNPs

Returns a matrix in the same format as the inputed matrix but with columns removed for SNPs with very rare alleles.

mafHis

Draws a histogram of SNP MAFs.

Author(s)

Olivia Obenland

Examples

1
2
3
4
5
SNPmat <- matrix(c(2,4,6,8,10,12,14,16,18,3,6,9,12,15,18), nrow = 5, ncol = 3)

minorAlleleFrequency(SNPmat)
filterSNPs(SNPmat, minMAF = 0.05)
mafHist(SNPmat)

obenlan2/Lab-9 documentation built on May 21, 2019, 4:06 a.m.