PyPI Docs Build Status Coverage

anndata - Annotated Data

Install via pip install anndata or conda install anndata -c bioconda.

Report issues and see the code on GitHub.

AnnData provides a scalable way of keeping track of data and learned annotations. It was initially built for Scanpy (Genome Biology, 2018).

On Master July 29, 2019


Breaking changes on master include:

  • Elements of AnnData objects don’t have their dimensionality reduced when the main object is subset. This is to maintain consistency when subsetting. See discussion here.
  • While the anndata.core module currently exists, it may be renamed to anndata._core #174.

Currently broken features

  • sc.pp.normalize_per_cell doesn’t work on dask arrays. It just doesn’t modify the matrix.
  • Views have been overhauled PR #164.

    • Indexing into a view no longer keeps a reference to intermediate view, issue #62.
    • Views are now lazy. Elements of view of AnnData are not indexed until they’re accessed.
    • Indexing with scalars no longer reduces dimensionality of contained arrays, issue #145.
    • All elements of AnnData should now follow the same rules about how they’re subset, issue #145.
    • Can now index by observations and variables at the same time.

Post v0.6 June 6, 2019

  • convenience accesors obs_vector(), var_vector() for 1d arrays, see here 0.6.21 thanks to I Virshup
  • compatibility with Scipy >=1.3 by removing IndexMixin dependency, see here 0.6.20 thanks to P Angerer
  • bug fix for second-indexing into views, see here 0.6.19 thanks to P Angerer
  • bug fix for reading excel files 0.6.19 thanks to A Wolf
  • layers inspired by .loom files allows their information lossless reading via read_loom() thanks to S Rybakov
  • initialization from pandas DataFrames thanks to A Wolf
  • iteration over chunks chunked_X() and chunk_X() thanks to S Rybakov
  • support for reading zarr files: read_zarr() thanks to T White
  • changed default compression to None in write_h5ad() to speed up read and write, disk space use is usually less critical 0.6.16
  • maintain dtype upon copy 0.6.13 thanks to A Wolf

Version 0.6 May 1, 2018

  • compatibility with Seurat converter
  • tremendous speedup for concatenate()
  • bug fix for deep copy of unstructured annotation after slicing
  • bug fix for reading HDF5 stored single-category annotations
  • ‘outer join’ concatenation: adds zeros for concatenation of sparse data and nans for dense data
  • better memory efficiency in loom exports

Version 0.5 February 9, 2018

Version 0.4 December 23, 2017

  • read/write .loom files
  • scalability beyond dataset sizes that fit into memory: see this blog post
  • AnnData has a raw attribute, which simplifies storing the data matrix when you consider it raw: see the clustering tutorial