Skip to main content

BABAPPA: neutral-model calibrated gene-level evolutionary dispersion analysis

Project description

BABAPPA

BABAPPA is a Python package for gene-level detection of excess evolutionary dispersion relative to an explicit neutral model.

It implements a conservative, reproducible workflow around codon alignments and phylogenetic trees with explicit null-model calibration and exact Monte Carlo rank p-values.

What BABAPPA does

  • Computes gene-level dispersion in a bounded codon representation space.
  • Fits a frozen neutral reference model from simulated null data.
  • Scores observed genes against the frozen null model.
  • Computes exact one-sided Monte Carlo p-values and multiple-testing adjusted q-values.
  • Produces QC summaries, site-level contributions, plots, and an HTML report.
  • Supports sensitivity analysis over key null and smoothing settings.

What BABAPPA does not do

  • BABAPPA does not directly infer positive selection at specific sites or branches.
  • BABAPPA is not a replacement for codeml/HyPhy; it is complementary for detecting gene-level deviation from a configured neutral model.
  • Significant BABAPPA results may reflect adaptation, relaxation, composition/alignment/tree issues, or other null-model deviations.

Installation

pip install babappa

For development:

pip install -e .[dev]

Quick demo

babappa demo --outdir demo_run --seed 7

Minimal workflow

babappa validate \
  --alignment examples/small_demo/geneA.fasta \
  --tree examples/small_demo/tree.nwk \
  --outdir run/validate

babappa fit-null \
  --alignment examples/small_demo/geneA.fasta \
  --tree examples/small_demo/tree.nwk \
  --outdir run/fit_null \
  --seed 7

babappa score \
  --alignment examples/small_demo/geneA.fasta \
  --tree examples/small_demo/tree.nwk \
  --bundle run/fit_null/null_bundle.json \
  --outdir run/score \
  --seed 7

babappa adjust --scores run/score/scores.tsv --outdir run/adjust
babappa report --scores run/adjust/scores_adjusted.tsv --outdir run/report

Output interpretation

A significant gene indicates that observed dispersion exceeds null expectation under the configured neutral model. Interpret cautiously when QC/sensitivity flags indicate high gaps, ambiguity, low taxon coverage, branch-length imbalance, or unstable sensitivity results.

Citation

If you use BABAPPA, cite the BABAPPA manuscript and this software release.

Support

Please open issues on GitHub with command, config, log, and manifest files.

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

babappa-1.0.0rc2.tar.gz (43.0 kB view details)

Uploaded Source

Built Distribution

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

babappa-1.0.0rc2-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file babappa-1.0.0rc2.tar.gz.

File metadata

  • Download URL: babappa-1.0.0rc2.tar.gz
  • Upload date:
  • Size: 43.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for babappa-1.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 55775c6295ebfc78e51cf01415b2676664017f7c46ec776f88a733f20e2ec6d9
MD5 b0d7b2e9335a45fcee808aac5e08659d
BLAKE2b-256 ea86e1d522f972a4c4f6ac88a1a217a4adfeccc0bbd88b9afca0d9d94a9e7836

See more details on using hashes here.

File details

Details for the file babappa-1.0.0rc2-py3-none-any.whl.

File metadata

  • Download URL: babappa-1.0.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 50.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for babappa-1.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 99d765e022085d81e7a188039ba79254d0fe8e41c071e2e573a6df2a83f4b9c5
MD5 8db2dd4d6b519841b5828b4f244be66c
BLAKE2b-256 81f9572ce1dbdd4be5b4650ff2e47f3bef23c766c8d167c0f2579ed7a95883ea

See more details on using hashes here.

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