plot_mean_variance: Produce a mean expression x coefficient of variation scatter...

Description Usage Arguments Value See Also Examples

View source: R/plotting.R

Description

Use the output of calculate_cvs or bin_scdata and plot a feature mean expression x coefficient of variation scatter plot. Mean expression is represented as log10(mean + 1). Each dot represents a feature. Means and coefficient of variations were obtained across single cells. Optionally, colours each dot according to the defined bins of features. Optionally, adds a density2d geom.

Usage

1
2
plot_mean_variance(df, density = TRUE, colourByBin = TRUE,
  density_color = "blue", ...)

Arguments

df

A tibble, usually the output of calculate_cvs or bin_scdata.

density

A boolean. Should a density2d geom be added to the plot?

colourByBin

A boolean. Should feature be coloured by bin? Need a bin column in df (i.e. the output of bin_scdata).

density_color

Colour of the density2d curves.

...

Further arguments are passed to geom_point such as size.

Value

A ggplot2 plot.

See Also

calculate_cvs, bin_scdata

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(magrittr)
scData_hESC %>%
   calculate_cvs %>%
   plot_mean_variance(colourByBin = FALSE)

scData_hESC %>%
   calculate_cvs %>%
   define_top_genes(window_size = 100) %>%
   bin_scdata(window_size = 1000) %>%
   plot_mean_variance

scFeatureFilter documentation built on Nov. 8, 2020, 7:49 p.m.