plotMetadataMedianFractionBarplot: plotMetadataMedianFractionBarplot

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

plotMetadataMedianFractionBarplotR Documentation

plotMetadataMedianFractionBarplot

Description

Generates a barplot of metadata median values.

Usage

plotMetadataMedianFractionBarplot(
  columns = c("percent.mito", "percent.ribo"),
  suffix = NULL,
  group.by = GetClusteringRuns(obj = obj)[2],
  method = c("median", "mean")[1],
  min.thr = 2.5,
  return.matrix = FALSE,
  main = paste(method, "read fractions per transcript class and cluster", suffix),
  ylab = "Fraction of transcriptome (%)",
  percentify = TRUE,
  subt = NULL,
  position = position_stack(),
  w = 10,
  h = 6,
  obj = combined.obj,
  ...
)

Arguments

columns

A vector of column names to consider for the barplot. Default: c("percent.mito", "percent.ribo").

suffix

A suffix added to the output filename. Default: NULL.

group.by

The variable to group by for calculations. Default: Second result of GetClusteringRuns(obj).

method

Method used for calculations, either "median" or "mean". Default: "median".

min.thr

Minimum threshold percentage for a cluster. Default: 2.5.

return.matrix

Logical; if TRUE, returns a matrix. Default: FALSE.

main

Main title for the plot. Default: "read fractions per transcript class and cluster" followed by the method and suffix.

ylab

Label for the y-axis. Default: "Fraction of transcriptome (%)".

percentify

Logical. If TRUE, multiplies the fraction by 100. Default: TRUE.

subt

Subtitle for the plot. Default: NULL.

position

Position adjustment for geoms. Default: position_stack().

w

The width of the plot. Default: 10.

h

The height of the plot. Default: 6.

obj

The main Seurat object used for calculations. Default: combined.obj.

...

Additional parameters passed to the internally called functions.

See Also

summarise_all melt


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