Skip to main content

CAP-AnnData: Partial I/O for AnnData (.h5ad) Files

PyPI version Build Status

Overview

CAP-AnnData offering functionalities for selective reading and writing of AnnData file fields without the need for loading entire dataset (or even entire field) into memory. For example, it allows to read and modify the single obs column taking nothing into memory except the column itself. Package eager to replicate the original AnnData API as much as possible, while providing additional features for efficient data manipulation for heavy datasets.

Installation

Install CAP-AnnData via pip:

pip install -U cap-anndata

Basic Example

The example below displayes how to read a single obs column, create new obs column and propagate it to the .h5ad file.

from cap_anndata import read_h5ad

file_path = "your_data.h5ad"
with read_h5ad(file_path=file_path, edit=True) as cap_adata:
    print(cap_adata.obs_keys())  # ['a', 'b', 'c']
    print(cap_adata.obs) # Empty DataFrame
    cap_adata.read_obs(columns=['a'])
    print(cap_adata.obs.columns) # ['a']
    cap_adata.obs['new_col'] = cap_adata.obs['a']
    cap_adata.overwrite(fields=['obs'])

More example can be found in the How-TO file.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cap_anndata-0.5.3.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cap_anndata-0.5.3-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file cap_anndata-0.5.3.tar.gz.

File metadata

  • Download URL: cap_anndata-0.5.3.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for cap_anndata-0.5.3.tar.gz
Algorithm Hash digest
SHA256 e4bab5f2b65e019c5bf529e1b02cd0dd3995130f739d5659dda79d90c258c21b
MD5 325ef5045bb19a525ebdf450942919e9
BLAKE2b-256 bfc6f04f30622597d31c9b42c0e66eb525ee9d6b53bc0840c597f333f9881c71

See more details on using hashes here.

File details

Details for the file cap_anndata-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: cap_anndata-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for cap_anndata-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 30f742b79ae6d85c1fd263f1af8db36e0d48f5d2d3eba1ac70e161a1b79cbd5b
MD5 b4fb29781a445780c3a9c00db06ad19b
BLAKE2b-256 b6515b5a9c553fceb6fc67b65293e1e16f351f41e334deedcf6d9a4549decbc6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page