minorAlleleFrequency: MINOR ALLELE FREQUENCY

Description Usage Arguments Value Examples

Description

These functions estimate the minor allele frequency, remove SNPs from a dataset if they do not meet a minior allele frequency threshold, and plot a histogram of minor allele frequencies.

Usage

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

Arguments

SNPmat

a numeric matrix of 0, 1,2 with individual in rows and snps in colums

minMAF

a number indicating the minimum minor allele frquency of snps in colums

Value

will return the allele frequency minorAlleleFrequency returns a vector of minor allele frequencies. filterSNPs returns a matrix in the same format as SNPmat, but with SNPs removed if they did not meet the threshold. minMAF returns nothing but plots a histogram.

Examples

1
2
3
4
5
6
7
# set up a dataset for this example
mySNP <- matrix(sample(c(0, 1, 2), 64, replace = TRUE), nrow = 8, ncol = 8)

# run functions
minorAlleleFrequency(mySNP)
filterSNPs(mySNP)
mafHist(mySNP)

clandau12322/squirrel documentation built on May 28, 2019, 7:29 p.m.