alleleFrequency: Allelic frequency

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Calculates the frequency of the A allele over the specifed scans.

Usage

1
2
alleleFrequency(genoData, scan.exclude,
                verbose = TRUE)

Arguments

genoData

GenotypeData object.

scan.exclude

Integer vector with IDs of scans to exclude.

verbose

Logical value specifying whether to show progress information.

Details

Counts male heterozygotes on the X and Y chromosomes as missing values, and any genotype for females on the Y chromosome as missing values. A "sex" variable must be present in the scan annotation slot of genoData.

Samples with missing sex are included in the allele counts for "all" and "MAF" for autosomes, but not for sex chromosomes.

Value

A matrix with a row for each SNP. Columns "M" for males, "F" for females, and "all" for all scans give frequencies of the A allele. Sample size for males, females, and all is returned as "n.M", "n.F", and "n", respectively. "MAF" is the minor allele frequency over all scans.

Author(s)

Cathy Laurie, Stephanie Gogarten

See Also

GenotypeData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(GWASdata)
file <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
gds <- GdsGenotypeReader(file)

# need scan annotation with sex
data(illuminaScanADF)
genoData <-  GenotypeData(gds, scanAnnot=illuminaScanADF)

afreq <- alleleFrequency(genoData, scan.exclude=(illuminaScanADF$race != "CEU"))
close(genoData)

amstilp/GWASTools documentation built on May 10, 2019, 1:08 a.m.