snpgdsSNPRateFreq {SNPRelate}R Documentation

Allele Frequency, Minor Allele Frequency, Missing Rate of SNPs

Description

Calculate the allele frequency, minor allele frequency and missing rate per SNP.

Usage

snpgdsSNPRateFreq(gdsobj, sample.id=NULL, snp.id=NULL, with.id=FALSE)

Arguments

gdsobj

an object of class SNPGDSFileClass, a SNP GDS file

sample.id

a vector of sample id specifying selected samples; if NULL, all samples will be used

snp.id

a vector of snp id specifying selected SNPs; if NULL, all SNPs will be used

with.id

if TRUE, return sample and SNP IDs

Value

Return a list:

AlleleFreq

allele frequencies

MinorFreq

minor allele frequencies

MissingRate

missing rates

sample.id

sample id, if with.id=TRUE

snp.id

SNP id, if with.id=TRUE

Author(s)

Xiuwen Zheng

See Also

snpgdsSampMissRate

Examples

# open an example dataset (HapMap)
genofile <- snpgdsOpen(snpgdsExampleFileName())

RV <- snpgdsSNPRateFreq(genofile)
hist(RV$AlleleFreq, breaks=128)
summary(RV$MissingRate)

# close the file
snpgdsClose(genofile)

[Package SNPRelate version 1.10.2 Index]