getGeneRegionTrackForGviz {ensembldb} | R Documentation

## Utility functions

### Description

Utility functions integrating `EnsDb` objects with other Bioconductor packages.

### Usage

    ## S4 method for signature 'EnsDb'
    getGeneRegionTrackForGviz(x,
            filter = AnnotationFilterList(), chromosome = NULL,
            start = NULL, end = NULL, featureIs = "gene_biotype")

### Arguments

(In alphabetic order)

`chromosome` | For `getGeneRegionTrackForGviz`: optional chromosome name to restrict the returned entry to a specific chromosome.
`end` | For `getGeneRegionTrackForGviz`: optional chromosomal end coordinate specifying, together with `start`, the chromosomal region from which features should be retrieved.
`featureIs` | For `getGeneRegionTrackForGviz`: whether the gene (`"gene_biotype"`) or the transcript biotype (`"tx_biotype"`) should be returned in column `"feature"`.
`filter` | A filter describing which results to retrieve from the database. Can be a single object extending `AnnotationFilter`, an `AnnotationFilterList` object combining several such objects or a `formula` representing a filter expression (see examples below or `AnnotationFilter` for more details).
`start` | For `getGeneRegionTrackForGviz`: optional chromosomal start coordinate specifying, together with `end`, the chromosomal region from which features should be retrieved.
`x` | For `toSAF` a `GRangesList` object. For all other methods an `EnsDb` instance.

### Value

For `getGeneRegionTrackForGviz`: see method description above.

### Methods and Functions

getGeneRegionTrackForGviz

  Retrieve a `GRanges` object with transcript features from the `EnsDb` that can be used directly in the `Gviz` package to create a `GeneRegionTrack`. Using the `filter`, `chromosome`, `start` and `end` arguments it is possible to fetch specific features (e.g. lincRNAs) from the database.

  If `chromosome`, `start` and `end` is provided the function internally first retrieves all transcripts that have an exon or an intron in the specified chromosomal region and subsequently fetch all of these transcripts. This ensures that all transcripts of the region are returned, even those that have only an intron in the region.

  The function returns a `GRanges` object with additional annotation columns `"feature"`, `"gene"`, `"exon"`, `"exon_rank"`, `"trancript"`, `"symbol"` specifying the feature type (either gene or transcript biotype), the (Ensembl) gene ID, the exon ID, the rank/index of the exon in the transcript, the transcript ID and the gene symbol/name.

### Author(s)

Johannes Rainer

### See Also

`transcripts`

### Examples

    library(EnsDb.Hsapiens.v86)
    edb <- EnsDb.Hsapiens.v86
    ######   getGeneRegionTrackForGviz
    ##
    ## Get all genes encoded on chromosome Y in the specifyed region.
    AllY <- getGeneRegionTrackForGviz(edb, chromosome = "Y", start = 5131959,
                                      end = 7131959)
    ## We could plot this now using plotTracks(GeneRegionTrack(AllY))

[Package ensembldb version 2.10.2 Index]