Skip to contents

Data Format Conversion between SingleCellExperiment and AnnData.

Usage

SCEAnnData(
  from = c("SingleCellExperiment", "AnnData"),
  to = c("AnnData", "SingleCellExperiment"),
  sce = NULL,
  anndata.file = NULL,
  slot.name = "counts",
  ...
)

Arguments

from

The source data format to convert, chosen from SingleCellExperiment and AnnData. Default: SingleCellExperiment.

to

The target data format to convert, chosen from AnnData and SingleCellExperiment. Default: AnnData.

sce

The SingleCellExperiment object to convert. Default: NULL.

anndata.file

File used to save or contains AnnData results. Default: NULL.

slot.name

Slot name used to save count matrix, used when converting from AnnData to SingleCellExperiment. Default: counts.

...

Parameters for writeH5AD and readH5AD.

Value

NULL or SingleCellExperiment.

Examples

# library(scRNAseq)
# seger <- SegerstolpePancreasData()
# SCEAnnData(from = "SingleCellExperiment", to = "AnnData", sce = seger, X_name = "counts")
# sce = SCEAnnData(from = "AnnData", to = "SingleCellExperiment", anndata.file = "path/to/seger.h5ad")