runMultiUMAP {scater} | R Documentation |
Perform UMAP with multiple input matrices by intersecting their simplicial sets. Typically used to combine results from multiple data modalities into a single embedding.
runMultiUMAP(inputs, ..., metric = "euclidean")
inputs |
A list of numeric matrices where each row is a cell and each column is some dimension/variable. For gene expression data, this is usually the matrix of PC coordinates. |
... |
Further arguments to pass to |
metric |
String specifying the type of distance to use. |
This is simply a convenience wrapper around umap
for multi-modal analysis.
All modes use the distance metric of metric
to construct the simplicial sets within each mode.
Comparisons across modes are then performed after intersecting the sets to obtain a single graph.
A numeric matrix containing the low-dimensional UMAP embedding.
Aaron Lun
runUMAP
, for the more straightforward application of UMAP.
# Mocking up a gene expression + ADT dataset: exprs_sce <- mockSCE() exprs_sce <- logNormCounts(exprs_sce) exprs_sce <- runPCA(exprs_sce) adt_sce <- mockSCE(ngenes=20) adt_sce <- logNormCounts(adt_sce) altExp(exprs_sce, "ADT") <- adt_sce # Running a multimodal analysis using PCs for expression # and log-counts for the ADTs: output <- runMultiUMAP( list( reducedDim(exprs_sce, "PCA"), t(logcounts(altExp(exprs_sce, "ADT"))) ) ) reducedDim(exprs_sce, "combinedUMAP") <- output plotReducedDim(exprs_sce, "combinedUMAP")