This function performs a co-embedding UMAP of both gene and cell embeddings from a Seurat object. It integrates the dimensionality reduction results for genes and cells into a shared UMAP space.

CoUMAP(
  seu,
  reduction = "caesar",
  reduction.name = "caesarUMAP",
  gene.set = NULL,
  slot = "data",
  assay = "RNA",
  seed = 1,
  ...
)

Arguments

seu

A Seurat object containing the single-cell RNA-seq data.

reduction

A character string specifying the name of the dimensional reduction to use (e.g., "caesar"). Default is "caesar".

reduction.name

A character string specifying the name of the new dimensional reduction slot in the Seurat object where the co-embedding UMAP will be stored. Default is "caesarUMAP".

gene.set

A character vector specifying the set of genes to include in the co-embedding. If NULL, all genes are used. Default is NULL.

slot

A character string specifying the slot in the Seurat object to use for gene expression data. Default is "data".

assay

A character string specifying the assay to use. Default is "RNA".

seed

An integer specifying the random seed for reproducibility. Default is 1.

...

Additional arguments passed to scater::calculateUMAP.

Value

A modified Seurat object with the co-embedding UMAP stored in the specified reduction.name slot.

Details

The function extracts the embeddings for both genes and cells from the specified dimensional reduction, combines them, and computes a UMAP embedding. The resulting co-embedding UMAP is stored in a new dimensional reduction slot in the Seurat object.

See also

calculateUMAP for UMAP calculation.

Examples

data(toydata)

seu <- toydata$seu

seu <- CoUMAP(seu, gene.set = rownames(seu))
print(seu)
#> An object of class Seurat 
#> 302 features across 3000 samples within 1 assay 
#> Active assay: RNA (302 features, 302 variable features)
#>  3 dimensional reductions calculated: caesar, pos, caesarUMAP