given a gene name, get the genomic coordinates.

getLocation(symbol, txdb, org)

Arguments

symbol

Gene symbol

txdb

txdb will be used to extract the genes

org

org package name

Examples

library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(org.Hs.eg.db)
getLocation("HSPA8", TxDb.Hsapiens.UCSC.hg19.knownGene, "org.Hs.eg.db")
#>   403 genes were dropped because they have exons located on both strands
#>   of the same reference sequence or on more than one reference sequence,
#>   so cannot be represented by a single genomic range.
#>   Use 'single.strand.genes.only=FALSE' to get all the genes in a
#>   GRangesList object, or use suppressMessages() to suppress this message.
#> GRanges object with 1 range and 1 metadata column:
#>        seqnames              ranges strand |     gene_id
#>           <Rle>           <IRanges>  <Rle> | <character>
#>   3312    chr11 122928200-122933186      - |        3312
#>   -------
#>   seqinfo: 1 sequence from hg19 genome