Perform UMAP dimensionality reduction
Run UMAP on the normalized cell factors (or raw cell factors) to generate a 2D embedding for visualization (or general dimensionality reduction). Has option to run on subset of factors. Note that running multiple times will overwrite tsne.coords values. It is generally recommended to use this method for dimensionality reduction with extremely large datasets.
Note that this method requires that the package uwot is installed. It does not depend on reticulate or python umap-learn.
runUMAP( object, use.raw = FALSE, dims.use = 1:ncol(object@H.norm), k = 2, distance = "euclidean", n_neighbors = 10, min_dist = 0.1, rand.seed = 42 )
object |
|
use.raw |
Whether to use un-aligned cell factor loadings (H matrices) (default FALSE). |
dims.use |
Factors to use for computing tSNE embedding (default 1:ncol(H.norm)). |
k |
Number of dimensions to reduce to (default 2). |
distance |
Mtric used to measure distance in the input space. A wide variety of metrics are already coded, and a user defined function can be passed as long as it has been JITd by numba. (default "euclidean", alternatives: "cosine", "manhattan", "hamming") |
n_neighbors |
Number of neighboring points used in local approximations of manifold structure. 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. (default 10) |
min_dist |
Controls how tightly the embedding is allowed compress points together. Larger values ensure embedded points are more evenly distributed, while smaller values allow the algorithm to optimise 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. (default 0.1) |
rand.seed |
Random seed for reproducibility (default 42). |
liger
object with tsne.coords slot set.
## Not run: # ligerex (liger object), factorization complete # generate H.norm by quantile normalizig factor loadings ligerex <- quantileAlignSNF(ligerex) # get tsne.coords for normalized data ligerex <- runUMAP(ligerex) # get tsne.coords for raw factor loadings ligerex <- runUMAP(ligerex, use.raw = TRUE) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.