anndataR
works with Python AnnData objects through reticulate.
You can load Python objects, apply Python functions to them, and convert
them to Seurat or SingleCellExperiment
objects.
message(
"Python packages scanpy and mudata are required to run this vignette. Code chunks will not be evaluated."
)
#> Python packages scanpy and mudata are required to run this vignette. Code chunks will not be evaluated.This vignette requires Python with the scanpy and mudata packages installed. If these are not available, the code chunks will not be evaluated but the examples remain visible.
Install required Python packages if needed:
Load a dataset directly from scanpy:
Apply scanpy functions directly:
Convert to SingleCellExperiment (see
vignette("usage_singlecellexperiment")):
Convert to Seurat (see
vignette("usage_seurat")):
Install required Python packages if needed:
Load a MuData object from file:
cache <- BiocFileCache::BiocFileCache(ask = FALSE)
h5mu_file <- BiocFileCache::bfcrpath(
cache,
"https://github.com/gtca/h5xx-datasets/raw/b1177ac8877c89d8bb355b072164384b4e9cc81d/datasets/minipbcite.h5mu"
)
mdata <- md$read_h5mu(h5mu_file)Access individual modalities and convert them: