Learn R Programming

scCustomize (version 3.1.3)

Proportion_Plot_per_Sample: Cell Proportion Plot per Sample

Description

Plots the proportion of cells belonging to each identity per sample split by grouping variable/condition.

Usage

Proportion_Plot_per_Sample(
  seurat_object,
  cluster = "ident",
  split.by,
  sample_col,
  pt.size = 1.5,
  x_lab_rotate = TRUE,
  colors_use = NULL,
  ggplot_default_colors = FALSE,
  color_seed = 123
)

Arguments

seurat_object

Seurat object name.

cluster

name of meta.data column containing cluster values. Default is ident which defaults to current active.ident.

split.by

name of meta.data column containing sample group/condition variable.

sample_col

name of meta.data column that contains sample ID information.

pt.size

the size of points in plot (default is 1.5).

x_lab_rotate

Rotate x-axis labels 45 degrees (Default is FALSE). Only valid if plot_type = "bar".

colors_use

color palette to use for plotting.

ggplot_default_colors

logical. If colors_use = NULL, Whether or not to return plot using default ggplot2 "hue" palette instead of default "polychrome" or "varibow" palettes.

color_seed

random seed for the "varibow" palette shuffle if colors_use = NULL and number of groups plotted is greater than 36. Default = 123.

Examples

Run this code
if (FALSE) {
Proportion_Plot_per_Sample(seurat_object = obj, split.by = "Diagnosis",
sample_col = "orig.ident")
}

Run the code above in your browser using DataLab