pcmpApp: Define a shiny app for comparing projections

Description Usage Arguments Value Note Examples

View source: R/infra.R

Description

Define a shiny app for comparing projections

Usage

1
2
pcmpApp(sce, assayind = 1, cellIdTag = ".cellid",
  selectionPrefix = "sel_", numDiscGenes = 20)

Arguments

sce

SingleCellExperiment instance with reducedDims populated with various candidates for projection from assay data –

assayind

numeric(1) 'i' argument to assay(sce, i), defaults to 1, for extracting expression values

cellIdTag

character(1) defaulting to ".cellid", added to colData(sce) for tracking selections

selectionPrefix

character(1) defaulting to "sel_", prefix for the name of a selection indicator variable added to colData(sce)

numDiscGenes

numeric(1) used to limit number of differentially expressed genes tabulated per selection

Value

will return an updated SingleCellExperiment

Note

In sce300xx, names(reducedDims) are 'PPCA', 'UMAP*', 'TSNE*' for projections generated by irlba::irlba, umap::umap, and Rtsne::Rtsne respectively. Prior to pcmp version 0.4.0, the projections were computed and prepared differently. As Rtsne no longer allows dims > 3, we have separately computed and stored t-SNE projections into 2- and 3- dimensional spaces, labeled TSNE2 and TSNE3. (In previous versions of pcmp, the 4-d t-SNE was computed and marginal planar projections were provided.) Note that tabulation of DE genes can be very slow if the input SingleCellExperiment has more than 10k rows.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
if (interactive()) {
 message("be sure to use example(pcmpApp, ask=FALSE)")
 lit = pcmp::sce300xx
 sds = rowSds(assay(lit))
 top1k = order(sds,decreasing=TRUE)[1:1000]
 lit = lit[top1k,]
 chk = pcmpApp(lit) # fires up browser, if ask != FALSE you must
 # assent to each update 
 try(chk)  # may error if no selections
 try(head(metadata(chk)$limmaTabs,3))  # likewise
 try(table(metadata(chk)$limmaTabs$featid))  # likewise
}

vjcitn/pcmp documentation built on May 25, 2019, 2:21 p.m.