Metadata-Version: 2.1
Name: pango-aliasor
Version: 0.1.5
Summary: Pango lineage aliasing and dealiasing
Home-page: https://github.com/corneliusroemer/pango_aliasor
Author: Cornelius Roemer
Author-email: cornelius.roemer@gmail.com
License: : OSI Approved :: MIT License
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

[![Python package](https://github.com/corneliusroemer/pango_aliasor/actions/workflows/pytest.yaml/badge.svg)](https://github.com/corneliusroemer/pango_aliasor/actions/workflows/pytest.yaml)

Python convenience library to translate between aliased and unaliased Pango lineages

Useful for:
- constructing a tree of Pango lineages
- semantic sorting of Pango lineages
- ...

## Usage

```python
from pango_aliasor.aliasor import Aliasor

# Initalize aliasor (only needs to be done once)
# If no alias_key.json is passed, downloads the latest version from github
aliasor = Aliasor()

# To use custom alias_key.json, pass the relative path to the file
# aliasor = Aliasor('alias_key.json')

# Go from aliased lineage to unaliased lineage
aliasor.uncompress("BA.5") # 'B.1.1.529.5'
aliasor.uncompress("BE.5") # 'B.1.1.529.5.3.1.5'
aliasor.uncompress("XA") # 'XA'

# Go from unaliased lineage to aliased lineage
aliasor.compress("B.1.1.529.3.1") # 'BA.3.1'
```

See [tests](tests/test_aliasor.py) for more examples.

## Installation

```bash
pip install pango_aliasor
```

## Testing

Run `pytest` from the project root to run all tests.

## Release

