Skip to contents

internal helper to plot hex biMAP

Usage

hex_plot(
  umap_cells,
  umap_genes,
  color_by,
  colors,
  color_genes,
  hex_n,
  min_bin,
  show_density,
  cell_alpha,
  gene_size,
  gene_alpha,
  interact_genes,
  plotly
)

Arguments

umap_cells

biMAP coordinates data.frame subsetted to cells.

umap_genes

biMAP coordinates data.frame subsetted to genes.

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.

colors

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

color_genes

logical. If TRUE colors genes by color_by.

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?

cell_alpha

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

gene_size

integer. Size of the genes in the plot.

gene_alpha

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

interact_genes

character string with text and labels for genes in interactive plots.

plotly

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

Value

ggplot object