Stars PyPI PyPIDownloadsTotal PyPIDownloadsMonth Conda Docs Build Status Coverage

anndata - Annotated data

_images/anndata_schema.svg

anndata is a Python package for handling annotated data matrices in memory and on disk, positioned between pandas and xarray. anndata offers a broad range of computationally efficient features including, among others, sparse data support, lazy operations, and a PyTorch interface.

News

Muon paper published 2022-02-02

Muon has been published in Genome Biology [Bredikhin22]. Muon is a framework for multimodal data built on top of AnnData.

Check out Muon and its datastructure MuData.

COVID-19 datasets distributed as h5ad 2020-04-01

In a joint initiative, the Wellcome Sanger Institute, the Human Cell Atlas, and the CZI distribute datasets related to COVID-19 via anndata’s h5ad files: covid19cellatlas.org.

Latest additions

Version 0.9

0.9.0 the future

Features

Bug fixes

Version 0.8

0.8.1 the future

Bug fixes

Documentation

0.8.0 14th March, 2022

IO Specification

Warning

The on disk format of AnnData objects has been updated with this release. Previous releases of anndata will not be able to read all files written by this version.

For discussion of possible future solutions to this issue, see issue 698

Internal handling of IO has been overhauled. This should make it much easier to support new datatypes, use partial access, and use AnnData internally in other formats.

  • Each element should be tagged with an encoding_type and encoding_version. See updated docs on the file format

  • Support for nullable integer and boolean data arrays. More data types to come!

  • Experimental support for low level access to the IO API via read_elem() and write_elem()

Features

  • Added PyTorch dataloader AnnLoader and lazy concatenation object AnnCollection. See the tutorials PR 416 S Rybakov

  • Compatibility with h5ad files written from Julia PR 569 I Kats

  • Many logging messages that should have been warnings are now warnings PR 650 I Virshup

  • Significantly more efficient anndata.read_umi_tools() PR 661 I Virshup

  • Fixed deepcopy of a copy of a view retaining sparse matrix view mixin type PR 670 M Klein

  • In many cases X can now be None PR 463 R Cannoodt PR 677 I Virshup. Remaining work is documented in issue 467.

  • Removed hard xlrd dependency I Virshup

  • obs and var dataframes are no longer copied by default on AnnData instantiation issue 371 I Virshup

Bug fixes

  • Fixed issue where .copy was creating sparse matrices views when copying PR 670 michalk8

  • Fixed issue where .X matrix read in from zarr would always have float32 values PR 701 I Virshup

  • Raw.to_adata` now includes obsp in the output PR 404 G Eraslan

Dependencies

  • xlrd dropped as a hard dependency

  • Now requires h5py v3.0.0 or newer