plot_violin: Violin Plot

View source: R/plot_scseq.R

plot_violinR Documentation

Violin Plot

Description

Violin Plot

Usage

plot_violin(
  feature = NULL,
  scseq = NULL,
  selected_cluster = NULL,
  by.sample = FALSE,
  with_all = FALSE,
  with.height = FALSE,
  violin_data = NULL,
  is_mobile = FALSE,
  hide_pct = is_mobile,
  hide_ncells = is_mobile,
  decreasing = feature %in% c("ribo_percent", "log10_sum", "log10_detected")
)

Arguments

feature

Character, gene name.

scseq

SingleCellExperiment object.

selected_cluster

Integer indicating which level(scseq$cluster) to highlight (if by.sample is FALSE) or to subset data to (if by.sample is TRUE). To plot by sample without subsetting to a cluster, set to nlevels(scseq$cluster) + 1.

by.sample

Boolean indicating if violin plots should be by sample or by cluster (default).

with_all

Set to TRUE if plotting by sample to get same colors as Shiny app.

with.height

if TRUE returns a list object with plot and appropriate height.

violin_data

Used for Shiny app. Result of get_violin_data. Used when logcounts are seperate from SingleCellExperiment as in the Shiny app.

is_mobile

If TRUE shortens up y-axis labels to fit mobile better.

hide_pct

If TRUE, barplots indicating number of cells are hidden.

hide_ncells

If TRUE, barplots indicating percent expression are hidden.

decreasing

if FALSE (default) violins are ordered, bottom to top, by increasing mean expression.

Value

ggplot or list


hms-dbmi/drugseqr documentation built on Feb. 15, 2024, 10:38 p.m.