Skip to contents

Cell density is plotted as contour lines and genes are plotted as points over the contours.

Usage

plot_contour_biMAP(
  obj,
  meta_df = NULL,
  color_by = "cluster",
  gene_size = 2,
  gene_alpha = 0.8,
  contour_n = 5,
  color_genes = TRUE,
  label_groups = TRUE,
  group_label_size = 4,
  label_marker_genes = FALSE,
  interactive = FALSE,
  ...
)

# S4 method for caclust
plot_contour_biMAP(
  obj,
  meta_df = NULL,
  color_by = "cluster",
  gene_size = 2,
  gene_alpha = 0.8,
  contour_n = 5,
  color_genes = TRUE,
  label_groups = TRUE,
  group_label_size = 4,
  label_marker_genes = FALSE,
  interactive = FALSE,
  ...
)

# S4 method for SingleCellExperiment
plot_contour_biMAP(
  obj,
  meta_df = NULL,
  color_by = "cluster",
  gene_size = 2,
  gene_alpha = 0.8,
  contour_n = 5,
  color_genes = TRUE,
  label_groups = TRUE,
  group_label_size = 4,
  label_marker_genes = FALSE,
  interactive = FALSE,
  ...,
  caclust_meta_name = "caclust",
  subset = FALSE
)

Arguments

obj

Object that stores biMAP coordinates. Can be either a "caclust" object or of class "SingleCellExperiment".

meta_df

optional. data.frame that should have either gene or cell names (or both) as rownames or a column named `name` and a column with the same name as `color_by`.

color_by

Either "type" or "cluster". "type" colors by the type (cell or gene) while "cluster" colors by the assigned cluster. If meta_df is provided a column from the data.frame can be specified.

gene_size

integer. Size of the genes in the plot.

gene_alpha

numeric. Alpha value of genes (between 0 and 1).

contour_n

integer. Number of contour lines to plot.

color_genes

logical. If TRUE colors genes by color_by.

label_groups

logical. If TRUE puts the group label on the median coordinates of the point.

group_label_size

integer. Size of the group label.

label_marker_genes

logical or character vector. If TRUE, names of detected marker genes are displayed. If is character vector, the given marker genes are labeled.

interactive

If TRUE plot_scatter_biMAP returns an interactive (html) plot. If FALSE a ggplot object is returned.

...

Further arguments.

caclust_meta_name

Name under which the caclust object is stored in the metadata of the SingleCellExperiment object.

subset

Whether the biMAP embedding should be subset to the cells/genes in the SCE object. This might lead to unintended results. If unsure, we recommend to rerun CA and caclust instead.

Value

contour biMAP plot as ggplot object.

See also

Other plot_*_biMAP: plot_hex_biMAP(), plot_scatter_biMAP()