StressBarplotPerCluster: Stress Barplot Per Cluster

View source: R/gruffi.R View source: R/gruffi.R

StressBarplotPerClusterR Documentation

Stress Barplot Per Cluster

Description

This function generates a bar plot for cell fractions, filled by stress status across clusters. It utilizes the first clustering run for grouping and applies a custom color scale.

This function generates a bar plot for cell fractions, filled by stress status across clusters. It utilizes the first clustering run for grouping and applies a custom color scale.

Usage

StressBarplotPerCluster(
  obj = combined.obj,
  fill.by = "is.Stressed",
  group.by = GetClusteringRuns()[1],
  color_scale = rev((scales::hue_pal())(2)),
  custom_col_palette = TRUE,
  ...
)

StressBarplotPerCluster(
  obj = combined.obj,
  fill.by = "is.Stressed",
  group.by = GetClusteringRuns()[1],
  color_scale = rev((scales::hue_pal())(2)),
  custom_col_palette = TRUE,
  ...
)

Arguments

fill.by

A character string indicating the column to use for fill. Default is 'is.Stressed'.

group.by

A character string or a vector indicating the column(s) to use for grouping. If NULL, uses the first clustering run.

color_scale

A color scale to use for the plot. Defaults to the reverse of the hue palette.

custom_col_palette

A logical value indicating whether to use a custom color palette. Default is TRUE.

Value

A bar plot visualizing the cell fractions per cluster, filled by the specified fill criteria.

A bar plot visualizing the cell fractions per cluster, filled by the specified fill criteria.


jn-goe/gruffi documentation built on Nov. 7, 2024, 10:38 p.m.