Learn R Programming

scater (version 1.0.4)

plotExprsFreqVsMean: Plot frequency of expression against mean expression level

Description

Plot frequency of expression against mean expression level

Usage

plotExprsFreqVsMean(object, feature_set = NULL, feature_controls = NULL, shape = 1, alpha = 0.7, ...)

Arguments

object
an SCESet object.
feature_set
character, numeric or logical vector indicating a set of features to plot. If character, entries must all be in featureNames(object). If numeric, values are taken to be indices for features. If logical, vector is used to index features and should have length equal to nrow(object). If NULL, then the function checks if feature controls are defined. If so, then only feature controls are plotted, if not, then all features are plotted.
feature_controls
character, numeric or logical vector indicating a set of features to be used as feature controls for computing technical dropout effects. If character, entries must all be in featureNames(object). If numeric, values are taken to be indices for features. If logical, vector is used to index features and should have length equal to nrow(object). If NULL, then the function checks if feature controls are defined. If so, then these feature controls are used.
shape
(optional) numeric scalar to define the plotting shape.
alpha
(optional) numeric scalar (in the interval 0 to 1) to define the alpha level (transparency) of plotted points.
...
further arguments passed to plotMetadata (should only be size, if anythin).

Value

a ggplot plot object

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 and use this to define the number of genes above high technical dropout and the numbers of genes that are expressed in at least 50 of genes to be treated as feature controls can be specified, otherwise any feature controls previously defined are used.

Examples

Run this code
data("sc_example_counts")
data("sc_example_cell_info")
pd <- new("AnnotatedDataFrame", data=sc_example_cell_info)
rownames(pd) <- pd$Cell
ex_sceset <- newSCESet(countData=sc_example_counts, phenoData=pd)
ex_sceset <- calculateQCMetrics(ex_sceset)
plotExprsFreqVsMean(ex_sceset)

Run the code above in your browser using DataLab