Plot feature (gene) data from an SCESet object

Share:

Description

Plot feature (gene) data from an SCESet object

Usage

1
2
plotFeatureData(object, aesth = aes_string(x = "n_cells_exprs", y =
  "prop_total_counts"), theme_size = 10, ...)

Arguments

object

an SCESet object containing expression values and experimental information. Must have been appropriately prepared.

aesth

aesthetics function call to pass to ggplot. This function expects at least x and y variables to be supplied. The default is to produce a density plot of number of cells expressing the feature (requires calculateQCMetrics to have been run on the SCESet object prior).

theme_size

numeric scalar giving default font size for plotting theme (default is 10).

...

arguments passed to plotMetadata.

Details

Plot feature (gene) data from an SCESet object. If one variable is supplied then a density plot will be returned. If both variables are continuous (numeric) then a scatter plot will be returned. If one variable is discrete and one continuous then a violin plot with jittered points overlaid will be returned. If both variables are discrete then a jitter plot will be produced. The object returned is a ggplot object, so further layers and plotting options (titles, facets, themes etc) can be added.

Value

a ggplot plot object

Examples

1
2
3
4
5
6
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)
plotFeatureData(example_sceset, aesth=aes(x=n_cells_exprs, y=pct_total_counts))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.