Skip to content

scverse/anndataR

Repository files navigation

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

Lifecycle: experimental R-CMD-check

{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

You can find the status of development of {anndataR} on the feature tracking page of the package website. 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 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/).

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.

  • Getting started: An introduction to the package and its features.
    vignette("anndataR", package = "anndataR")
  • Read/write Seurat objects: How to convert between AnnData and Seurat objects.
    vignette("usage_seurat", package = "anndataR")
  • Read/write SingleCellExperiment objects: How to convert between AnnData and SingleCellExperiment objects vignette("usage_singlecellexperiment", package = "anndataR")
  • Software Design: An overview of the design of the package
  • Development Status: An overview of the development status of the package
  • Known Issues: An overview of known issues with the package.
    vignette("known_issues", package = "anndataR")

About

AnnData interoperability in R

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Contributors 12

Languages