runDimReduce {singleCellTK} | R Documentation |
Generic Wrapper function for running dimensionality reduction
runDimReduce( inSCE, method = c("scaterPCA", "seuratPCA", "seuratICA", "rTSNE", "seuratTSNE", "uwotUMAP", "seuratUMAP"), useAssay = NULL, useReducedDim = NULL, useAltExp = NULL, reducedDimName, nComponents = 20, ... )
inSCE |
Input SingleCellExperiment object. |
method |
One from |
useAssay |
Assay to use for computation. If |
useReducedDim |
The low dimension representation to use for embedding
computation. Default |
useAltExp |
The subset to use for computation, usually for the
selected variable features. Default |
reducedDimName |
The name of the result matrix. Required. |
nComponents |
Specify the number of dimensions to compute with the selected method in case of PCA/ICA and the number of components to use in the case of TSNE/UMAP methods. |
... |
The other arguments for running a specific algorithm. Please refer to the one you use. |
Wrapper function to run one of the available dimensionality
reduction algorithms integrated within SCTK from scaterPCA
,
seuratPCA
, seuratICA
, getTSNE
,
seuratRunTSNE
, getUMAP
and
seuratRunUMAP
. Users can use an assay by specifying
useAssay
, use the assay in an altExp by specifying both
useAltExp
and useAssay
, or use a low-dimensionality
representation by specifying useReducedDim
.
The input SingleCellExperiment object with
reducedDim
updated with the result.
data(scExample, package = "singleCellTK") sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'") sce <- runNormalization(sce, useAssay = "counts", outAssayName = "logcounts_scaled", normalizationMethod = "logNormCounts", scale = TRUE) sce <- runDimReduce(inSCE = sce, method = "scaterPCA", useAssay = "logcounts_scaled", reducedDimName = "PCA")