Description Usage Arguments Value Author(s) See Also Examples
View source: R/SNPRelate_Main.r
Calculate the allele frequency, minor allele frequency and missing rate per SNP
1 | snpgdsSNPRateFreq(gdsobj, sample.id=NULL, snp.id=NULL)
|
gdsobj |
a GDS file object ( |
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 |
Return a list:
AlleleFreq |
the allele frequencies |
MinorFreq |
the minor allele frequencies |
MissingRate |
the missing rates |
Xiuwen Zheng
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.