getGeneSymbol: Get gene symbol from a list of SNPs

View source: R/getGeneSymbol.R

getGeneSymbolR Documentation

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
)

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'

Value

a data.frame having initial information and gene symbol

Examples

    
        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)
    

isglobal-brge/SNPassoc documentation built on May 15, 2023, 8:10 p.m.