Skip to contents

{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 an scverse community project maintained by Data Intuitive, and is 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 natively
  • Convert to/from SingleCellExperiment objects
  • Convert to/from Seurat objects

[!WARNING]

This package is still in the experimental stage, and may not work as expected. You can find the status of development of anndataR on the feature tracking page of the website. Please report any issues you encounter.

Installation

You can install the development version of {anndataR} 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 hdf5r:
    install.packages("hdf5r")
  • 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.data-intuitive.com/articles/).