annotation-wrappers {AllelicImbalance} | R Documentation

## AnnotationDb wrappers

### Description

These functions acts as wrappers to retrieve information from annotation database objects (`annotationDb objects`) or (`transcriptDb objects`)

### Usage

    getGenesFromAnnotation(
      OrgDb,
      GR,
      leftFlank = 0,
      rightFlank = 0,
      getUCSC = FALSE,
      verbose = FALSE
    )

    getGenesVector(OrgDb, GR, leftFlank = 0, rightFlank = 0, verbose = FALSE)

    getExonsFromAnnotation(
      TxDb,
      GR,
      leftFlank = 0,
      rightFlank = 0,
      verbose = FALSE
    )

    getExonsVector(TxDb, GR, leftFlank = 0, rightFlank = 0, verbose = FALSE)

    getTranscriptsFromAnnotation(
      TxDb,
      GR,
      leftFlank = 0,
      rightFlank = 0,
      verbose = FALSE
    )

    getTranscriptsVector(TxDb, GR, leftFlank = 0, rightFlank = 0, verbose = FALSE)

    getCDSFromAnnotation(TxDb, GR, leftFlank = 0, rightFlank = 0, verbose = FALSE)

    getCDSVector(TxDb, GR, leftFlank = 0, rightFlank = 0, verbose = FALSE)

    getAnnotationDataFrame(
      GR,
      strand = "+",
      annotationType = NULL,
      OrgDb = NULL,
      TxDb = NULL,
      verbose = FALSE
    )

### Arguments

`OrgDb` | An `OrgDb` object
`GR` | A `GenomicRanges` object with sample area
`leftFlank` | An `integer` specifying number of additional nucleotides around the SNPs for the leftFlank
`rightFlank` | An `integer` specifying number of additional nucleotides around the SNPs for the rightFlank
`getUCSC` | A `logical` indicating if UCSC transcript IDs should also be retrieved
`verbose` | A `logical` making the functions more talkative
`TxDb` | A `transcriptDb` object
`strand` | Two options,'+' or '-'
`annotationType` | select one or more from 'gene', 'exon', 'transcript', 'cds'.

### Details

These functions retrieve regional annotation from OrgDb or TxDb objects, when given GRanges objects.

### Value

`GRanges object` with ranges over the genes in the region.

The `getGenesVector` function will return a character vector where each element are gene symbols separated by comma

`GRanges object` with ranges over the exons in the region.

The `getTranscriptsFromAnnotation` function will return a `GRanges object` with ranges over the transcripts in the region.

The `getCDSFromAnnotation` function will return a `GRanges object` with ranges over the CDSFs in the region.

The `getExonsVector` function will return a character vector where each element are exons separated by comma

The `getTranscriptsVector` function will return a character vector where each element are transcripts separated by comma

The `getCDSVector` function will return a character vector where each element are CDSs separated by comma

The `getAnnotationDataFrame` function will return a data.frame with annotations. This function is used internally by i.e. the barplot-function

### Author(s)

Jesper R. Gadin, Lasse Folkersen

### Examples

      data(ASEset)
      require(org.Hs.eg.db)
      require(TxDb.Hsapiens.UCSC.hg19.knownGene)
      OrgDb <- org.Hs.eg.db
      TxDb <- TxDb.Hsapiens.UCSC.hg19.knownGene

      #use for example BcfFiles as the source for SNPs of interest
      GR <- rowRanges(ASEset)
      #get annotation
      g <- getGenesFromAnnotation(OrgDb,GR)
      e <- getExonsFromAnnotation(TxDb,GR)
      t <- getTranscriptsFromAnnotation(TxDb,GR)
      c <- getCDSFromAnnotation(TxDb,GR)

[Package AllelicImbalance version 1.25.2 Index]