Release notes

Contents

Release notes#

Version 0.11#

0.11.1 2024-11-12#

Bug fixes#

0.11.0 2024-11-07#

Release candidates:

  • rc3 2024-10-14

  • rc2 2024-09-24

  • rc1 2024-09-04

Bug fixes#

Breaking changes#

  • rc3 Drop support for python 3.9 @ilan-gold (#1712)

  • rc2 A new anndata.io module contains all read_* and write_* functions, and all imports of such functions should go through this module. Old ways of importing these functions i.e., from anndata import read_csv or from anndata._io.specs import read_elem will still work, but are now considered deprecated and give a warning on import with the exception of anndata.io.read_zarr() and anndata.io.read_h5ad(), which will remain at the top-level anndata without warning. @ilan-gold ({pr}1682`)

  • rc1 Removed deprecated modules anndata.core and anndata.readwrite @ivirshup (#1197)

  • rc1 No longer export sparse_dataset from anndata.experimental, instead exporting anndata.io.sparse_dataset() @ilan-gold (#1642)

  • rc1 Move RWAble and InMemoryElem out of experimental, renaming RWAble to AxisStorable and InMemoryElem to RWAble @ilan-gold (#1643)

Development Process#

  • rc2 Add extra dask dependency for installation i.e., pip install anndata[dask] @ilan-gold (#1677)

  • rc2 Remove shall_ from variable names in settings @ilan-gold (#1685)

  • rc1 Create new cupy installation options for cuda 11 & 12 called cu11 and cu12 @Intron7 (#1596)

Documentation#

Features#

Version 0.10#

0.10.9 2024-08-28#

Bug fixes#

Development Process#

  • create new cupy installation options for cuda 11 & 12 called cu11 and cu12 @Intron7 (#1596)

Documentation#

Performance#

0.10.8 2024-06-20#

Bug fixes#

Documentation#

0.10.7 2024-04-09#

Bug fixes#

  • Handle upstream numcodecs bug where read-only string arrays cannot be encoded @ivirshup #1421

  • Use in-memory sparse matrix directly to fix compatibility with scipy 1.13 @ilan-gold #1435

Performance#

  • Remove vindex for subsetting dask.array.Array because of its slowness and memory consumption @ilan-gold #1432

0.10.6 2024-03-11#

Bug fixes#

  • Defer import of zarr in test helpers, as scanpy CI job relies on them #1343 @ilan-gold

  • Writing a dataframe with non-unique column names now throws an error, instead of silently overwriting #1335 @ivirshup

  • Bring optimization from #1233 to indexing on the whole AnnData object, not just the sparse dataset itself #1365 @ilan-gold

  • Fix mean slice length checking to use improved performance when indexing backed sparse matrices with boolean masks along their major axis #1366 @ilan-gold

  • Fixed overflow occurring when writing dask arrays with sparse chunks by always writing dask arrays with 64 bit indptr and indices, and adding an overflow check to .append method of sparse on disk structures #1348 @ivirshup

  • Modified ValueError message for invalid .X during construction to show more helpful list instead of ambiguous __name__ #1395 @eroell

  • Pin array-api-compat!=1.5 to avoid incorrect implementation of asarray #1411 @ivirshup

Documentation#

  • Type hints and docstrings for .to_df method are updated and fixed #1402 @WeilerP

Development#

  • anndata’s CI now tests against minimum versions of it’s dependencies. As a result, several dependencies had their minimum required version bumped. See diff for details #1314 @ivirshup

  • anndata now tests against Python 3.12 #1373 @ivirshup

0.10.5 2024-01-25#

Bug fixes#

  • Fix outer concatenation along variables when only a subset of objects had an entry in layers #1291 @ivirshup

  • Fix comparison of >2d arrays in uns during concatenation #1300 @ivirshup

  • Fix IO with awkward array version 2.5.2 #1328 @ivirshup

  • Fix bug (introduced in 0.10.4) where indexing an AnnData with list[bool] would return the wrong result #1332 @ivirshup

Documentation#

Performance#

  • BaseCompressedSparseDataset’s indptr is cached #1266 @ilan-gold

  • Improved performance when indexing backed sparse matrices with boolean masks along their major axis #1233 @ilan-gold

0.10.4 2024-01-04#

Bug fixes#

  • Only try to use Categorical.map(na_action=…) in actually supported Pandas ≥2.1 #1226 @flying-sheep

  • AnnData.__sizeof__() support for backed datasets #1230 @Neah-Ko

  • adata[:, []] now returns an AnnData object empty on the appropriate dimensions instead of erroring #1243 @ilan-gold

  • adata.X[mask] works in newer numpy versions when X is backed #1255 @ilan-gold

  • adata.X[...] fixed for X as a BaseCompressedSparseDataset with zarr backend #1265 @ilan-gold

  • Improve read/write error reporting #1273 @flying-sheep

Documentation#

0.10.3 2023-10-31#

Bug fixes#

  • Prevent pandas from causing infinite recursion when setting a slice of a categorical column #1211 @flying-sheep

Documentation#

  • Stop showing “Support for Awkward Arrays is currently experimental” warnings when reading, concatenating, slicing, or transposing AnnData objects #1182 @flying-sheep

Other updates#

0.10.2 2023-10-11#

Bug fixes#

  • Added compatibility layer for packages relying on anndata._core.sparse_dataset.SparseDataset. Note that this API is deprecated and new code should use anndata.CSRDataset, ~anndata.CSCDataset, and anndata.sparse_dataset instead. #1185 @ivirshup

  • Handle deprecation warning from pd.Categorical.map thrown during anndata.concat #1189 @flying-sheep @ivirshup

  • Fixed extra steps being included in IO tracebacks #1193 @flying-sheep

  • as_dense argument of write_h5ad no longer writes an array without encoding metadata #1193 @flying-sheep

Performance#

0.10.1 2023-10-08#

Bug fixes#

  • Fix ad.concat erroring when concatenating a categorical and object column #1171 @ivirshup

0.10.0 2023-10-06#

Features#

GPU Support

Out of core

Improved errors and warnings

  • Improved error messages when combining dataframes with duplicated column names #1029 @ivirshup

  • Improved warnings when modifying views of AlingedMappings #1016 @flying-sheep @ivirshup

  • AnnDataReadErrors have been removed. The original error is now thrown with additional information in a note #1055 @ivirshup

Documentation#

Breaking changes#

Other updates#

Deprecations#

Bug fixes#

Version 0.9#

0.9.2 2023-07-25#

Bug fixes#

0.9.1 2023-04-11#

Bug fixes#

0.9.0 2023-04-11#

Features#

Documentation#

Breaking changes#

Other updates#

Deprecations#

Bug fixes#

  • Fix warning from rename_categories #790 I Virshup

  • Remove backwards compat checks for categories in uns when we can tell the file is new enough #790 I Virshup

  • Categorical arrays are now created with a python bool instead of a numpy.bool_ #856

  • Fixed order dependent outer concatenation bug #904 @ivirshup, reported by @szalata

  • Fixed bug in renaming categories #790 @ivirshup, reported by @perrin-isir

  • Fixed IO bug when keys in uns ended in _categories #806 @ivirshup, reported by @Hrovatin

  • Fixed raw.to_adata not populating obs aligned values when raw was assigned through the setter #939 @ivirshup

Version 0.8#

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 #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 #416 S Rybakov

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

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

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

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

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

  • Removed hard xlrd dependency I Virshup

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

Bug fixes#

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

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

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

Dependencies#

  • xlrd dropped as a hard dependency

  • Now requires h5py v3.0.0 or newer

Version 0.7#

0.7.8 9 November, 2021#

Bug fixes#

  • Re-include test helpers #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 #579 R Hillje

  • Fixed issue with .uns sub-dictionaries being referenced by copies #576 I Virshup

  • Fixed out-of-bounds integer indices not raising IndexError #630 M Klein

  • Fixed backed SparseDataset indexing with scipy 1.7.2 #638 I Virshup

Development processes#

  • Use PEPs 621 (standardized project metadata), 631 (standardized dependencies), and 660 (standardized editable installs) #639 I Virshup

0.7.6 11 April, 2021#

Features#

Bug fixes#

  • Fixed bug where np.str_ column names errored at write time #457 I Virshup

  • Fixed “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 #461 G Eraslan

  • Fixed adata.write_csvs when adata is a view #462 I Virshup

  • Fixed null values being converted to strings when strings are converted to categorical #529 I Virshup

  • Fixed handling of compression key word arguments #536 I Virshup

  • Fixed copying a backed AnnData from changing which file the original object points at #533 ilia-kats

  • Fixed a bug where calling AnnData.concatenate an AnnData with no variables would error #537 I Virshup

Deprecations#

0.7.5 12 November, 2020#

Functionality#

  • Added ipython tab completion and a useful return from .keys to adata.uns #415 I Virshup

Bug fixes#

  • Compatibility with h5py>=3 strings #444 I Virshup

  • Allow adata.raw = None, as is documented #447 I Virshup

  • Fix warnings from pandas 1.1 #425 I Virshup

0.7.4 10 July, 2020#

Concatenation overhaul #378 I Virshup#

  • New function anndata.concat() for concatenating AnnData objects along either observations or variables

  • New documentation section: Concatenation

Functionality#

  • AnnData object created from dataframes with sparse values will have sparse .X #395 I Virshup

Bug fixes#

  • Fixed error from AnnData.concatenate by bumping minimum versions of numpy and pandas #385

  • Fixed colors being incorrectly changed when AnnData object was subset #388

0.7.3 20 May, 2020#

Bug fixes#

  • Fixed bug where graphs used too much memory when copying #381 I Virshup

0.7.2 15 May, 2020#

Concatenation overhaul I Virshup#

  • Elements of uns can now be merged, see #350

  • Outer joins now work for layers and obsm, see #352

  • Fill value for outer joins can now be specified

  • Expect improvements in performance, see #303

Functionality#

  • obsp and varp can now be transposed #370 A Wolf

  • obs_names_make_unique() is now better at making values unique, and will warn if ambiguities arise #345 M Weiden

  • obsp 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 under uns["neighbors"]. Square matrices in uns will no longer be sliced (use .{obs,var}p instead). #337 I Virshup

  • ImplicitModificationWarning is now exported #315 P Angerer

  • Better support for ndarray subclasses stored in AnnData objects #335 michalk8

Bug fixes#

  • Fixed inplace modification of Index objects by the make unique function #348 I Virshup

  • Passing ambiguous keys to obs_vector() and var_vector() now throws errors #340 I Virshup

  • Fix instantiating AnnData objects from DataFrame #316 P Angerer

  • Fixed indexing into AnnData objects with arrays like adata[adata[:, gene].X > 0] #332 I Virshup

  • Fixed type of version #315 P Angerer

  • Fixed deprecated import from pandas #319 P Angerer

0.7.0 22 January, 2020#

Warning

Breaking changes introduced between 0.6.22.post1 and 0.7:

  • Elements of AnnDatas don’t have their dimensionality reduced when the main object is subset. This is to maintain consistency when subsetting. See discussion in #145.

  • Internal modules like anndata.core are private and their contents are not stable: See #174.

  • The old deprecated attributes .smp*. .add and .data have been removed.

View overhaul #164#

  • Indexing into a view no longer keeps a reference to intermediate view, see #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, see #145.

  • All elements of AnnData should now follow the same rules about how they’re subset, see #145.

  • Can now index by observations and variables at the same time.

IO overhaul #167#

  • Reading and writing has been overhauled for simplification and speed.

  • Time and memory usage can be half of previous in typical use cases

  • Zarr backend now supports sparse arrays, and generally is closer to having the same features as HDF5.

  • Backed mode should see significant speed and memory improvements for access along compressed dimensions and IO. PR #241.

  • Categoricals can now be ordered (PR #230) and written to disk with a large number of categories (PR #217).

Mapping attributes overhaul (obsm, varm, layers, …)#

  • New attributes obsp and varp have been added for two dimensional arrays where each axis corresponds to a single axis of the AnnData object. PR #207.

  • These are intended to store values like cell-by-cell graphs, which are currently stored in uns.

  • Sparse arrays are now allowed as values in all mapping attributes.

  • DataFrames are now allowed as values in obsm and varm.

  • All mapping attributes now share an implementation and will have the same behaviour. PR #164.

Miscellaneous improvements#

  • Mapping attributes now have ipython tab completion (e.g. adata.obsm["\\t can provide suggestions) PR #183.

  • AnnData attributes are now delete-able (e.g. del adata.raw) PR #242.

  • Many many bug fixes

Version 0.6#

0.6.0 1 May, 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#

0.5.0 9 February, 2018#

Version 0.4#

0.4.0 23 December, 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