5 releases

0.3.2 Mar 13, 2024
0.3.1 Feb 28, 2024
0.3.0 Feb 28, 2024
0.2.2 Feb 1, 2024
0.2.1 Dec 21, 2023

#175 in Caching

Download history 17/week @ 2023-12-18 28/week @ 2023-12-25 61/week @ 2024-01-01 15/week @ 2024-01-15 12/week @ 2024-01-29 6/week @ 2024-02-05 1/week @ 2024-02-12 46/week @ 2024-02-19 331/week @ 2024-02-26 102/week @ 2024-03-04 258/week @ 2024-03-11 9/week @ 2024-03-18 16/week @ 2024-03-25 84/week @ 2024-04-01

386 downloads per month

MIT license

555KB
14K SLoC

anndata-rs: A Rust/Python package for reading data in the h5ad format

Motivation

The goal of this library is to complement the anndata package by providing an out-of-core AnnData implementation.

Unlike the backed mode in the anndata package, anndata-rs's AnnData object is fully backed and always stays in sync with the data stored in the hard drive.

Here are the key features of this implementation:

  • AnnData is fully backed by the underlying hdf5 file. Any operations on the AnnData object will be reflected on the hdf5 file.
  • All elements are lazily loaded. No matter how large is the file, opening it consume almost zero memory. Matrix data can be accessed and processed by chunks, which keeps the memory usage to the minimum.
  • In-memory cache can be turned on to speed up the repetitive access of elements.
  • An AnnDataSet object to lazily concatenate multiple AnnData objects.

Limitations:

  • Only a subset of the h5ad specifications are implemented. For example, the .layer and .raw is not supported. To request a missing feature, please open a new issue.
  • No views. Subsetting the AnnData will modify the data inplace or make a copy.

Installation

We do not provide installation instructions here. Right now this package is bundled with the SnapATAC2 package. Please install SnapATAC2 to get these features.

Tutorials

Click here to read tutorials.

Dependencies

~62MB
~1M SLoC