example_obj: Example single-cell data object

View source: R/example_obj.R

example_objR Documentation

Example single-cell data object

Description

Create a small example object of scRNA-seq data.

Usage

example_obj(
  class = c("Seurat", "h5Seurat", "SummarizedExperiment", "SingleCellExperiment",
    "CellDataSet", "matrix", "data.table", "data.frame", "list", "loom",
    "LoomExperiment", "SingleCellLoomExperiment", "hdf5se", "anndata", "EWCE"),
  save_path = file.path(tempdir(), "example"),
  verbose = TRUE
)

Arguments

class

Object class to return.

save_path

Path to save on-disk object formats.

verbose

Print messages.

Details

NOTE: If you get the error Error: ModuleNotFoundError: No module named 'anndata', try running install_anndata and then restarting your R session. Also, loom files require you to run library(Seurat) beforehand.

Certain file types (loom, anndata) can't be stored as .rda files because they need to be set up for on-disk reading.

Value

A single-cell object.

Examples

se <- example_obj("se")
sce <- example_obj("sce")
seurat <- example_obj("seurat")

library(Seurat) # necessary
loom <- example_obj("loom")

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