Learn R Programming

ggbio (version 1.20.1)

plotSpliceSum: Plot Splice Summary from RNA-seq data

Description

Plot splice summary by simply counting overlaped junction read in weighted way or not.

Usage

## For character,GRangesList
## S3 method for class 'character,GRangesList':
plotSpliceSum(data, model, ..., weighted = TRUE)
## For character,TxDb
## S3 method for class 'character,TxDb':
plotSpliceSum(data, model, which,
      ..., weighted = TRUE)
## For character,EnsDb
## S3 method for class 'character,EnsDb':
plotSpliceSum(data, model, which,
      ..., weighted = TRUE)

Arguments

data
A character specifying the bam file path of RNA-seq data.
model
A GRangesList which represting different isoforms, a TxDb or an EnsDb object. For the latter cases, users need to pass "which" argument which, for TxDb, is a GRanges object to specify the region and for EnsDb can be a GRanges object, a filter extending the BasicFilter-class class or a list thereof. And we get connonical model internally.
which
A GRanges object specifying the region you want to get model from the TxDb object. For EnsDb: s GRanges object or a single or list of filter object(s) extending BasicFilter-class.
weighted
If TRUE, weighted by simply add 1/cases matched to each model and if FALSE, simply add 1 to every case.
...
Extra arugments passed to qplot function. such as, offset which control the height of chevron.

Value

  • A ggplot object.

Details

Internally we use biovizBase:::spliceSummary for simple counting, but we encourage users to use their own robust way to make slicing summary and store it as GRangesList, then plot the summary by qplot function.

See Also

qplot

Examples

Run this code
bamfile <- system.file("extdata", "SRR027894subRBM17.bam", package="biovizBase")
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
data(genesymbol)
exons <- exonsBy(txdb, by = "tx")
exons.rbm17 <- subsetByOverlaps(exons, genesymbol["RBM17"])
plotSpliceSum(bamfile, exons.rbm17)
plotSpliceSum(bamfile, exons.rbm17, weighted = FALSE, offset = 0.01)
plotSpliceSum(bamfile, txdb, which = genesymbol["RBM17"])
plotSpliceSum(bamfile, txdb, which = genesymbol["RBM17"], offset = 0.01)
plotSpliceSum(bamfile, txdb, which = genesymbol["RBM17"],
              show.label = TRUE,
              label.type = "count")

Run the code above in your browser using DataLab