runDR {CATALYST} | R Documentation

## Dimension reduction

### Description

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

### Usage

    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

    # 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)

[Package CATALYST version 1.16.2 Index]