Description Usage Arguments Details Value Examples
Plot expression values for a set of features (e.g. genes or transcripts)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | plotExpression(object, ...)
plotExpressionSCESet(object, features, x = NULL, exprs_values = "exprs",
colour_by = NULL, shape_by = NULL, size_by = NULL, ncol = 2,
xlab = NULL, show_median = FALSE, show_violin = TRUE,
show_smooth = FALSE, alpha = 0.6, theme_size = 10,
log2_values = FALSE, size = NULL, scales = "fixed", se = TRUE,
jitter = "swarm")
plotExpressionDefault(object, aesth, ncol = 2, xlab = NULL, ylab = NULL,
show_median = FALSE, show_violin = TRUE, show_smooth = FALSE,
alpha = 0.6, size = NULL, scales = "fixed", one_facet = FALSE,
se = TRUE, jitter = "swarm")
## S4 method for signature 'SCESet'
plotExpression(object, ...)
## S4 method for signature 'data.frame'
plotExpression(object, ...)
|
object |
an SCESet object containing expression values and
experimental information. Must have been appropriately prepared. For the
|
... |
optional arguments (from those listed above) passed to
|
features |
a character vector of feature names or Boolean vector or numeric vector of indices indicating which features should have their expression values plotted |
x |
character string providing a column name of |
exprs_values |
character string indicating which values should be used
as the expression values for this plot. Valid arguments are |
colour_by |
optional character string supplying name of a column of
|
shape_by |
optional character string supplying name of a column of
|
size_by |
optional character string supplying name of a column of
|
ncol |
number of columns to be used for the panels of the plot |
xlab |
label for x-axis; if |
show_median |
logical, show the median for each group on the plot |
show_violin |
logical, show a violin plot for the distribution for each group on the plot |
show_smooth |
logical, show a smoothed fit through the expression values on the plot |
alpha |
numeric value between 0 (completely transparent) and 1 (completely solid) defining how transparent plotted points (cells) should be. Points are jittered horizontally if the x-axis value is categorical rather than numeric to avoid overplotting. |
theme_size |
numeric scalar giving default font size for plotting theme (default is 10) |
log2_values |
should the expression values be transformed to the log2-scale for plotting (with an offset of 1 to avoid logging zeroes)? |
size |
numeric scalar optionally providing size for points if
|
scales |
character scalar, should scales be fixed ("fixed"),
free ("free"), or free in one dimension ("free_x"; "free_y", the default).
Passed to the |
se |
logical, should standard errors be shown (default |
jitter |
character scalar to define whether points are to be jittered
( |
aesth |
an |
ylab |
character string defining a label for the y-axis (y-axes) of the plot. |
one_facet |
logical, should expression values for features be plotted in one facet
instead of mutiple facets, one per feature? Default if |
Plot expression values (default log2(transcripts-per-million + 1), if available) for a set of features.
a ggplot plot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## prepare data
data("sc_example_counts")
data("sc_example_cell_info")
pd <- new("AnnotatedDataFrame", data = sc_example_cell_info)
example_sceset <- newSCESet(countData = sc_example_counts, phenoData = pd)
example_sceset <- calculateQCMetrics(example_sceset)
## default plot
plotExpression(example_sceset, 1:15)
plotExpression(example_sceset, 1:15, jitter = "jitter")
## plot expression against an x-axis value
plotExpression(example_sceset, 1:6, "Mutation_Status")
## explore options
plotExpression(example_sceset, 1:6, x="Mutation_Status", exprs_values="exprs",
colour_by="Cell_Cycle", show_violin=TRUE, show_median=TRUE)
plotExpression(example_sceset, 1:6, x="Mutation_Status", exprs_values="counts",
colour_by="Cell_Cycle", show_violin=TRUE, show_median=TRUE)
## plot expression against expression values for Gene_0004
plotExpression(example_sceset, 1:4, "Gene_0004")
plotExpression(example_sceset, 1:4, "Gene_0004", show_smooth = TRUE)
plotExpression(example_sceset, 1:4, "Gene_0004", show_smooth = TRUE, se = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.