example_anndata: Example 'anndata'

View source: R/example_anndata.R

example_anndataR Documentation

Example anndata

Description

anndata R package has a major bug currently. Thus, add_filename must be kept False until this is fixed.

Usage

example_anndata(
  obj = SeuratObject::pbmc_small,
  save_path = file.path(tempdir(), "example.h5ad"),
  backed = "r",
  verbose = TRUE
)

Arguments

backed

If 'r', load ~anndata.AnnData in backed mode instead of fully loading it into memory (memory mode). If you want to modify backed attributes of the AnnData object, you need to choose 'r+'.

Source

#### Setup conda env #### ## Option 1: Point to where anndata is installed (or should be installed) conda_dir <- dirname(dirname(reticulate::conda_list()[1,]$python)) reticulate::use_condaenv(condaenv = conda_dir) reticulate::conda_install(conda = conda_dir, packages = "loompy", pip = T) ## Option 2: Just run anndata::install_anndata() and will install via miniconda anndata::install_anndata(method = "conda", conda=conda_dir) #### Usage #### adata <- example_anndata()


bschilder/scKirby documentation built on April 22, 2024, 12:13 a.m.