{anndataR} aims to make the AnnData format a first-class citizen in the R ecosystem, and to make it easy to work with AnnData files in R, either directly or by converting them to a SingleCellExperiment or Seurat object.
{anndataR} is a an scverse® community project fiscally sponsored by the Chan Zuckerberg Initiative.
R6 class to work with AnnData objects in R (either in-memory or on-disk)*.h5ad files and *.zarr stores nativelySingleCellExperiment objectsSeurat objectsPlease report any issues you encounter.
You can install {anndataR} from Bioconductor using BiocManager:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("anndataR")
Or you can install the development version of {anndataR} from GitHub like so:
# install.packages("pak")
pak::pak("scverse/anndataR")
You will need to install additional dependencies, depending on the task you want to perform.
*.h5ad files, install rhdf5:BiocManager::install("rhdf5")
*.zarr stores, install Rarr:BiocManager::install("Rarr")
SingleCellExperiment objects, install SingleCellExperiment:BiocManager::install("SingleCellExperiment")
Seurat objects, install SeuratObject:install.packages("SeuratObject")
Alternatively, you can install all suggested dependencies at once:
pak::pak("scverse/anndataR", dependencies = TRUE)
The best way to get started with {anndataR} is to explore the package vignettes (available at https://anndataR.scverse.org/articles/).
In order to browse these vignettes locally, you need to build them during installation:
options(pkg.build_vignettes = TRUE)
pak::pak("scverse/anndataR")
Take note that you need all suggested dependencies available, and that building them can take some time.
vignette("anndataR", package = "anndataR")
Seurat objects: How to convert between AnnData and Seurat objects.vignette("usage_seurat", package = "anndataR")
SingleCellExperiment objects: How to convert between AnnData and SingleCellExperiment objectsvignette("usage_singlecellexperiment", package = "anndataR")
If you use {anndataR} in your work, please cite "anndataR improves interoperability between R and Python in single-cell transcriptomics":
citation("anndataR")
Deconinck L, Zappia L, Cannoodt R, Morgan M, scverse core, Virshup I, Sang-aram C, Bredikhin D, Seurinck R, Saeys Y (2025).
“anndataR improves interoperability between R and Python in single-cell transcriptomics.” _bioRxiv_, 2025.08.18.669052.
doi:10.1101/2025.08.18.669052 <https://doi.org/10.1101/2025.08.18.669052>.
A BibTeX entry for LaTeX users is
@Article{,
title = {{anndataR} improves interoperability between R and Python in single-cell transcriptomics},
author = {Louise Deconinck and Luke Zappia and Robrecht Cannoodt and Martin Morgan and {scverse core} and Isaac Virshup and Chananchida Sang-aram and Danila Bredikhin and Ruth Seurinck and Yvan Saeys},
journal = {bioRxiv},
year = {2025},
pages = {2025.08.18.669052},
doi = {10.1101/2025.08.18.669052},
}