Skip to contents

For converting a liger object to a Seurat object, the rawData, normData, and scaleData from each dataset, the cellMeta, H.norm and varFeatures slot will be included. Compatible with V4 and V5. It is not recommended to use this conversion if your liger object contains datasets from various modalities.

Usage

ligerToSeurat(
  object,
  assay = NULL,
  identByDataset = FALSE,
  merge = FALSE,
  nms = NULL,
  renormalize = NULL,
  use.liger.genes = NULL,
  by.dataset = identByDataset
)

Arguments

object

A liger object to be converted

assay

Name of assay to store the data. Default NULL detects by dataset modality. If the object contains various modality, default to "LIGER". Default dataset modality setting is understood as "RNA".

identByDataset

Logical, whether to combine dataset variable and default cluster labeling to set the Idents. Default FALSE.

merge

Logical, whether to merge layers of different datasets into one. Not recommended. Default FALSE.

nms

[Defunct] Will be ignored because new object structure does not have related problem.

renormalize

[Defunct] Will be ignored because since Seurat V5, layers of data can exist at the same time and it is better to left it for users to do it by themselves.

use.liger.genes

[Defunct] Will be ignored and will always set LIGER variable features to the place.

by.dataset

[Deprecated]. Use identByDataset instead.

Value

Always returns Seurat object(s) of the latest version. By default a Seurat object with split layers, e.g. with layers like "counts.ctrl" and "counts.stim". If merge = TRUE, return a single Seurat object with layers for all datasets merged.

Examples

seu <- ligerToSeurat(pbmc)