Skip to content
scversePublic

About

AnnData interoperability in R

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

199 stars

Watchers

11 watching

Forks

{anndataR}: An R package for working with AnnData objects anndataR logo

Lifecycle: stable R-CMD-check-bioc Codecov test coverage Bioc release status Bioc devel status Bioc downloads rank Bioc support Bioc history Bioc last commit Bioc dependencies

{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.

Features of {anndataR}

  • Provide an R6 class to work with AnnData objects in R (either in-memory or on-disk)
  • Read/write *.h5ad files and *.zarr stores natively
  • Convert to/from SingleCellExperiment objects
  • Convert to/from Seurat objects

Please report any issues you encounter.

Installation

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.

  • To read/write *.h5ad files, install rhdf5:
    BiocManager::install("rhdf5")
  • To read/write *.zarr stores, install Rarr:
    BiocManager::install("Rarr")
  • To convert to/from SingleCellExperiment objects, install SingleCellExperiment:
    BiocManager::install("SingleCellExperiment")
  • To convert to/from Seurat objects, install SeuratObject:
    install.packages("SeuratObject")

Alternatively, you can install all suggested dependencies at once:

pak::pak("scverse/anndataR", dependencies = TRUE)

Getting started

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.

Citing {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, Virshup I, Sang-aram C, Bredikhin D, Seurinck R, Saeys Y, scverse core (2026).
“anndataR improves interoperability between R and Python in single-cell transcriptomics.” _Bioinformatics_, *42*, btag288.
doi:10.1093/bioinformatics/btag288 <https://doi.org/10.1093/bioinformatics/btag288>.

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 Isaac Virshup and Chananchida Sang-aram and Danila Bredikhin and Ruth Seurinck and Yvan Saeys and {scverse core}},
    journal = {Bioinformatics},
    volume = {42},
    issue = {6},
    month = {June},
    year = {2026},
    pages = {btag288},
    doi = {10.1093/bioinformatics/btag288},
  }

Contributors

Made with contrib.rocks.

About

AnnData interoperability in R

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

199 stars

Watchers

11 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages