seurat_to_anndata: Convert: 'Seurat' ==> 'AnnData'

View source: R/seurat_to_anndata.R

seurat_to_anndataR Documentation

Convert: Seurat ==> AnnData

Description

Convert: Seurat ==> AnnData

Usage

seurat_to_anndata(
  obj,
  reimport = TRUE,
  save_path = tempfile(fileext = ".h5ad"),
  method = c("sceasy", "anndatar"),
  verbose = TRUE,
  ...
)

Arguments

obj

A single-cell object supported by scKirby. See converters for a table of all supported conversions.

reimport

Save and re-import the AnnData object into R to ensure all data has been converted from Python-native to R-native objects (e.g. pandas data.frames vs. R data.frames).

save_path

Path to save the H5Seurat to.

method

R package to use when converting object.

verbose

Print messages.

...

Arguments passed on to anndata::write_h5ad

anndata

An AnnData() object

filename

Filename of data file. Defaults to backing file.

compression

See the h5py filter pipeline. Options are "gzip", "lzf" or NULL.

compression_opts

See the h5py filter pipeline.

as_dense

Sparse in AnnData object to write as dense. Currently only supports "X" and "raw/X".

Examples

obj <- example_obj("seurat")
obj2 <- seurat_to_anndata(obj)

bschilder/scKirby documentation built on Oct. 2, 2024, 10:16 p.m.