Learn R Programming

SGSeq (version 1.2.2)

plotSpliceGraph: Plot splice graph

Description

Plot splice graph implied by splice junctions and exon bins.

Usage

plotSpliceGraph(x, geneID = NULL, geneName = NULL, eventID = NULL, which = NULL, toscale = c("exon", "none", "gene"), label = c("id", "name", "label", "none"), color = "gray", color_novel = color, color_alpha = 0.8, color_labels = FALSE, border = "fill", cexLab = 1, cexExon = 1, ypos = 0.5, score = NULL, score_color = "darkblue", score_ylim = NULL, score_ypos = c(0.3, 0.1), score_nbin = 400, score_summary = mean, ranges = NULL, ranges_color = "darkblue", ranges_ypos = c(0.1, 0.1), main = NULL, cexMain = 1, tx_view = FALSE, tx_dist = 0.2, tx_cex = 1, asp = 1)

Arguments

x
SGFeatures or SGVariants object
geneID
Single gene identifier used to subset x
geneName
Single gene name used to subset x
eventID
Single event identifier used to subset x
which
GRanges used to subset x
toscale
Controls which parts of the splice graph are drawn to scale. Possible values are “none” (exonic and intronic regions have constant length), “exon” (exonic regions are drawn to scale) and “gene” (both exonic and intronic regions are drawn to scale).
label
Format of exon/splice junction labels, possible values are “id” (format E1,... J1,...), “name” (format type:chromosome:start-end:strand), “label” for labels specified in elementMetadata column “label”, or “none” for no labels.
color
Color used for plotting the splice graph. Ignored if features elementMetadata column “color” is not NULL.
color_novel
Features with missing annotation are highlighted in color_novel. Ignored if features elementMetadata column “color” is not NULL.
color_alpha
Controls color transparency
color_labels
Logical indicating whether label colors should be the same as feature colors
border
Determines the color of exon borders, can be “fill” (same as exon color), “none” (no border) or a valid color name
cexLab
Scale factor for feature labels
cexExon
Scale factor for exon height
ypos
Numeric value indicating vertical position of splice graph (exon bins) specified as fraction of height of the plotting region (not supported for tx_view = TRUE)
score
RLeList containing nucleotide-level scores to be plotted with the splice graph
score_color
Color used for plotting scores
score_ylim
y-axis range used for plotting scores
score_ypos
Numeric vector of length two, indicating the vertical position and height of the score panel, specificed as fraction of the height of the plotting region
score_nbin
Number of bins for plotting scores
score_summary
Function used to calculate per-bin score summaries
ranges
GRangesList to be plotted with the splice graph
ranges_color
Color used for plotting ranges
ranges_ypos
Numeric vector of length two, indicating the vertical position and height of the ranges panel, specificed as fraction of the height of the plotting region
main
Plot title
cexMain
Scale factor for plot title
tx_view
Plot transcripts instead of splice graph (experimental)
tx_dist
Vertical distance between transcripts as fraction of height of plotting region
tx_cex
Scale factor for transcript labels
asp
Aspect ratio of graphics region

Value

data.frame with information on exon bins and splice junctions included in the splice graph

Details

By default, the color of features in the splice graph is determined by annotation status (see arguments color, color_novel) and feature labels are generated automatically (see argument label). Alternatively, colors and labels can be specified via elementMetadata columns “color” and “label”, respectively.

A data.frame with information on plotted features, including genomic coordinates, is returned invisibly.

Examples

Run this code
## Not run: 
# sgf_annotated <- annotate(sgf, txf)
# plotSpliceGraph(sgf_annotated)
# ## End(Not run)
## Not run: 
# sgv_annotated <- annotate(sgv, txf)
# plotSpliceGraph(sgv_annotated)
# ## End(Not run)

Run the code above in your browser using DataLab