snpgdsSelectSNP {SNPRelate} | R Documentation |
Create a list of candidate SNPs based on specified criteria
snpgdsSelectSNP(gdsobj, sample.id=NULL, snp.id=NULL, autosome.only=TRUE, remove.monosnp=TRUE, maf=NaN, missing.rate=NaN, verbose=TRUE)
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 |
autosome.only |
if |
remove.monosnp |
if |
maf |
to use the SNPs with ">= maf" only; if |
missing.rate |
to use the SNPs with "<= missing.rate" only;
if |
verbose |
if |
Return a list of snp ids.
Xiuwen Zheng
snpgdsSampMissRate
, snpgdsSNPRateFreq
,
snpgdsLDpruning
# open an example dataset (HapMap) genofile <- snpgdsOpen(snpgdsExampleFileName()) snpset <- snpgdsSelectSNP(genofile, maf=0.05, missing.rate=0.95) length(snpset) # 7502 # close the genotype file snpgdsClose(genofile)