Skip to contents

Function to plot the distribution of expression values across metadata categories Takes a categorical metadata variable (will be coerced to factor if not already), and a list of markers.

Usage

plotViolins(
  object,
  what,
  group.by,
  subset = NULL,
  data.slot = "NormalizedData",
  color.pal = tableau_color_pal("Classic Cyclic")(13),
  outline.color = NULL,
  aspect.ratio = NULL,
  plot.title = NULL
)

Arguments

object

A Region object

what

Which marker or metadata column to plot distributions for. Must correspond to a numeric vector in RegionData, bgData, or cellMetadata

group.by

Which metadata to group by. Should correspond to a categorical variable.

subset

If not null, attempts to subset the variables in group.by to those passed to this parameter.

data.slot

Which data slot to pull expression data from.

color.pal

Vector of colors to plot with (passed to scale_color_ helpers)

outline.color

Outline color for polygons and other fill geoms

aspect.ratio

ggplot param

plot.title

Plot title

Scroll to top