snpgdsSNPRateFreq: Allele Frequency, Minor Allele Frequency, Missing Rate of...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/SNPRelate_Main.r

Description

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

Usage

1
snpgdsSNPRateFreq(gdsobj, sample.id=NULL, snp.id=NULL)

Arguments

gdsobj

a GDS file object (gds.class)

sample.id

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

snp.id

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

Value

Return a list:

AlleleFreq

the allele frequencies

MinorFreq

the minor allele frequencies

MissingRate

the missing rates

Author(s)

Xiuwen Zheng

See Also

snpgdsSampMissrate

Examples

1
2
3
4
5
6
7
8
9
# open an example dataset (HapMap)
genofile <- openfn.gds(snpgdsExampleFileName())

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

# close the genotype file
closefn.gds(genofile)

Example output

Loading required package: gdsfmt
SNPRelate -- supported by Streaming SIMD Extensions 2 (SSE2)
Hint: it is suggested to call `snpgdsOpen' to open a SNP GDS file instead of `openfn.gds'.
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
0.000000 0.000000 0.000000 0.003998 0.000000 0.702509 

SNPRelate documentation built on May 2, 2019, 4:56 p.m.