Learn R Programming

dartR (version 1.0)

gl.report.maf: Report minor allele frequency for loci

Description

Minor allele frequencies are reported for every loci. Also the number of individuals that have been used to calculate allele frequencies are reported to be able to discard frequencies of loci where only a few individuals are available.

Usage

gl.report.maf(gl, minind = 5, plot = TRUE)

Arguments

gl

-- name of the genlight object containing the SNP data [required]

minind

-- minimum number of individuals required to calculate the minor allele frequency. Please note allelefrequncies for such loci are still reported, but a warning is issued if the number is below minind.

plot

-- switch if a histogram of the distribution of allele frequencies should be provided

Value

the functions returns a list with two slots (vectors). maf contains the minor allele frequency and n the number of individuals the minor allele frequency is based on.

Examples

Run this code
# NOT RUN {
frequ <- gl.report.maf(testset.gl)
summary(frequ$maf)
summary(frequ$n)
# }

Run the code above in your browser using DataLab