sce_calc_pca: Calculate PCA of a 'SingleCellExperiment' object.

View source: R/clustering.R

sce_calc_pcaR Documentation

Calculate PCA of a SingleCellExperiment object.

Description

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.


bioinfocz/scdrake documentation built on Sept. 19, 2024, 4:43 p.m.