R/dimension_reduction.R
reduce_dimension.Rd
See details for available dimension reduction techniques that can be applied to the object.
reduce_dimension(object, flavor = c("umap", "som", "asvd", "isomds", "rsvd"), slot = flavor, ...)
object | A |
---|---|
flavor | Determines which dimension reduction technique to apply. |
slot | Determines which entry of the |
... | Additional parameters passed to functions. |
A SingleCellExperiment
object with modified reducedDims
slot.
The following dimension reduction techniques are available:
UMAP - Uniform Manifold Approximation and Projection, see umap.
approximate SVD - see approximate_svd
randomized SVD - see randomized_svd
Multidimensional scaling - see isomds
Self-organizing maps - see scSOM
# NOT RUN { # Apply UMAP on normalized expression values, but store results in a slot called dimred_umap. obj <- reduce_dimension(obj, flavor = "umap", slot = "dimred_umap", exprs_values = "norm_exprs") # Apply randomized SVD on normalized expression values, keeping 50 dimensions, followed by umap. # Using magrittr pipes, the result of randomized SVD is stored in the rsvd slot and # picked up by umap. obj %<>% reduce_dimension(flavor = "rsvd", exprs_values = "norm_exprs", n_dims = 50) %>% reduce_dimension(flavor = "umap", exprs_values = NULL, use_dimred = "rsvd") # }