runUMAP | R Documentation |
Run UMAP on the aligned cell factors (result from
alignFactors
), or unaligned cell factors (raw 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",
asDefault = NULL,
seed = 42,
verbose = getOption("ligerVerbose", TRUE),
k = nDims,
use.raw = useRaw,
dims.use = useDims,
n_neighbors = nNeighbors,
min_dist = minDist,
rand.seed = seed
)
object |
liger object with factorization results. |
useRaw |
Whether to use un-aligned cell factor loadings ( |
useDims |
Index of factors to use for computing the embedding. Default
|
nDims |
Number of dimensions to reduce to. Default |
distance |
Character. Metric used to measure distance in the input
space. Default |
nNeighbors |
Number of neighboring points used in local approximations
of manifold structure. Default |
minDist |
Numeric. Controls how tightly the embedding is allowed
compress points together. Default |
dimredName |
Name of the variable in |
asDefault |
Logical, whether to set the resulting dimRed as default for
visualization. Default |
seed |
Random seed for reproducibility. Default |
verbose |
Logical. Whether to show information of the progress. Default
|
k , use.raw , dims.use , n_neighbors , min_dist , rand.seed |
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.
The object
where a "UMAP"
variable is updated in the
cellMeta
slot with the whole 2D embedding matrix.
runTSNE
pbmc <- runUMAP(pbmcPlot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.