Learn R Programming

SNPRelate (version 1.6.4)

snpgdsSNPList: Create a SNP list object

Description

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

Usage

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:
rs.id
SNP id
chromosome
SNP chromosome index
position
SNP physical position in basepair
allele
reference / non-ref alleles
afreq
allele frequency

See Also

snpgdsSNPListIntersect, snpgdsSNPListStrand

Examples

Run this code
# open an example dataset (HapMap)
genofile <- snpgdsOpen(snpgdsExampleFileName())

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

# close the file
snpgdsClose(genofile)

Run the code above in your browser using DataLab