barPlot: Bar plot for average gene expression

View source: R/visualization.R

barPlotR Documentation

Bar plot for average gene expression

Description

Please check barplot_internalfor detailed description of the arguments.

Usage

barPlot(
  object,
  features,
  group.by = NULL,
  split.by = NULL,
  color.use = NULL,
  method = c("truncatedMean", "triMean", "median"),
  trim = 0.1,
  assay = "RNA",
  x.lab.rot = FALSE,
  ncol = 1,
  ...
)

Arguments

object

seurat object

features

Features to plot (gene expression, metrics)

group.by

Name of one or more metadata columns to group (color) cells by (for example, orig.ident); pass 'ident' to group by identity class

split.by

Name of a metadata column to split plot by;

color.use

defining the color for each condition/dataset

method

methods for computing the average gene expression per cell group. By default = "truncatedMean", where a value should be assigned to 'trim;

trim

the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed.

assay

Name of assay to use, defaults to the active assay

x.lab.rot

whether do rotation for the x.tick.label

ncol

number of columns to show in the plot

...

Extra parameters passed to barplot_internal

Value

ggplot2 object


sqjin/CellChat documentation built on Nov. 10, 2023, 4:29 a.m.