plotExprsFreqVsMean {scater}R Documentation

Plot frequency against mean for each feature

Description

Plot the frequency of expression (i.e., percentage of expressing cells) against the mean expression level for each feature in a SingleCellExperiment object. This is deprecated in favour of directly using plotRowData.

Usage

plotExprsFreqVsMean(object, freq_exprs, mean_exprs, controls,
  exprs_values = "counts", by_show_single = FALSE,
  show_smooth = TRUE, show_se = TRUE, ...)

Arguments

object

A SingleCellExperiment object.

freq_exprs

String specifying the column-level metadata field containing the number of expressing cells per feature. Alternatively, an AsIs vector or data.frame, see ?retrieveFeatureInfo.

mean_exprs

String specifying the column-level metadata fielcontaining the mean expression of each feature. Alternatively, an AsIs vector or data.frame, see ?retrieveFeatureInfo.

controls

Deprecated and ignored.

exprs_values

String specifying the assay used for the default freq_exprs and mean_exprs. This can be set to, e.g., "logcounts" so that freq_exprs defaults to "n_cells_by_logcounts".

by_show_single

Deprecated and ignored.

show_smooth

Logical scalar, should a smoothed fit be shown on the plot? See geom_smooth for details.

show_se

Logical scalar, should the standard error be shown for a smoothed fit?

...

Further arguments passed to plotRowData.

Details

This function plots gene expression frequency versus mean expression level, which can be useful to assess the effects of technical dropout in the dataset. We fit a non-linear least squares curve for the relationship between expression frequency and mean expression. We use this curve to define the number of genes above high technical dropout and the numbers of genes that are expressed in at least 50% and at least 25% of cells.

Value

A ggplot object.

See Also

plotRowData

Examples

example_sce <- mockSCE()
example_sce <- logNormCounts(example_sce)

example_sce <- calculateQCMetrics(example_sce, 
    feature_controls = list(set1 = 1:500))
plotExprsFreqVsMean(example_sce)

plotExprsFreqVsMean(example_sce, size_by = "is_feature_control")


[Package scater version 1.14.0 Index]