Skip to contents

This function plots the different variants of biMAP

Usage

biMAP_plotter(
  caclust,
  color_by = "cluster",
  meta_df = NULL,
  type = "scatter",
  cell_size = 1,
  gene_size = 3,
  cell_alpha = 0.5,
  gene_alpha = 1,
  hex_n = 40,
  min_bin = 2,
  show_density = FALSE,
  contour_n = 5,
  color_genes = TRUE,
  label_groups = TRUE,
  group_label_size = 4,
  label_marker_genes = FALSE,
  colors = NULL,
  plotly = FALSE,
  max.overlaps = 12
)

Arguments

caclust

caclust object with biMAP stored.

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.

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`.

type

Determines the kind of plot outputted. Either "scatter" (scatter plot), "contour" (density contour plot) or "hex" (binned hexagonals).

cell_size

integer. Size of the cells in the plot.

gene_size

integer. Size of the genes in the plot.

cell_alpha

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

gene_alpha

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

hex_n

integer. Number of hexagonal bins that partition the x-axis.

min_bin

integer. Only bins with more than `min_bin` cells are plotted.

show_density

logical. Should the alpha value for plot type "hex" be adjusted by the number of cells in the bin?

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.

colors

Vector of hexadecimal color codes of the same length as the categories defined by color_by or longer. If NULL ignored.

plotly

If TRUE a hex plot with labels per hexbin will be made.

max.overlaps

Exclude text labels that overlap too many things.

Value

biMAP plot as ggplot object.