
Uniform Manifold Approximation and Projection (UMAP)
gly_umap.RdPerform UMAP dimensionality reduction on the expression data.
The function uses uwot::umap() to perform UMAP analysis.
Usage
gly_umap(
exp,
n_neighbors = 15,
n_components = 2,
add_info = TRUE,
...,
log_transform = TRUE
)Arguments
- exp
A
glyexp::GlycomicSE()orglyexp::GlycoproteomicSE()object, or anotherSummarizedExperimentcontaining an expression matrix and sample information.- n_neighbors
Number of neighbors to consider for each point. Default is 15.
- n_components
Number of output dimensions. Default is 2.
- add_info
A logical value. If TRUE (default), sample information from the experiment will be added to the result tibble. If FALSE, only the UMAP coordinates are returned.
- ...
Additional arguments passed to
uwot::umap().- log_transform
A single logical value indicating whether to transform expression values using
log(x + 1)before analysis. Default isTRUE. Set toFALSEfor data that are already log-transformed.
Value
A list with three elements:
tidy_result: A tibble with UMAP coordinates containing the following columns:sample: Sample nameumap1: First UMAP dimensionumap2: Second UMAP dimensionumap3,umap4, etc.: Additional UMAP dimensions (if n_components > 2)
raw_result: The raw UMAP result matrixmeta_data: A list containing metadata from the input experiment The list has classesglystats_umap_resandglystats_res.
Details
By default, expression values are transformed using log(x + 1) before
analysis. Set log_transform = FALSE to use the expression values as supplied,
for example when they are already log-transformed.