| plot_multi | R Documentation |
Visualize multiple PSI or cRPKM values in a single plot.
plot_multi(df, config = NULL, subg = FALSE, expr = FALSE,
trim_colnames = FALSE, qual = c("VLOW", "N", "LOW", "OK", "SOK"),
counts = FALSE, xlab = "", ylab = "", title = "",
cluster_rows = TRUE, cluster_cols = ifelse(is.null(config), TRUE,
FALSE), fill = NULL, usepkg = c("ggplot2", "gplots", "pheatmap"),
...)
df |
A data frame of input values (PSI or cRPKM). If the latter, need to
set |
config |
Optional configuration settings. Can be
a path to the |
subg |
Logical indicating whether samples should be subgrouped for plotting. |
expr |
Logical - |
trim_colnames |
String that must be searched for and trimmed at the end
of every sample column in x. Useful to trim the "-cRPKM" suffix from expression
tables. 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 |
counts |
Logical indicating whether the data frame contains read counts.
Set to |
xlab |
The x-axis label |
ylab |
The y-axis label |
title |
Title of the plot |
cluster_rows |
Logical to cluster rows using hierarchical clustering |
cluster_cols |
Logical to cluster columns using hierarchical clustering |
fill |
A vector of colours. e.g. from |
usepkg |
Default is |
... |
Additional parameters passed to |
By default, geom_tile is used to generate a heatmap
and a ggplot2 object is returned. Alternatively, other heatmap
packages are supported including: pheatmap
(use usepkgs = "pheatmap") and
heatmap.2 (use usepkgs = "gplots").
Input is similar to plot_event, plot_expr, or
plot_multievent. Subgrouping of samples is also supported (see
plot_event and preprocess_sample_colors for details
on subgrouping). If subgroups are activated, the PSI for each subgroup is taken
as the average of all the samples in the subgroup.
If cluster_rows = TRUE, then a hierarchical clustering using hclust
will be performed on a distance matrix computed by dist. If config
is not specified, then the samples will also be clustered.
To set the colours, use fill option to specify vector of colours.
By default (fill=NULL), PSI uses a yellow/blue gradient, while cRPKMs
uses the "YlOrRd" color brewer palette.
# Uses ggplot2 by default plot_multi(psi) plot_multi(psi, config = config) # Use expr = TRUE for cRPKMs plot_multi(crpkm, expr = TRUE) plot_multi(crpkm, config = config, expr = TRUE) plot_multi(crpkm, config = config, expr = TRUE, cluster_rows = TRUE) # To use pheatmap or gplots for plotting, set usepgk option plot_multi(psi, config = config, usepkg = "pheatmap") # To enable sample subgroups, set subg = TRUE plot_multi(psi, config = config, subg = TRUE) # Working with expression tables with read counts and suffixes, enabling subgroups plot_multi(crpkm_counts, config = config, expr = TRUE, trim_colnames = "-cRPKM", counts = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.