snpgdsSNPList {SNPRelate} | R Documentation

## 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:

`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

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

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

    # close the file
    snpgdsClose(genofile)

[Package SNPRelate version 1.14.0 Index]