R/getUMAP.R
getUMAP.Rd
Uniform Manifold Approximation and Projection(UMAP) algorithm for dimension reduction.
getUMAP( inSCE, useAssay = "counts", useAltExp = NULL, useReducedDim = NULL, sample = NULL, reducedDimName = "UMAP", logNorm = TRUE, nNeighbors = 30, nIterations = 200, alpha = 1, minDist = 0.5, spread = 5, pca = TRUE, initialDims = 50, nTop = 2000 )
inSCE | Input SingleCellExperiment object. |
---|---|
useAssay | Assay to use for UMAP computation. If |
useAltExp | The subset to use for UMAP computation, usually for the
selected.variable features. Default |
useReducedDim | The low dimension representation to use for UMAP
computation. Default |
sample | Character vector. Indicates which sample each cell belongs to.
If given a single character, will take the annotation from
|
reducedDimName | A name to store the results of the dimension reduction
coordinates obtained from this method. Default |
logNorm | Whether the counts will need to be log-normalized prior to
generating the UMAP via |
nNeighbors | The size of local neighborhood used for manifold
approximation. Larger values result in more global views of the manifold,
while smaller values result in more local data being preserved. Default
|
nIterations | The number of iterations performed during layout
optimization. Default is |
alpha | The initial value of "learning rate" of layout optimization.
Default is |
minDist | The effective minimum distance between embedded points.
Smaller values will result in a more clustered/clumped embedding where nearby
points on the manifold are drawn closer together, while larger values will
result on a more even dispersal of points. Default |
spread | The effective scale of embedded points. In combination with
minDist, this determines how clustered/clumped the embedded points are.
Default |
pca | Logical. Whether to perform dimension reduction with PCA before
UMAP. Will not perform PCA if using |
initialDims | Number of dimensions from PCA to use as input in UMAP.
Default |
nTop | Number of features with the highest variances to use for
dimensionality reduction. Default |
A SingleCellExperiment object with UMAP computation
updated in reducedDim(inSCE, reducedDimName)
.
data(scExample, package = "singleCellTK") sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'") sce <- getUMAP(inSCE = sce, useAssay = "counts", reducedDimName = "UMAP")