plot_expr | R Documentation |
Generate a plot of cRPKM values for a given gene. The cRPKM values are obtained from the vast-tools pipeline.
plot_expr(x, config = NULL, subg = FALSE, subg.show = c("mean", "all", "beeswarm"), trim_colnames = NULL, counts = FALSE, groupmean = ifelse(is.null(config), FALSE, TRUE), col = NULL, title = NULL, xlab = "", ylab = "Expression (cRPKM)", ylim = NULL, cex.main = 14, cex.yaxis = 12, cex.xaxis = 12, pch = 20, cex.pch = 3, plot = NULL, gridlines = TRUE, show_group_legend = TRUE)
x |
A 1-row data frame containing cRPKM values to be plotted |
config |
Optional configuration settings for |
subg |
Logical indicating whether samples should be subgrouped for plotting.
If |
subg.show |
Only applies when |
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 |
counts |
Logical indicating whether the data frame contains read counts.
Set to |
groupmean |
Logical indicating whether grouped means should be drawn.
Requires |
col |
Vector of colors with length matching the number of samples. If
specified, this will override the color settings specified in |
title |
Title of the plot. If |
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. |
show_group_legend |
Set to FALSE to avoid showing a legend with the sample groups and their colors. |
Like plot_event
and plot_multievent
, 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 customizing plots. Note that the errorbar
argument is not available for cRPKMs.
cRPKM values that have NA value are omitted and not plotted.
ggplot2 object.
format_table
for performing some initial conversion steps of x
preprocess_sample_colors
for pre-processing of x
using
config
## Not run: plot_expr(crpkm[1,]) # Plot with custom configuration config plot_expr(crpkm[1,], config = config, groupmean=TRUE) plot_expr(crpkm[1,], config = "/path/to/config") # Plot using custom configuration, changing point symbol, and y-axis # scale plot_expr(crpkm[1,], config = config, pch = 9, ylim = c(20, 80)) ## End(Not run) # Plot with subgrouped samples plot_expr(crpkm[1,], config=config, subg=TRUE) # Plot directly from a table with suffixes and read counts crpkm_counts plot_expr(crpkm_counts[1,], config = config, trim_colnames = "-cRPKM", counts = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.