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.6.0.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.6.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cap_anndata-0.6.0.tar.gz
Algorithm Hash digest
SHA256 1e7bccd821f5e286e827745205d02b36aee1fb5d9cef2090bdf9a705b582c063
MD5 ebf610bca9859e7ac12d7d17004025eb
BLAKE2b-256 d62ec8ee859095e9ce26988847ee9f0fd1c7213223acb91801e3464824bd7c3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cap_anndata-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c01841d6ab9efba4e2218369934b115c8ec4c56006eb456d2dac126b8f9242cb
MD5 cf3dc0caef55bbd6d88924294145fac1
BLAKE2b-256 88d6816a8912c6edf888bc2f65556e868a7cec01c4c8ba651db476efe45edf19

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page