snpgdsSNPRateFreq {SNPRelate} | R Documentation |
Calculate the allele frequency, minor allele frequency and missing rate per SNP.
snpgdsSNPRateFreq(gdsobj, sample.id=NULL, snp.id=NULL, with.id=FALSE)
gdsobj |
an object of class |
sample.id |
a vector of sample id specifying selected samples;
if |
snp.id |
a vector of snp id specifying selected SNPs;
if |
with.id |
if |
Return a list:
AlleleFreq |
allele frequencies |
MinorFreq |
minor allele frequencies |
MissingRate |
missing rates |
sample.id |
sample id, if |
snp.id |
SNP id, if |
Xiuwen Zheng
# open an example dataset (HapMap) genofile <- snpgdsOpen(snpgdsExampleFileName()) RV <- snpgdsSNPRateFreq(genofile) hist(RV$AlleleFreq, breaks=128) summary(RV$MissingRate) # close the file snpgdsClose(genofile)