Visualize the number of features (i.e. genes) detected.

plotFeaturesDetected

# S4 method for SummarizedExperiment
plotFeaturesDetected(object, assay = 1L,
  interestingGroups = NULL, limit = 0L, minCounts = 1L,
  fill = getOption(x = "acid.fill.discrete", default =
  acidplots::scale_fill_synesthesia_d()), flip = getOption(x =
  "acid.flip", default = TRUE), title = "Features detected",
  countsAxisLabel = "features")

# S4 method for SingleCellExperiment
plotFeaturesDetected(object, assay = 1L,
  interestingGroups = NULL, limit = 0L, minCounts = 1L,
  fill = getOption(x = "acid.fill.discrete", default =
  acidplots::scale_fill_synesthesia_d()), flip = getOption(x =
  "acid.flip", default = TRUE), title = "Features detected",
  countsAxisLabel = "features")

Arguments

object

Object.

assay

vector(1). Name or index of count matrix slotted in assays(). When passing in a string, the name must be defined in assayNames().

interestingGroups

character. Groups of interest that define the samples. If left unset, defaults to sampleName.

limit

numeric(1). Threshold to denote on the plot, using a dashed line.

minCounts

integer(1). Minimum number of counts per gene in the count matrix.

fill

ggproto/ScaleDiscrete. Desired ggplot2 fill scale. Must supply discrete values. When set to NULL, the default ggplot2 color palette will be used. If manual color definitions are desired, we recommend using ggplot2::scale_fill_manual().

To set the discrete fill palette globally, use:

options(acid.fill.discrete = ggplot2::scale_fill_viridis_d())
flip

logical(1). Flip x and y axes. Recommended for plots containing many samples.

title

character(1). Plot title.

countsAxisLabel

character(1). Counts axis label.

...

Additional arguments.

Value

ggplot.

Examples

data(rse, sce, package = "acidtest") plotFeaturesDetected(rse)
plotFeaturesDetected(sce)
#> Aggregating counts using sum().