cell_bar_plot: Visualize the results as a stacked bar chart with...

View source: R/cell_bar_plot.R

cell_bar_plotR Documentation

Visualize the results as a stacked bar chart with tidyverse/ggplot2.

Description

Visualize the results as a stacked bar chart with tidyverse/ggplot2.

Usage

cell_bar_plot(
  input,
  id = "ID",
  title = "Cell Fraction",
  features = NULL,
  pattern = "CIBERSORT",
  legend.position = "bottom",
  coord_filp = TRUE,
  palette = 3,
  show_col = F,
  cols = NULL
)

Arguments

input

input result of 'CIBERSORT' or 'quantiseq'

id

patient identifier of input

title

plot title

legend.position

legend position

coord_filp

logical variables, 'coord_filp' of ggplot2

palette

default is palette3

show_col

default is FALSE

cols

default is NULL, user can define colors manually

Examples

# Loading TCGA-STAD microenvironment data
data("sig_stad", package = "IOBR")
# showing 20 tumor microenvironment cell proportion deconvoluted by CIBERSORT algorithm
cell_bar_plot(input = sig_stad[1:20, ], id = "ID", features = colnames(sig_stad)[25:46])

IOBR/IOBR documentation built on Sept. 24, 2023, 10:17 p.m.