anndata - Annotated Data
AnnData
provides a scalable way of keeping track
of data and learned annotations.
See Scanpy’s documentation for usage related to single cell data.
Discuss development on GitHub.
Install via
pip install anndata
orconda install anndata -c conda-forge
.anndata was initially built for Scanpy (Genome Biology, 2018).
News
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. It wasn’t anticipated that the initial idea of sharing and backing an on-disk representation of AnnData
would become so widely adopted. Curious? Read up more on the format.
Latest additions
0.7.8 9 November, 2021
Bug fixes
Re-include test helpers PR 641 I Virshup
0.7.7 9 November, 2021
Bug fixes
Fixed propagation of import error when importing
write_zarr
but not all dependencies are installed PR 579 R HilljeFixed issue with
.uns
sub-dictionaries being referenced by copies PR 576 I VirshupFixed out-of-bounds integer indices not raising
IndexError
PR 630 M KleinFixed backed
SparseDataset
indexing with scipy 1.7.2 PR 638 I Virshup
Development processes
Use PEPs 621 (standardized project metadata), 631 (standardized dependencies), and 660 (standardized editable installs) PR 639 I Virshup
0.7.6 11 April, 2021
New features
Added
anndata.AnnData.to_memory()
for returning an in memory object from a backed one PR 470 PR 542 V Bergen I Virshupanndata.AnnData.write_loom()
now writesobs_names
andvar_names
using theIndex
’s.name
attribute, if set PR 538 I Virshup
Bug fixes
Fixed bug where
np.str_
column names errored at write time PR 457 I VirshupFixed “value.index does not match parent’s axis 0/1 names” error triggered when a data frame is stored in obsm/varm after obs_names/var_names is updated PR 461 G Eraslan
Fixed
adata.write_csvs
whenadata
is a view PR 462 I VirshupFixed null values being converted to strings when strings are converted to categorical PR 529 I Virshup
Fixed handling of compression key word arguments PR 536 I Virshup
Fixed copying a backed
AnnData
from changing which file the original object points at PR 533 ilia-katsFixed a bug where calling
AnnData.concatenate
anAnnData
with no variables would error PR 537 I Virshup
Deprecations
Passing positional arguments to
anndata.read_loom()
besides the path is now deprecated PR 538 I Virshupanndata.read_loom()
argumentsobsm_names
andvarm_names
are now deprecated in favour ofobsm_mapping
andvarm_mapping
PR 538 I Virshup
0.7.5 12 November, 2020
Functionality
Added ipython tab completion and a useful return from
.keys
toadata.uns
PR 415 I Virshup
Bug fixes
0.7.4 10 July, 2020
Concatenation overhaul PR 378 I Virshup
New function
anndata.concat()
for concatenatingAnnData
objects along either observations or variablesNew documentation section: Concatenation
Functionality
AnnData object created from dataframes with sparse values will have sparse
.X
PR 395 I Virshup
Bug fixes
0.7.3 20 May, 2020
Bug fixes
Fixed bug where graphs used too much memory when copying PR 381 I Virshup
0.7.2 15 May, 2020
Concatenation overhaul I Virshup
Elements of
uns
can now be merged, see PR 350Outer joins now work for
layers
andobsm
, see PR 352Fill value for outer joins can now be specified
Expect improvments in performance, see issue 303
Functionality
obs_names_make_unique()
is now better at making values unique, and will warn if ambiguities arise PR 345 M Weidenobsp
is now preferred for storing pairwise relationships between observations. In practice, this means there will be deprecation warnings and reformatting applied to objects which stored connectivities underuns["neighbors"]
. Square matrices inuns
will no longer be sliced (use.{obs,var}p
instead). PR 337 I VirshupImplicitModificationWarning
is now exported PR 315 P AngererBetter support for
ndarray
subclasses stored inAnnData
objects PR 335 michalk8
Bug fixes
Fixed inplace modification of
Index
objects by the make unique function PR 348 I VirshupPassing ambiguous keys to
obs_vector()
andvar_vector()
now throws errors PR 340 I VirshupFix instantiating
AnnData
objects fromDataFrame
PR 316 P AngererFixed indexing into
AnnData
objects with arrays likeadata[adata[:, gene].X > 0]
PR 332 I VirshupFixed type of version PR 315 P Angerer