snpgdsSNPList: Create a SNP list object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/AllUtilities.R

Description

A list object of SNP information including rs, chr, pos, allele and allele frequency.

Usage

1
snpgdsSNPList(gdsobj, sample.id=NULL)

Arguments

gdsobj

an object of class SNPGDSFileClass, a SNP GDS file

sample.id

a vector of sample id specifying selected samples; if NULL, all samples are used

Value

Return an object of snpgdsSNPListClass including the following components:

snp.id

SNP id

chromosome

SNP chromosome index

position

SNP physical position in basepair

allele

reference / non-ref alleles

afreq

allele frequency

Author(s)

Xiuwen Zheng

See Also

snpgdsSNPListIntersect

Examples

1
2
3
4
5
6
7
8
9
# open an example dataset (HapMap)
genofile <- snpgdsOpen(snpgdsExampleFileName())

# to get a snp list object
snplist <- snpgdsSNPList(genofile)
head(snplist)

# close the file
snpgdsClose(genofile)

SNPRelate documentation built on Nov. 8, 2020, 5:31 p.m.