Learn R Programming

CAESAR.Suite (version 0.1.0)

CoUMAP: Co-embedding UMAP for Genes and Cells in a Seurat Object

Description

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.

Usage

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

Value

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

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.

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

Run this code
data(toydata)

seu <- toydata$seu

seu <- CoUMAP(seu, gene.set = rownames(seu))
print(seu)

Run the code above in your browser using DataLab