View source: R/getRegionsFromTxDb.R
getRegionsFromTxDb | R Documentation |
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.
getRegionsFromTxDb(txdb, exonExt = 10L, strandedData = TRUE)
txdb |
a |
exonExt |
|
strandedData |
|
The exonic regions are generated as follows:
extract exons by gene from the txdb
extend each exon by exonExt
combine overlapping exons within each gene
create gene body ranges from the most extreme exonic coordinates
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
a list
with elements "exons" and "genebodies", containing
named GenomicRanges
objects with ranges for exons and gene bodies,
respectively.
Michael Stadler
TxDb
for details on
TxDb
objects and the txdbmaker
package for how to create them,
e.g. from .gtf
files.
if (requireNamespace("AnnotationDbi", quietly = TRUE)) {
txdb <- AnnotationDbi::loadDb(system.file("extdata", "hg19sub.sqlite", package = "eisaR"))
regL <- getRegionsFromTxDb(txdb)
lengths(regL)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.