View source: R/rnaseq_workflow_qc.R
plot_partitioned_mean_expression | R Documentation |
Create a histogram and boxplot with per sample mean expression levels partitioned by a categorical variable.
plot_partitioned_mean_expression( data, group_var, feature_ids = NULL, sample_ids = NULL, invert_rows = F, invert_cols = F, return_data = F, binsize = NULL, colors = NULL, hist_alpha = 0.75, box_fill = "gray50", box_alpha = 0.5, box_lwd = 1, jitter_alpha = 0.5, jitter_size = 1.75, x_title = "Mean expression", y_title = "Sample count" )
data |
A SummarizedExperiment-like object. Must be compatible with |
group_var |
A string for the categorical variable to use for partitioning. |
feature_ids |
A vector of row names for subsetting |
sample_ids |
A vector of column names for subsetting |
invert_rows |
A logical. Should |
invert_cols |
A logical. Should |
return_data |
A logical. Should plot data be returned instead of a ggplot object? |
binsize |
A numeric value for the histogram bin widths. |
colors |
A string vector. The histogram bar colors and jitter colors for each categorical variable value. |
hist_alpha |
A numeric value for the alpha level for histogram bars. |
box_fill |
A string. The fill color for the boxplot. |
box_alpha |
A numeric value for the alpha level for the boxplot. |
box_lwd |
A numeric value for the boxplot line width. |
jitter_alpha |
A numeric for the alpha level for jittered data points. |
jitter_size |
A numeric for the point size for jittered data points. |
x_title |
A string denoting the x-axis title. Only added to the boxplot. |
y_title |
A string denoting the y-axis title. Only added to the histogram. |
Calculates the mean across a user-specified set of expression features (e.g., genes) for each sample and plots this as a histogram and boxplot. The two plots are intended to be used as a single column, two row figure panel. Data points in the plots are partitioned by a categorical variable.
A list with two ggplot objects hist
and boxplot
corresponding to a histogram and
jittered boxplot respectively. If return_data
is TRUE
, then a data frame with the plot
data values and grouping variable.
hist_boxplot2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.