Learn R Programming

SNPassoc (version 2.0-11)

getGeneSymbol: Get gene symbol from a list of SNPs

Description

Get gene symbol from a list of SNPs

Usage

getGeneSymbol(
  x,
  snpCol = 1,
  chrCol = 2,
  posCol = 3,
  db = TxDb.Hsapiens.UCSC.hg19.knownGene
)

Value

a data.frame having initial information and gene symbol

Arguments

x

data.frame containing: SNP name, chromosome and genomic position.

snpCol

column of x having the SNP name. Default is 1.

chrCol

column of x having the SNP chromosome. Default is 2.

posCol

column of x having the SNP position. Default is 3.

db

reference genome. Default is 'TxDb.Hsapiens.UCSC.hg19.knownGene'

Examples

Run this code
    # \donttest{
        snps = c('rs58108140','rs189107123','rs180734498','rs144762171')
        chr = c('chr1','chr1','chr1','chr1')
        pos = c(10583, 10611, 13302, 13327)
        
        x <- data.frame(snps, chr, pos )
        
        getGeneSymbol(x)
    # }

Run the code above in your browser using DataLab