Metadata-Version: 2.4
Name: hca-anndata-tools
Version: 0.4.0
Summary: Library for inspection, summarization, and statistics of AnnData h5ad files
License: MIT
Author: Clever Canary
Author-email: dave@clevercanary.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: anndata (>=0.10,<1)
Requires-Dist: h5py (>=3.8)
Requires-Dist: matplotlib (>=3.7)
Requires-Dist: numpy (<3)
Requires-Dist: pandas (>2,<3)
Requires-Dist: pydantic (>=2,<3)
Requires-Dist: scanpy (>=1.10)
Project-URL: Homepage, https://github.com/clevercanary/hca-validation-tools
Description-Content-Type: text/markdown

# hca-anndata-tools

Library for inspection, summarization, and statistics of AnnData h5ad files.

## Installation

```bash
pip install hca-anndata-tools
```

## Usage

```python
from hca_anndata_tools import get_summary, get_descriptive_stats, locate_files

# Find h5ad files
files = locate_files("/path/to/data")

# Get structural overview
summary = get_summary("/path/to/my_atlas.h5ad")

# Get column statistics
stats = get_descriptive_stats("/path/to/my_atlas.h5ad", columns=["cell_type"], value_counts=True)
```

## API

- **locate_files** - Find all .h5ad files in a directory
- **get_summary** - Structural overview: cell/gene counts, columns, embeddings, layers
- **get_storage_info** - HDF5 compression, chunking, sparse format details
- **get_descriptive_stats** - Descriptive statistics and value counts for obs/var columns
- **view_data** - View slices of any attribute (obs, var, X, obsm, uns, etc.)
- **plot_embedding** - UMAP/PCA scatter plots as base64 PNG
- **get_cap_annotations** - Inspect CAP cell annotation metadata

