plot: Plot an overview of expression for each cell

Description Usage Arguments Details Value Examples

Description

Plot the relative proportion of the library accounted for by the most highly expressed features for each cell for an SCESet dataset.

Usage

1
2
3
4
5
6
## S4 method for signature 'SCESet,ANY'
plot(x, y, ...)

plotSCESet(x, block1 = NULL, block2 = NULL, colour_by = NULL,
  nfeatures = 500, exprs_values = NULL, ncol = 3, linewidth = 1.5,
  theme_size = 10)

Arguments

x

an SCESet object

y

optional argument for generic plot functions, not used for plotting an SCESet object

...

arguments passed to plotSCESet

block1

character string defining the column of pData(object) to be used as a factor by which to separate the cells into blocks (separate panels) in the plot. Default is NULL, in which case there is no blocking.

block2

character string defining the column of pData(object) to be used as a factor by which to separate the cells into blocks (separate panels) in the plot. Default is NULL, in which case there is no blocking.

colour_by

character string defining the column of pData(object) to be used as a factor by which to colour the points in the plot. Alternatively, a data frame with one column containing a value for each cell, which will be mapped to a corresponding colour.

nfeatures

numeric scalar indicating the number of features to include in the plot.

exprs_values

character string indicating which values should be used as the expression values for this plot. Valid arguments are "tpm" (transcripts per million), "counts" (raw counts), "cpm" (counts per million), "fpkm" (FPKM values), or "exprs" (default; which are assumed to be on the log2 scale and are un-logged prior to plotting). If not specified, the function will search for values in the order given above.

ncol

number of columns to use for facet_wrap if only one block is defined.

linewidth

numeric scalar giving the "size" parameter (in ggplot2 parlance) for the lines plotted. Default is 1.5.

theme_size

numeric scalar giving font size to use for the plotting theme

Details

Plots produced by this function are intended to provide an overview of large-scale differences between cells. For each cell, the features are ordered from most-expressed to least-expressed and 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 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.

Value

a ggplot plot object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Set up an example SCESet
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)

plot(example_sceset, exprs_values = "exprs")
plot(example_sceset, exprs_values = "exprs", colour_by = "Cell_Cycle")
plot(example_sceset, exprs_values = "exprs", block1 = "Treatment",
colour_by = "Cell_Cycle")
plot(example_sceset, exprs_values = "exprs", block1 = "Treatment",
block2 = "Mutation_Status", colour_by = "Cell_Cycle")
# What happens if chosen expression values are not available?
plot(example_sceset, block1 = "Treatment", colour_by = "Cell_Cycle")

dynverse/scaterlegacy documentation built on Feb. 17, 2020, 5:07 a.m.