scW.p.expression: Plots mean expression of the modules on the single cell data.

View source: R/plotting.R

scW.p.expressionR Documentation

Plots mean expression of the modules on the single cell data.

Description

This function will help us plot the mean expression of the different modules calculated by scWGCNA

Usage

scW.p.expression(
  s.cells,
  scWGCNA.data,
  modules = "all",
  reduction = "tsne",
  ncol = 2
)

Arguments

s.cells

Seurat object. The single cell data used to run scWGCNA.

scWGCNA.data

scWGCNA.data. An scWGCNA.data object, as calculated by run.scWGCNA().

modules

numeric or "all". Which modules should be plotted? Could be a single module, by number or color, a vector of several modules, or "all" to plot them all in a grid

reduction

string. The reduction to use for plots. It must be present in the @reductions slot of sc.data. Default is "tsne"

ncol

numeric. If plotting more than 1 module, how many columns should the grid present?

Value

A ggplot, in case we're plotting only one module, or a grid of plots if plotting several

Examples

# A pre-analyzed Seurat object, subsampled
my.small_MmLimbE155
MmLimb.sc = my.small_MmLimbE155

# A pre-calculated WGCNA data list
class(MmLimbE155.scWGCNA)
MmLimb.scW = MmLimbE155.scWGCNA

# Plot the expression of all modules
scW.p.expression(s.cells=MmLimb.sc, scWGCNA.data=MmLimb.scW, modules="all", reduction="tsne")


CFeregrino/scWGCNA documentation built on Nov. 21, 2022, 2:31 a.m.