CAP-AnnData: Partial I/O for AnnData (.h5ad) Files
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)
| File | Size | Uploaded | |
|---|---|---|---|
| cap_anndata-0.6.0.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|