sccore (version 0.1.2)

embeddingGroupPlot: Plotting function for cluster labels, names contain cell names. Used primarily in embeddingPlot().

Description

Plotting function for cluster labels, names contain cell names. Used primarily in embeddingPlot().

Usage

embeddingGroupPlot(
  plot.df,
  groups,
  geom_point_w,
  min.cluster.size,
  mark.groups,
  font.size,
  legend.title,
  shuffle.colors,
  palette,
  plot.na,
  ...
)

Arguments

plot.df

data.frame for plotting. In embeddingPlot(), this is a tibble from tibble::rownames_to_column().

groups

vector of cluster labels, names contain cell names (default=NULL)

geom_point_w

function to work with geom_point layer from ggplot2 (default=ggplot2::geom_point)

min.cluster.size

labels for all groups with number of cells fewer than this parameter are considered as missed (default=0). This argument is ignored if groups aren't provided

mark.groups

plot cluster labels above points (default=TRUE)

font.size

font size for cluster labels (default=c(3, 7)). It can either be single number for constant font size or pair (min, max) for font size depending on cluster size

legend.title

legend title (default=NULL)

shuffle.colors

shuffle colors (default=FALSE)

palette

function, which accepts number of colors and return list of colors (i.e. see 'colorRampPalette') (default=NULL)

plot.na

boolean/numeric Whether to plot points, for which groups / colors are missed (default=is.null(subgroups), i.e. FALSE). If plot.na passed a numeric value below 0, the NA symbols are plotted below the cells. Otherwise if values >=0, they<U+2019>re plotted above the cells. Note that this argument is FALSE if 'subgroups' is NULL

...

Additional arguments passed to ggplot2::geom_label_repel()

Value

ggplot2 object