scBarplot.FractionAboveThr: Barplot the Fraction of Cells Above Threshold per Cluster

View source: R/Seurat.Utils.Visualization.R

scBarplot.FractionAboveThrR Documentation

Barplot the Fraction of Cells Above Threshold per Cluster

Description

Generates a bar plot depicting the percentage of cells within each cluster that exceed a specified threshold, based on a selected metadata column.

Usage

scBarplot.FractionAboveThr(
  value.col = "percent.ribo",
  thrX = 0.1,
  obj = combined.obj,
  id.col = GetClusteringRuns(obj)[1],
  subtitle = id.col,
  ext = ".png",
  return.df = FALSE,
  label = NULL,
  suffix = NULL,
  above = TRUE,
  ylim = c(0, 100),
  ...
)

Arguments

value.col

Column in metadata with values to assess against thrX. Default: 'percent.ribo'.

thrX

Threshold for calculating the fraction of cells. Default: 0.3.

obj

Seurat object with single-cell data. Default: combined.obj.

id.col

Cluster identity column in metadata. Default: 'cl.names.top.gene.res.0.3'.

subtitle

Optional subtitle for the plot.

ext

File extension for saving the plot. Default: '.png'.

return.df

Whether to return the underlying data frame instead of the plot. Default: FALSE.

label

Whether to add labels to the bar plot. Default: NULL.

suffix

Suffix for the output file name.

above

Whether to calculate the fraction of cells above or below the threshold. Default: TRUE.

...

Additional parameters for plotting functions.

See Also

select, group_by

Examples

## Not run: 
scBarplot.FractionAboveThr(id.col = "cl.names.top.gene.res.0.3", value.col = "percent.ribo", thrX = 0.2)

## End(Not run)


vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.