geneToSNPList {cpvSNP} | R Documentation

## Translate a List of Gene Ids to Their Corresponding SNP Ids

### Description

Translates a set of gene ids to their corresponding SNPs.

### Usage

    geneToSNPList(geneList, arrayData, genes, maxgap = 20000, quiet = TRUE)

### Arguments

`geneList` | An object of class `GeneSetCollection` or `GeneSet` where geneIds holds the gene Entrez ids.
`arrayData` | A `GRanges` object that corresponds to the probes for which data are present.
`genes` | A `GRanges` object holding the gene transcripts for which the mapping will occur. The ids of the genes should match the ids that are listed in the `geneList` object.
`maxgap` | An integer value indicating the flanking region around the gene for which SNPs are considered part of the gene. Default is 20000 (20kb).
`quiet` | A logical variable indicating whether warnings should be output from the SNP to gene mapping step.

### Details

Translates a GeneSet or GeneSetCollection of gene Entrez ids to the corresponding SNPs that lie within a prespecified region of the gene.

### Value

A `GeneSetCollection` object containing all SNP ids that lie within the genes listed in geneList.

### Author(s)

Jason Hackney, Jessica Larson, Caitlin McHugh mchughc@uw.edu

### Examples

        data(geneSetAnalysis)
        head(geneSetAnalysis$arrayData)
        arrayDataGR <- createArrayData(geneSetAnalysis[["arrayData"]], positionName="Position")

        library(TxDb.Hsapiens.UCSC.hg19.knownGene)
        genesHg19 <- genes(TxDb.Hsapiens.UCSC.hg19.knownGene)
    	geneSets <- geneSetAnalysis[["geneSets"]]

    	snpsGSC <- geneToSNPList(geneSets, arrayDataGR, genesHg19)

[Package cpvSNP version 1.19.0 Index]