Takes the original input matrix, a design matrix, and one gene symbols (row name of the original matrix) to plot its values in the conditions specified, using a dotplot, +/- a summary bar. Will remove NAs prior to plotting.
plotVals(inputMat, design, compare, gene, log = FALSE, ylab = NULL,
xlab = NULL, add_summary_bar = TRUE, summary_bar = "mean",
summary_width = 0.75, dotplot_width = 0.5, dotplot_size = NULL,
dotplot_binwidth = NULL)
A ggplot2 object that can be plotted, further modified, and/or saved.
The matrix (or data.frame) of values (e.g., gene expression values from an RNA-seq or microarray study) that you are interested in analyzing. The rownames of this matrix should correspond to the identifiers whose values you are interested in analyzing, while the columns should correspond to the rows of the design matrix and should be separable into your groups.
A standard model.matrix created design matrix. Rows correspond to samples and colnames refer to the names of the conditions that you are interested in analyzing. Only 0's or 1's are allowed in the design matrix. Please see vignettes for more information.
Vector of two character strings, each corresponding to one group name in the design matrix, that should be compared.
The gene symbol (row identifier).
Logical, indicating whether the data should be log2-transformed prior to plotting (after adding a small constant of 0.5 to avoid problems with the log transform and stabilize the variance with respect to the mean).
Override the y-axis label to one of your choice.
Override the x-axis label to one of your choice.
Logical indicating whether to include a summary bar for each group.
If summary bar included, type of bar to use to calculate. Options = "mean", "median"
Horizontal width of summary crossbar included.
The width of the dots in the dotplot. See ?geom_dotplot for more information.
The diameter of the dots in the dotplot. Affects the chart relative to the dotplot binwidth. If NULL, will be calculated automatically.
The binwidth size for the dots in the dotplot. If NULL, will be calculated automatically.