plotMetadata {scater} | R Documentation |
Plot metadata for cells or features
plotMetadata(object, aesth = aes_string(x = "log10(total_counts)", y = "total_features"), shape = NULL, alpha = NULL, size = NULL, theme_size = 10)
object |
a data.frame (or object that can be coerced to such) object containing metadata in columns to plot. |
aesth |
aesthetics function call to pass to ggplot. This function expects at least x and y variables to be supplied. The default is to plot total_features against log10(total_counts). |
shape |
numeric scalar to define the plotting shape. Ignored if shape is
included in the |
alpha |
numeric scalar (in the interval 0 to 1) to define the alpha
level (transparency) of plotted points. Ignored if alpha is included in the
|
size |
numeric scalar to define the plotting size. Ignored if size is
included in the |
theme_size |
numeric scalar giving default font size for plotting theme (default is 10) |
Plot cell or feature metadata from an SingleCellExperiment 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.
a ggplot plot object
data("sc_example_counts") data("sc_example_cell_info") example_sce <- SingleCellExperiment( assays = list(counts = sc_example_counts), colData = sc_example_cell_info) example_sce <- calculateQCMetrics(example_sce) plotMetadata(colData(example_sce))