getaaf {BinaryDosage}R Documentation

Calculate alternate allele frequency

Description

Routine to calculate the alternate allele frequency given the dosages. Missing values for dosage ignored. This function is used internally and is exported for use in examples.

Usage

getaaf(dosage, p0, p1, p2)

Arguments

dosage

Dosage values

p0

Pr(g=0) - unused

p1

Pr(g=1) - unused

p2

Pr(g=2) - unused

Value

Alternate allele frequency

Examples

# Get information about binary dosage file
bdfile <- system.file("extdata", "vcf1a.bdose", package = "BinaryDosage")
bdinfo <- getbdinfo(bdfiles = bdfile)
snp1 <- getsnp(bdinfo = bdinfo, 1)
aaf <- getaaf(snp1$dosage)

[Package BinaryDosage version 1.0.0 Index]