getRegionsFromTxDb {eisaR} | R Documentation

## Get exonic/gene body regions from a transcript database.

### Description

From a transcript database package (`TxDb`), extract exonic and gene body ranges for use with EISA. These regions can be used to quantify RNA-seq alignments in exons and gene bodies, respectively. Intronic counts can then be obtained from the difference between gene bodies and exonic region counts.

### Usage

    getRegionsFromTxDb(txdb, exonExt = 10L, strandedData = TRUE)

### Arguments

`txdb` | a `TxDb` or an `EnsDb` object with the transcript annotations.
`exonExt` | `numeric` (default = 10L). Exonic ranges will be extended on either side by this many nucleotides, in order to avoid "bleed-over" of exonic alignments into adjacent intronic regions.
`strandedData` | `logical(1)`. If `TRUE`, the RNA-seq data is assumed to be strand-specific, and therefore only overlapping genes that are on the same strand will be filtered out. If `FALSE`, also genes overlapping on opposite strands will be filtered out.

### Details

The exonic regions are generated as follows:

1. extract exons by gene from the `txdb`

2. extend each exon by `exonExt`

3. combine overlapping exons within each gene

4. create gene body ranges from the most extreme exonic coordinates

5. filter out genes that have only a single exon (no intron), have exons on more than a single chromosome or on both strands, or that overlap other genes

### Value

a `list` with elements "exons" and "genebodies", containing named `GenomicRanges` objects with ranges for exons and gene bodies, respectively.

### Author(s)

Michael Stadler

### See Also

`TxDb` for details on `TxDb` objects and how to create them, e.g. from `.gtf` files.

### Examples

    if (requireNamespace("AnnotationDbi", quietly = TRUE)) {
        txdb <- AnnotationDbi::loadDb(system.file("extdata", "hg19sub.sqlite", package = "eisaR"))
        regL <- getRegionsFromTxDb(txdb)
        lengths(regL)
    }

[Package eisaR version 1.6.0 Index]