runDR: Dimension reduction

Description Usage Arguments Value Author(s) References Examples

View source: R/runDR.R

Description

Wrapper around dimension reduction methods available through scater, with optional subsampling of cells per each sample.

Usage

1
2
3
4
5
6
7
8
runDR(
  x,
  dr = c("UMAP", "TSNE", "PCA", "MDS", "DiffusionMap"),
  cells = NULL,
  features = "type",
  assay = "exprs",
  ...
)

Arguments

x

a SingleCellExperiment.

dr

character string specifying which dimension reduction to use.

cells

single numeric specifying the maximal number of cells per sample to use for dimension reduction; NULL for all cells.

features

a character vector specifying which antigens to use for dimension reduction; valid values are "type"/"state" for type/state_markers(x) if rowData(x)$marker_class have been specified; a subset of rownames(x); NULL to use all features.

assay

character string specifying which assay data to use for dimension reduction; valid values are assayNames(x).

...

optional arguments for dimension reduction; passed to runUMAP, runTSNE, runPCA, runMDS and runDiffusionMap, respecttively. See ?"scater-red-dim-args" for details.

Value

a ggplot object.

Author(s)

Helena L Crowell helena.crowell@uzh.ch

References

Nowicka M, Krieg C, Crowell HL, Weber LM et al. CyTOF workflow: Differential discovery in high-throughput high-dimensional cytometry datasets. F1000Research 2017, 6:748 (doi: 10.12688/f1000research.11622.1)

Examples

1
2
3
4
5
6
# construct SCE
data(PBMC_fs, PBMC_panel, PBMC_md)
sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md)

# run UMAP on <= 200 cells per sample
sce <- runDR(sce, features = type_markers(sce), cells = 100)

CATALYST documentation built on Nov. 8, 2020, 6:53 p.m.