Skip to main content

BABAPPAΩ: Likelihood-free branch-aware episodic selection burden inference

Project description

BABAPPAΩ

DOI DOI

BABAPPAΩ is a likelihood-free neural inference framework for diagnosing the identifiability of episodic selection under branch–site evolution. Rather than performing hypothesis tests or estimating substitution parameters, BABAPPAΩ reframes branch–site analysis as the measurement of latent episodic selection burden supported by finite codon alignments.

The framework combines a forward-time mutation–selection simulator grounded in population-genetic theory with a frozen, amortized neural inference model trained against exact generative ground truth. Its purpose is diagnostic: to assess when episodic selection is statistically measurable, at what scale, and under which evolutionary regimes.

BABAPPAΩ is not a replacement for likelihood-based branch–site tests. Instead, it provides a principled way to study the limits of identifiability in branch–site evolution under biologically realistic complexity.


Key Features

• Likelihood-free branch–site inference via amortized neural models
• Estimation of latent episodic selection burden, not hypothesis testing
• Forward-time mutation–selection simulation with exact ground truth
• Robust to recombination, epistasis, transient fitness shifts, and alignment noise
• GPU-accelerated inference with automatic CPU fallback
• Deterministic, fully reproducible execution
• Clean command-line interface for exploratory and large-scale scans
• Strict separation between inference software and frozen model artifacts


Installation

Install BABAPPAΩ directly from PyPI:

pip install babappaomega

Python ≥ 3.9 is required.


Basic Usage

babappaomega --alignment alignment.fasta --tree tree.nwk --out results.json

Each run performs a branch-conditioned exploratory scan, treating each branch in turn as foreground. In addition to machine-readable output, BABAPPAΩ automatically generates a human-readable interpretation report (results.txt).


Output

BABAPPAΩ produces two complementary outputs.

Machine-readable JSON: • Site-level episodic deviation (burden) scores
• Branch-level deviation from background evolutionary patterns
• Stable metadata describing software version, model hash, and runtime context

Human-readable interpretation report: • Ranked branches showing strongest deviation from background
• Sites exhibiting elevated episodic burden
• Conservative biological interpretation notes
• Explicit warnings against over-interpretation


Interpreting Results

BABAPPAΩ does not report likelihood ratios, dN/dS estimates, p-values, or binary calls of positive selection. Scores are relative, not absolute. High burden indicates lineage-specific deviation, not guaranteed adaptation. Signals are often diffuse rather than sharply localized. Uninformative output under neutrality reflects correct calibration.

Episodic selection is frequently identifiable only at aggregate (gene-level) scales, long before it becomes localizable to individual sites. BABAPPAΩ is explicitly designed to expose this scale dependence.


Model Weights and Reproducibility

BABAPPAΩ uses a single frozen reference neural model archived on Zenodo (https://doi.org/10.5281/zenodo.18195868). Artifact: babappaomega.pt.

The trained model is not bundled with the Python package. On first execution the frozen model is downloaded automatically from Zenodo, the SHA-256 checksum is verified, the artifact is cached locally, and subsequent runs reuse the cached model. Retraining or fine-tuning is intentionally not supported.


Training Code and Simulation Artifacts

All training scripts, simulator code, and epoch-level artifacts used to train BABAPPAΩ are archived separately on figshare (https://doi.org/10.6084/m9.figshare.31199098). These materials are provided for transparency and auditability, not for routine end-user retraining.


Performance

Inference is GPU-accelerated when available and automatically falls back to CPU execution otherwise. The software is suitable for high-throughput exploratory scans across genes, branches, and datasets on commodity hardware.


License

MIT License


Development Status

The inference engine, command-line interface, model freezing protocol, and distribution pipeline are finalized and stable. Ongoing work focuses on expanded benchmarking against classical likelihood-based methods, additional documentation and worked examples, and large-scale empirical applications.


Citation

Until the accompanying manuscript is published, please cite:

Sinha, K. BABAPPAΩ: Diagnosing the identifiability of episodic selection under branch–site evolution using likelihood-free neural inference. Zenodo. https://doi.org/10.5281/zenodo.18195868

Training and simulation artifacts: figshare. https://doi.org/10.6084/m9.figshare.31199098

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

babappaomega-1.3.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

babappaomega-1.3.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file babappaomega-1.3.0.tar.gz.

File metadata

  • Download URL: babappaomega-1.3.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for babappaomega-1.3.0.tar.gz
Algorithm Hash digest
SHA256 757937ae8eabf96276600e7e3b6371f2d3013ef3c461fd09fb0bc5df8a9baf6d
MD5 ae7cf61788538c885a0db8cd8b2eadf0
BLAKE2b-256 53d775d23d465ce283e1fcd5b667fc234b5aa66cd0de1038f01497b3d7798ab7

See more details on using hashes here.

Provenance

The following attestation bundles were made for babappaomega-1.3.0.tar.gz:

Publisher: publish.yml on sinhakrishnendu/babappaomega

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file babappaomega-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: babappaomega-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for babappaomega-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7860695ad1504b7b73c8ab159d3593c8889366c877b8a21d2b9f32b39a74973c
MD5 78d7e3817fc50809293e00e8155475a7
BLAKE2b-256 41a86235960af3a7487f7f285794598b9870859bfe0c41725b1fc94c7ca3b45f

See more details on using hashes here.

Provenance

The following attestation bundles were made for babappaomega-1.3.0-py3-none-any.whl:

Publisher: publish.yml on sinhakrishnendu/babappaomega

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page