View source: R/cell_bar_plot.R
cell_bar_plot | R Documentation |
cell_bar_plot() provides batch visualization of tumor microenvironment (TME) cell fractions. It supports input from deconvolution results generated by methodologies such as 'CIBERSORT', 'EPIC', and 'quanTIseq'. The function enables comparison of TME cell distributions within one sample or among different samples.
cell_bar_plot(
input,
id = "ID",
title = "Cell Fraction",
features = NULL,
pattern = NULL,
legend.position = "bottom",
coord_filp = TRUE,
palette = 3,
show_col = F,
cols = NULL
)
input |
input result of 'CIBERSORT' or 'quantiseq' |
id |
patient identifier of input |
title |
plot title |
features |
default is NULL, user can define which column to draw |
pattern |
patterns of features |
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 |
A ggplot2 object representing the bar plot of cell fractions.
# 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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.