Skip to contents

Converts a Seurat object into a Monocle3 cell_data_set object. Optionally, dimensionality reduction embeddings can be transferred.

Usage

seurat_to_monocle3(
  seurat_obj,
  assay_name = "RNA",
  seurat_reduction = "umap",
  monocle_reduction = "UMAP"
)

Arguments

seurat_obj

A Seurat object to convert.

assay_name

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

seurat_reduction

The name of the reduction in Seurat to transfer (e.g., "umap"). Use NULL to skip transferring reductions. Default is "umap".

monocle_reduction

The name to assign to the reduction in the Monocle3 object (e.g., "UMAP"). Use NULL to skip transferring reductions. Default is "UMAP".

Value

A Monocle3 cell_data_set object.

Details

This function converts a Seurat object into a Monocle3 cell_data_set object by extracting the counts data, cell metadata, and gene metadata. It can also transfer dimensionality reduction embeddings from the Seurat object to the Monocle3 object if specified.

Examples

if (FALSE) {
# Assuming 'seurat_obj' is a Seurat object
cds <- seurat_to_monocle3(
  seurat_obj,
  assay_name = "RNA",
  seurat_reduction = "umap",
  monocle_reduction = "UMAP"
)
}