Run UMAP on the quantile normalized cell factors (result from
quantileNorm
), or unnormalized cell factors (result from
runIntegration
)) to generate a 2D embedding for visualization
(or general dimensionality reduction). Has option to run on subset of
factors. It is generally recommended to use this method for dimensionality
reduction with extremely large datasets. The underlying UMAP calculation
imports uwot umap
.
runUMAP(
object,
useRaw = NULL,
useDims = NULL,
nDims = 2,
distance = c("cosine", "euclidean", "manhattan", "hamming"),
nNeighbors = 20,
minDist = 0.1,
dimredName = "UMAP",
seed = 42,
verbose = getOption("ligerVerbose", TRUE),
k = nDims,
use.raw = useRaw,
dims.use = useDims,
n_neighbors = nNeighbors,
min_dist = minDist,
rand.seed = seed
)
The object
where a "UMAP"
variable is updated in the
cellMeta
slot with the whole 2D embedding matrix.
liger object with factorization results.
Whether to use un-aligned cell factor loadings (\(H\)
matrices). Default NULL
search for quantile-normalized loadings first
and un-aligned loadings then.
Index of factors to use for computing UMAP embedding. Default
NULL
uses all factors.
Number of dimensions to reduce to. Default 2
.
Character. Metric used to measure distance in the input
space. Default "cosine"
, alternative options include:
"euclidean"
, "manhattan"
and "hamming"
.
Number of neighboring points used in local approximations
of manifold structure. Default 10
.
Numeric. Controls how tightly the embedding is allowed
compress points together. Default 0.1
.
Name of the variable in cellMeta
slot to store the
result matrix. Default "UMAP"
.
Random seed for reproducibility. Default 42
.
Logical. Whether to show information of the progress. Default
getOption("ligerVerbose")
or TRUE
if users have not set.
Deprecated. See Usage section for replacement.
For nNeighbors
, larger values will result in more global
structure being preserved at the loss of detailed local structure. In general
this parameter should often be in the range 5 to 50, with a choice of 10 to
15 being a sensible default.
For minDist
, larger values ensure embedded points are more evenly
distributed, while smaller values allow the algorithm to optimize more
accurately with regard to local structure. Sensible values are in the range
0.001 to 0.5, with 0.1 being a reasonable default.
runTSNE