Skip to main content

Python package

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

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'

# Find parent lineage
aliasor.parent("BQ.1") # 'BE.1.1.1'

aliasor.partial_compress("B.1.1.529.3.1",up_to=1) # 'BA.3.1'
aliasor.partial_compress("B.1.1.529.3.1.1.2",up_to=1) # 'BA.3.1.1.2'

aliasor.partial_compress("B.1.1.529.3.1",accepted_aliases=["AY"]) # 'B.1.1.529.3.1'
aliasor.partial_compress("B.1.617.2",accepted_aliases=["AY"]) # 'AY.2'

aliasor.partial_compress('B.1.1.529.2.75.1.2',up_to=4, accepted_aliases={"BA"}) == 'BL.2'

See tests for more examples.

Installation

pip install pango_aliasor

Testing

Run pytest from the project root to run all tests.

Release

  1. Bump version in setup.cfg
  2. Release using gh release create
  3. Build using python3 -m build
  4. Publish to Pypi using twine upload dist/pango_aliasor*

Metadata

Release files for pango-aliasor 0.3.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 pango-aliasor 0.3.0
File Size Uploaded Provenance
pango_aliasor-0.3.0.tar.gz 4.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pango-aliasor 0.3.0
File Interpreter ABI Platform
pango_aliasor-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / pango_aliasor-0.3.0.tar.gz

Download URL pango_aliasor-0.3.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0e48154796e40515e481589bc628bb31d153ba652b42dbe174b9a7f32dc85a72
BLAKE2b-256 checksum
How to use checksums
9b8ded8a8d5e0dbe4ef9206d9a5c424f4232870c50509c1fbe38bd7393e16810
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / pango_aliasor-0.3.0-py3-none-any.whl

Download URL pango_aliasor-0.3.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80c2d9eb37d150f9e67e8111e166feb12a849ad715937c4c21a34b016d48302e
BLAKE2b-256 checksum
How to use checksums
076057dc4c7698e05c0fb650a851c3afbdafa3843313c61baf6f761c0d780d35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Security for pango-aliasor 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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