plot_violin: plot_violin

Description Usage Arguments Details Examples

Description

Create violin plot.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
plot_violin(
  input,
  title = "",
  gene,
  color_by,
  log_scale = F,
  colors = NULL,
  facet_by = NULL,
  spread = NULL,
  jitter_pts = T,
  plot_mean = T,
  size = 1,
  sig = 3,
  number_labels = T,
  text_sizes = c(20, 10, 5, 10, 5, 5),
  alpha = 0.5,
  theme = "classic"
)

Arguments

input

Bioconductor’s ExpressionSet Class with unlogged values in exprs().

title

Title of the graph. Would be the gene name if not specificed.

gene

to plot the expression level of.

color_by

a pData variable.

log_scale

If true, transform UMIs by log2(UMI + 1).

colors

What colors to utilize for categorial data. Be sure it is of the proper length.

facet_by

a vector with one or two pData variables. If two, the first variable as columns and the second as rows.

spread

e.g. Healthy catagory is unique in Disease and Skin. To use Healthy only as skin but not Disease, that is adding Healthy skin to each disease, spread = c("Disease", "Healthy").

plot_mean

plot the mean value as black dot with second y-axis on the right.

size

the size of dots.

sig

the number of digits after the decimal point for cell fraction value.

number_labels

show the total cell numbers and cell fraction with non-zero expression values under each bar.

text_sizes

a vector of title_size, axis_title, axis_text, legend_title, legend_text, facet_text, faults too c(20,10,5,10,5,5)

theme

the plot theme. Default to be "classic" if not set to "bw".

Details

Utilize information stored in pData to control the plot display. Each point_by as a dot with a bar showing the weighted mean of all point_by dots.

Examples

1
2
plot_violin(ex_sc, gene = "CXCL13", color_by = "Skin", facet_by = c("Disease", "CellType"), log_scale = T)
plot_violin(ex_sc, gene = "CXCL13", color_by = "Skin", facet_by = c("CellType", "Disease"), spread = T, log_scale = T)

kgellatl/SignallingSingleCell documentation built on Dec. 29, 2021, 4:12 p.m.