snpgdsSNPRateFreq | 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,
with.sample.id=FALSE, with.snp.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 |
with.sample.id |
if |
with.snp.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
snpgdsSampMissRate
# open an example dataset (HapMap)
genofile <- snpgdsOpen(snpgdsExampleFileName())
RV <- snpgdsSNPRateFreq(genofile, with.snp.id=TRUE)
head(data.frame(RV))
hist(RV$AlleleFreq, breaks=128)
summary(RV$MissingRate)
# close the file
snpgdsClose(genofile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.