plotScater | R Documentation |
Plot the relative proportion of the library size that is accounted for by the most highly expressed features for each cell in a SingleCellExperiment object.
plotScater(
x,
nfeatures = 500,
exprs_values = "counts",
colour_by = color_by,
by_exprs_values = exprs_values,
block1 = NULL,
block2 = NULL,
ncol = 3,
line_width = 1.5,
theme_size = 10,
color_by = NULL,
assay.type = exprs_values,
by.assay.type = by_exprs_values
)
x |
A SingleCellExperiment object. |
nfeatures |
Numeric scalar indicating the number of top-expressed features to show n the plot. |
exprs_values |
Alias to |
colour_by |
Specification of a column metadata field or a feature to colour by, see the |
by_exprs_values |
Alias to |
block1 |
String specifying the column-level metadata field by which to separate the cells into separate panels in the plot.
Alternatively, an AsIs vector or data.frame, see |
block2 |
Same as |
ncol |
Number of columns to use for |
line_width |
Numeric scalar specifying the line width. |
theme_size |
Numeric scalar specifying the font size to use for the plotting theme. |
color_by |
Alias to |
assay.type |
String or integer scalar indicating which assay of |
by.assay.type |
A string or integer scalar specifying which assay to obtain expression values from,
for use in point aesthetics - see the |
For each cell, the features are ordered from most-expressed to least-expressed.
The cumulative proportion of the total expression for the cell is computed across the top nfeatures
features.
These plots can flag cells with a very high proportion of the library coming from a small number of features; such cells are likely to be problematic for downstream analyses.
Using the colour and blocking arguments can flag overall differences in cells under different experimental conditions or affected by different batch and other variables.
If only one of block1
and block2
are specified, each panel corresponds to a separate level of the specified blocking factor.
If both are specified, each panel corresponds to a combination of levels.
A ggplot object.
Davis McCarthy, with modifications by Aaron Lun
example_sce <- mockSCE()
plotScater(example_sce)
plotScater(example_sce, assay.type = "counts", colour_by = "Cell_Cycle")
plotScater(example_sce, block1 = "Treatment", colour_by = "Cell_Cycle")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.