View source: R/plot_multievent.R
plot_multievent | R Documentation |
Generate a plot with PSI values for several exons. The PSI values and corresponding quality scores are typically obtained from the vast-tools pipeline.
plot_multievent(x, config = NULL, subg = FALSE, trim_colnames = NULL, qual = c("VLOW", "N", "LOW", "OK", "SOK"), errorbar = TRUE, col = NULL, event_col = NULL, title = "MULTI EVENT PLOT", xlab = "", ylab = "PSI", ylim = c(0, 100), cex.main = 14, cex.yaxis = 12, cex.xaxis = 12, pch = 20, cex.pch = 3, plot = NULL, gridlines = TRUE, lwd = 0.5, show_event_legend = T, show_group_legend = T)
x |
A data frame containing PSI values to be plotted. |
config |
Optional configuration settings for |
subg |
Logical indicating whether samples should be subgrouped for plotting. |
trim_colnames |
String that must be searched for and trimmed at the end
of every sample column in x. If no string must be trimmed, leave as |
qual |
String indicating the minimun vast-tools quality score
for the PSI to be accepted. Defaults to |
errorbar |
Logical indicating whether error bars should be drawn |
col |
Vector of colors with length matching the number of samples. If
specified, this will override the color settings specified in |
event_col |
Vector of colors, with length matching the number of events
(rows of |
title |
Title of the plot. |
xlab |
The x-axis label. |
ylab |
The y-axis label. |
ylim |
Range of y-axis. |
cex.main |
Plot title size (pts). |
cex.yaxis |
Y-axis font size (pts). |
cex.xaxis |
X-axis font size (i.e. the sample names) (pts). |
pch |
Point symbol. |
cex.pch |
Size of datapoints. |
plot |
(deprecated) Prints the plot. |
gridlines |
Logical indicating whether grid lines should be drawn. |
lwd |
Line width for errorbars and the line connecting PSIs from each event. |
show_event_legend |
Set to FALSE to avoid showing a legend with the event IDs and their colors. |
show_group_legend |
Set to FALSE to avoid showing a legend with the sample groups and their colors. |
Like in plot_event
and plot_expr
, plots can be
customized via the config
option. Either a data frame or
the filepath to the config file can be used. Alternatively, plots can be
customized using a limited set of graphical parameters as described above.
See Details of plot_event
and
preprocess_sample_colors
for more information on the usage of
the config
, subg
, and errorbar
arguments.
Unlike in plot_event
and plot_expr
,
sample colors in config
or col
are now shown only in the
background, as the point colors are now used to differentiate PSI values from
different events. In addition, a line connects the points from each event, to
increase visibility. The color of each event can be set using the
event_col
argument.
Also, note that using subg=TRUE
and errorbar=TRUE
together is
an experimental feature, computationally expensive, and CIs may not be shown
for some subgroups, especially for events with low coverage and PSI values near
0 or 1 (see get_beta_ci_subg
for details on error bar estimation
for subgrouped samples).
ggplot2 object
format_table
for performing some initial conversion steps of
x
.
preprocess_sample_colors
for pre-processing of x
usingconfig
.
plot_event
for plotting single events.
plot_multievent(psi, config = config) # Example with subgrouped samples, custom title and no error bars plot_multievent(psi, config = config, subg = TRUE, errorbar = FALSE, title = "Highlighted events") # Legends can be hidden separately plot_multievent(psi, config = config, show_event_legend = FALSE) plot_multievent(psi, config = config, show_group_legend = FALSE) # Custom event colors plot_multievent(psi[1:3,], config = config, event_col=c("red","black","orange")) # Use of errobar = TRUE and subg = TRUE is experimental and computationally expensive ## Not run: plot_multievent(psi, config = config, subg = TRUE, errorbar = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.