QC_MAF: Minor allele frequency

Description Usage Arguments Value Author(s) See Also Examples

Description

Compute minor allele frequency (MAF) at the whole population and within crosses if a cross indicator vector is provided to cross.ind.

Usage

1
QC_MAF(mk.mat, cross.ind = NULL, parallel = FALSE, cluster = NULL)

Arguments

mk.mat

Character marker score matrix with genotypes as row and markers as column. Rows and columns names must be the genotype and marker identifiers respectively. Marker scores must be coded using one letter per allele. For example, AA, CC, GG, TT, AC, AG, AT, CA, CG, CT, GA, GC, GT, TA, TC, TG. Missing values must be coded NA.

cross.ind

Character vector indicating to which cross each genotype belongs. If cross.ind = NULL, the function do not consider cross subdivisions and only calculate MAF at the population level. Default = NULL.

parallel

Logical value specifying if the function should be executed in parallel on multiple cores. Default = FALSE.

cluster

Cluster object obtained with the function makeCluster() from the parallel package. Default = NULL.

Value

Return:

Object of class mafRes MAF containing the following element(s). If cross.ind = NULL

MAF.pop

Vector of marker allele MAF at the population level. NA if all markers scores are missing.

If cross.ind is not NULL

MAF.pop

Vector of marker allele MAF at the population level. NA if all markers scores are missing.

MAF.cr

Matrix of marker allele MAF within crosses. NA if all markers scores are missing.

Author(s)

Vincent Garin

See Also

QC_tagMAFCr

Examples

1
2
3
4
5
data(USNAM_geno)
cross.ind <- substr(rownames(USNAM_geno)[7:dim(USNAM_geno)[1]], 1, 4)

MAF <- QC_MAF(mk.mat = USNAM_geno[7:dim(USNAM_geno)[1], ],
             cross.ind = cross.ind)

vincentgarin/GWASToolBox documentation built on May 6, 2019, 8:59 p.m.