RunUMAP.Matrix | R Documentation |
This function applies the Uniform Manifold Approximation and Projection (UMAP) algorithm to reduce the dimensionality of a given data matrix using the native R 'uwot' package.
## S3 method for class 'Matrix'
RunUMAP(
DGEmat,
assay = NULL,
n.neighbors = 30L,
n.components = 2L,
metric = "correlation",
min.dist = 0.3,
spread = 1,
seed.use = 42,
reduction.key = "UMAP_",
verbose = TRUE,
...
)
DGEmat |
A numeric matrix where rows represent samples and columns represent features. |
assay |
Optional assay information (not used in this implementation). |
n.neighbors |
Integer. Number of nearest neighbors to consider (default: 30). |
n.components |
Integer. Number of dimensions for the reduced space (default: 2). |
metric |
Character. Distance metric to use (default: "correlation"). Options include '"euclidean"', '"cosine"', '"manhattan"', etc. |
min.dist |
Numeric. Minimum distance between embedded points (default: 0.3). |
spread |
Numeric. Spread of the UMAP embedding (default: 1). |
seed.use |
Integer. Seed for reproducibility (default: 42). |
reduction.key |
Character. Prefix for naming UMAP dimensions in the output (default: "UMAP_"). |
verbose |
Logical. Whether to print progress messages (default: TRUE). |
... |
Additional arguments passed to 'uwot::umap()'. |
A matrix of reduced UMAP coordinates with row names corresponding to 'DGEmat'.
## Not run:
if(requireNamespace("uwot", quietly = TRUE)) {
data_matrix <- matrix(rnorm(1000), nrow = 100, ncol = 10)
umap_results <- RunUMAP.Matrix(DGEmat = data_matrix)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.