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.1.tar.gz (16.6 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.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cap_anndata-0.5.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for cap_anndata-0.5.1.tar.gz
Algorithm Hash digest
SHA256 e63160b8d03461e2e902923d86d19f0782f6f69975f5d45cea95c0f15e8a29b5
MD5 72c2ff00b28c9ada4cd347f25f8f85bd
BLAKE2b-256 8b15a394e26dd1c8b072c74cdb641ef8f6365fbd44fe4c42bd8079c94e14c855

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cap_anndata-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5606c95859e3ad6eb2d1fc41aba444e61aa10670bf676abe205bc9508351bb9
MD5 96d60cd44b6099c1e27bdd8ac3f276e1
BLAKE2b-256 dbf060d4b716e1988f93bc05d79b4dcf74442b4524ff373f05a645ce2a725719

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