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.

Metadata

Release files for cap_anndata 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cap_anndata 0.6.0
File Size Uploaded
cap_anndata-0.6.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cap_anndata 0.6.0
File Interpreter ABI Platform
cap_anndata-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.6 kB

Release files / cap_anndata-0.6.0.tar.gz

Download URL cap_anndata-0.6.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1e7bccd821f5e286e827745205d02b36aee1fb5d9cef2090bdf9a705b582c063
BLAKE2b-256 checksum
How to use checksums
d62ec8ee859095e9ce26988847ee9f0fd1c7213223acb91801e3464824bd7c3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release files / cap_anndata-0.6.0-py3-none-any.whl

Download URL cap_anndata-0.6.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c01841d6ab9efba4e2218369934b115c8ec4c56006eb456d2dac126b8f9242cb
BLAKE2b-256 checksum
How to use checksums
88d6816a8912c6edf888bc2f65556e868a7cec01c4c8ba651db476efe45edf19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release 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