Skip to contents

Compute t-SNE and UMAP dimreds on a SingleCellExperiment object.

Usage

sce_compute_dimreds(
  sce_pca_selected_pcs,
  tsne_perp,
  tsne_max_iter,
  dimred = "pca",
  n_dimred = "selected_pcs",
  BPPARAM = BiocParallel::SerialParam()
)

Arguments

sce_pca_selected_pcs

A SingleCellExperiment object with calculated PCA and known number of selected PCs.

tsne_perp

A numeric scalar: t-SNE perplexity.

tsne_max_iter

A numeric scalar: number of t-SNE iterations.

dimred

A character scalar: name of matrix in reducedDim() used to calculate the dimreds.

n_dimred
  • A character scalar "selected_pcs": if dimred is "pca", then use selected PCs stored in metadata(sce_pca_selected_pcs)$pca_selected_pcs

  • NULL: use all dimensions of dimred

  • An integer scalar: use first n_dimred dimensions of dimred

BPPARAM

A BiocParallel::BiocParallelParam object.

Value

A SingleCellExperiment object with calculated t-SNE and UMAP dimreds. Column names of matrices of these dimreds will be named tsne_<i> and umap_<i>, respectively.