plotGeneViolin: Plot violin plots for gene expression

View source: R/rliger.R

plotGeneViolinR Documentation

Plot violin plots for gene expression

Description

Generates violin plots of expression of specified gene for each dataset.

Usage

plotGeneViolin(
  object,
  gene,
  methylation.indices = NULL,
  by.dataset = TRUE,
  return.plots = FALSE
)

Arguments

object

liger object.

gene

Gene for which to plot relative expression.

methylation.indices

Indices of datasets in object with methylation data (this data is not magnified and put on log scale).

by.dataset

Plots gene expression for each dataset separately (default TRUE).

return.plots

Return ggplot objects instead of printing directly to console (default FALSE).

Value

List of ggplot plot objects (only if return.plots TRUE, otherwise prints plots to console).

Examples

ligerex <- createLiger(list(ctrl = ctrl, stim = stim))
ligerex <- normalize(ligerex)
ligerex <- selectGenes(ligerex)
ligerex <- scaleNotCenter(ligerex)
ligerex <- optimizeALS(ligerex, k = 5, max.iter = 2)
ligerex <- quantile_norm(ligerex)
ligerex <- louvainCluster(ligerex)
plotGeneViolin(ligerex, "CD74", by.dataset = FALSE)
plotGeneViolin(ligerex, "CD74")

rliger documentation built on Nov. 9, 2023, 1:07 a.m.