Learn R Programming

gQTLseq (version 0.0.10)

genemap: generate a GRanges from an annotation resource that addresses gene locations

Description

generate a GRanges from an annotation resource that addresses gene locations

Usage

genemap(orgref, genes = NULL, 
  geneannotype, chrsToUse = as.character(1:22), 
  na.action = na.omit, forceUCSC = TRUE, 
  addCHRLENGTHS = TRUE, trim = TRUE)

Arguments

orgref
instance of OrganismDb or ChipDb
genes
vector of tokens to be mapped; if NULL, all tokens in keys(orgref, keytype=geneannotype) are used
geneannotype
character, an element of keytypes(orgref)
chrsToUse
vector identifying tokens with acceptable values for the ranges of CHRLOC and CHRLOCEND columns of the annotation resource
na.action
an interim result of the annotation query is a data.frame instance; na.action will be applied to this data.frame prior to GRanges construction
forceUCSC
logical: if UCSC chromosome identifiers are not employed and forceUCSC is TRUE, ``chr'' will be prepended to chromosome numbers.
addCHRLENGTHS
logical, should action be taken to add CHRLENGTH information to the seqinfo for the output
trim
logical, if TRUE, the trim method will be applied before returning to ensure all ranges are consistent with CHRLENGTHs

Value

  • GRanges instance

Examples

Run this code
if (require(Homo.sapiens)) {
 gm = genemap(Homo.sapiens, geneannotype="ENTREZID")
 gm
 }
# also consider
# genemap(Homo.sapiens, geneannotype="ENSEMBL")
# and check relationship to rowRanges(montpick.summ) -- there are
# minor discrepancies in ranges

Run the code above in your browser using DataLab