Projects the samples of an exposure matrix to 2-D (UMAP via uwot, or a deterministic kmeans-cluster annotation) and returns the tidy embedding with the cluster assignment. With the compositional share transform (default) the geometry lives on the simplex embedding the signatures induce.
Arguments
- exposures
k x n exposure matrix (rows = signatures, columns = samples), or an [MsSignature].
- method
"umap" (uwot; Suggests) or "kmeans" (stats, always available).
- transform
"share" (columns to 1 — default) or "none".
- seed
Single seed: UMAP's set.seed / kmeans's centers-first row. kmeans is bitwise deterministic for a given input regardless.
- clusters
kmeans clusters (default 3); ignored by UMAP.