Learn R Programming

AllelicImbalance (version 1.10.2)

getAreaFromGeneNames: Get Gene Area

Description

Given a character vector with genesymbols and an OrgDb object, this function returns a GRanges giving the coordinates of the genes.

Usage

getAreaFromGeneNames(genesymbols, ...)
"getAreaFromGeneNames"(genesymbols, OrgDb, leftFlank = 0, rightFlank = 0, na.rm = FALSE, verbose = TRUE)

Arguments

genesymbols
A character vector that contains genesymbols of genes from which we wish to retrieve the coordinates
...
arguments to pass on
OrgDb
An OrgDb object containing gene annotation
leftFlank
A integer specifying number of additional nucleotides before the genes
rightFlank
A integer specifying number of additional nucleotides after the genes
na.rm
A boolean removing genes that returned NA from the annotation
verbose
Setting verbose=TRUE makes function more talkative

Value

getAreaFromGeneNames returns a GRanges object with genomic coordinates around the specified genes

Details

This function is a convenience function that can be used to determine which genomic coordinates to specify to e.g. impBamGAL when retrieving reads.

The function cannot handle genes that do not exist in the annotation. To remove these please set the na.rm=TRUE.

Examples

Run this code

#load example data
data(ASEset)

#get counts at the three positions specified in GRvariants
library(org.Hs.eg.db )
searchArea<-getAreaFromGeneNames(c('PAX8','TLR7'), org.Hs.eg.db)

Run the code above in your browser using DataLab