Metadata-Version: 2.4
Name: genomic-attribute-index
Version: 0.2.2
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Summary: Python bindings for the deterministic Genomic Attribute Index
Author: GAI contributors
License: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# `genomic-attribute-index` Python bindings

The `gai` package wraps the Rust Genomic Attribute Index builder and indexed reader.
It provides deterministic GAI construction, TBI/CSI-backed exact, prefix,
contains, or regex attribute queries, structured records and metadata, and
typed exceptions for stale or corrupt inputs.

```python
from pathlib import Path
import gai

gai.sort(Path("annotations.gff3.gz"), Path("annotations.sorted.gff3"))

source = Path("annotations.gff3.gz")
tbi = Path("annotations.gff3.gz.tbi")
gai.build_index(source, tbi, Path("annotations.gff3.gz.gai"), ["Name"])
records = gai.query_index(source, tbi, Path("annotations.gff3.gz.gai"), "BRCA1")
prefix_records = gai.query_index(
    source, tbi, Path("annotations.gff3.gz.gai"), "BRCA", match="prefix"
)
contains_records = gai.query_index(
    source, tbi, Path("annotations.gff3.gz.gai"), "RCA", match="contains"
)
regex_records = gai.query_index(
    source, tbi, Path("annotations.gff3.gz.gai"), r"^BRCA[0-9]+$", match="regex"
)
```

See the repository README for the complete API and development instructions.

