Description Usage Arguments Value Author(s) See Also Examples
View source: R/SNPRelate_Main.r
Get a common SNP list by comparing their rs id, chromosome indices and positions.
1  | snpgdsSNPListIntersect(snplist1, snplist2)
 | 
snplist1 | 
 the first SNP list object   | 
snplist2 | 
 the second SNP list object   | 
Return an object of “snpgdsSNPListClass” including the following components:
rs.id | 
 SNP id  | 
chromosome | 
 SNP chromosome index  | 
position | 
 SNP physical position in basepair  | 
allele | 
 reference / non-ref alleles from the first SNP list object  | 
afreq | 
 allele frequency from the first SNP list object  | 
Xiuwen Zheng
snpgdsSNPList, snpgdsSNPListStrand
1 2 3 4 5 6 7 8 9 10 11 12 13 14  | # open an example dataset (HapMap)
genofile <- openfn.gds(snpgdsExampleFileName())
# to get a snp list object
snplist1 <- snpgdsSNPList(genofile)
snplist2 <- snpgdsSNPList(genofile)
# a common snp list
snplist <- snpgdsSNPListIntersect(snplist1, snplist2)
summary(snplist$afreq)
# 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.