Skip to contents

Columns in the resulting PCA matrix will be named as {name}_1, {name}_2, ... . This ensures compatibility with conversion to a Seurat object (Seurat::as.Seurat.SingleCellExperiment()).

Usage

sce_calc_pca(
  sce,
  name = "pca",
  exprs_values = "logcounts",
  subset_row = NULL,
  BSPARAM = BiocSingular::IrlbaParam(),
  BPPARAM = BiocParallel::SerialParam(),
  ...
)

Arguments

sce

A SingleCellExperiment object.

name, exprs_values, BSPARAM, BPPARAM, ...

Passed to scater::runPCA().

subset_row

A character vector. If NULL, IDs of highly variable genes stored in metadata(sce)$hvg_ids will be used for the subset_row parameter in scater::runPCA(). If HVGs are not found, all genes will be used.

Value

A SingleCellExperiment object with calculated PCA.