plotRowData {scater} | R Documentation |
Plot row-level (i.e., gene) metadata from a SingleCellExperiment object.
plotRowData(object, y, x = NULL, colour_by = NULL, shape_by = NULL, size_by = NULL, by_exprs_values = "logcounts", by_show_single = FALSE, ...)
object |
A SingleCellExperiment object containing expression values and experimental information. |
y |
Specification of the row-level metadata to show on the y-axis, see |
x |
Specification of the row-level metadata to show on the x-axis, see |
colour_by |
Specification of a row metadata field or a cell to colour by, see |
shape_by |
Specification of a row metadata field or a cell to shape by, see |
size_by |
Specification of a row metadata field or a cell to size by, see |
by_exprs_values |
A string or integer scalar specifying which assay to obtain expression values from,
for use in point aesthetics - see |
by_show_single |
Logical scalar specifying whether single-level factors should be used for point aesthetics, see |
... |
Additional arguments for visualization, see |
If y
is continuous and x=NULL
, a violin plot is generated.
If x
is categorical, a grouped violin plot will be generated, with one violin for each level of x
.
If x
is continuous, a scatter plot will be generated.
If y
is categorical and x
is continuous, horizontal violin plots will be generated.
If x
is missing or categorical, rectangule plots will be generated where the area of a rectangle is proportional to the number of points for a combination of factors.
Note that plotFeatureData
is a synonym for plotRowData
.
This is an artifact of the transition from the old SCESet class, and will be deprecated in future releases.
A ggplot 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, feature_controls = list(ERCC=1:40)) example_sce <- normalize(example_sce) plotRowData(example_sce, y="n_cells_by_counts", x="log10_total_counts") plotRowData(example_sce, y="n_cells_by_counts", size_by ="log10_total_counts", colour_by = "is_feature_control")