modeReducedDim: App pre-configured to compare multiple reduced dimension...

Description Usage Arguments Value Examples

View source: R/modeReducedDim.R

Description

This mode launches a Shiny App preconfigured with multiple linked reduced dimension plots for interactive data exploration of the SingleCellExperiment object.

Usage

1
2
3
4
5
6
7
modeReducedDim(
  se,
  includeNames = reducedDimNames(se),
  colorBy = NULL,
  ...,
  plotWidth = NULL
)

Arguments

se

An object that coercible to SingleCellExperiment

includeNames

Character vector with the names of reduced dimensions to display as individual panels. The default uses all available in reducedDimNames(se).

colorBy

Character scalar controlling coloring of cells. Must match either to one of colnames(colData(se)) or rownames(se). If coloring by a colData column, a column data plot is opened in addition to the reduced dimension panels. If coloring by a feature, a row statistics table is openend in addition to the reduced dimension panels, from which the latter are receiving the color.

...

Additional arguments passed to iSEE.

plotWidth

The grid width of linked plots (numeric vector of length either 1 or equal to length(includeNames)). The total width of the window is 12, so plotWidth = 4 for example will show three panels per row. If plotWidth = NULL (the default), a value will be estimated depending on the number of reduced dimension panels.

Value

A Shiny app object is returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(scRNAseq)

# Example data ----
sce <- ReprocessedAllenData(assays="tophat_counts")
class(sce)

library(scater)
sce <- logNormCounts(sce, exprs_values="tophat_counts")
sce <- runPCA(sce, ncomponents = 30)
sce <- runTSNE(sce)
sce <- runUMAP(sce)
reducedDimNames(sce)

# launch the app ----
# ... coloring by a column data variable
app <- modeReducedDim(sce, colorBy = "Primary.Type")
if (interactive()) {
    shiny::runApp(app, port=1234)
}
# ... coloring by a feature
app <- modeReducedDim(sce, colorBy = "Scnn1a")
if (interactive()) {
    shiny::runApp(app, port=1234)
}

iSEEu documentation built on Nov. 8, 2020, 8:12 p.m.