Skip to contents

Bar plot of deconvoluted cell type proportions.

Usage

barPlotCellTypes(
  data,
  colors = NULL,
  set = NULL,
  prediction = "Regularized",
  color.line = NA,
  x.label = "Spots",
  rm.x.text = FALSE,
  title = "Results of deconvolution",
  legend.title = "Cell types",
  angle = 90,
  theme = NULL,
  index.st = NULL
)

Arguments

data

SpatialDDLS object with the deconv.spots slot containing predicted cell type proportions.

colors

Vector of colors to be used.

set

Type of simplification performed during deconvolution. It can be simpli.set or simpli.maj (NULL by default).

prediction

Set of predicted cell proportions to be plotted. It can be "Regularized", "Intrinsic" or "Extrinsic".

color.line

Color of the border bars.

x.label

Label of x-axis.

rm.x.text

Logical value indicating whether to remove x-axis ticks (name of samples).

title

Title of the plot.

legend.title

Title of the legend plot.

angle

Angle of text ticks.

theme

ggplot2 theme.

index.st

Name or index of the element wanted to be shown in the deconv.spots slot.

Value

A ggplot object with the provided cell proportions represented as a bar plot.