seurat_plot_connected_barplot: Plot connected barplot from seurat object

View source: R/plot_connected_barplot.R

seurat_plot_connected_barplotR Documentation

Plot connected barplot from seurat object

Description

Plot connected barplot from seurat object

Usage

seurat_plot_connected_barplot(
  object,
  group.by = "ident",
  split.by,
  wrap.by = NULL,
  normalize_to = NULL,
  cells = c(),
  combine = TRUE,
  wrap_add = 0.5,
  ...
)

Arguments

object

Seurat object

group.by

Meta data column containing population/cluster assignment (y-axis)

split.by

Meta data column containing group or sample assignment (x-axis)

wrap.by

Meta data column to split into multiple independent plots (i.e. patient or tissue information)

normalize_to

Data frame containing normalization factor (i.e. total cell count from sample) as first column, split.to (and wrap.by) in following columns. Important that colnames match split.to and wrap.by names

cells

Vector of rows or cell barcodes to be included in plot.

combine

Boolean of whether multiple plots (when wrap.by is set) should be combined into a single plot (using cowplot)

wrap_add

Integer of how much width should be allocated to y-axis text relative to the with of a bar (for combining plots)

Value

ggplot object or list of ggplot objects


Terkild/scutility documentation built on Jan. 16, 2025, 5:28 p.m.