Skip to main content

BeastXPy

BeastXPy generates, validates and diagnoses BEAST 1 divergence-time analyses. It turns a strict YAML description into a BEAST XML document, checks that document against the packaged official BEAST 1.10.4 and BEAST X 10.5.0 jars (Gate 3; the evidence each mode proves is described under Verification), runs the seed matrix, and reports what the MCMC output actually looks like.

Version 0.1.0. Python 3.10+.

Install

python -m pip install .
beastxpy --version

Both BEAST jars ship inside the package, so Gate 3 works without a separate BEAST installation. A JDK is needed for validation and runs (JAVA_HOME); native BEAGLE is needed for a real likelihood (BEASTX_BEAGLE_1_10_4_LIB, BEASTX_BEAGLE_10_5_0_LIB). Step-by-step setup: docs/en/installation.md.

The six-command workflow

beastxpy generate --config examples/config_subst_jc69.yaml --output out.xml --beast-validate
beastxpy check-data --config examples/config_subst_jc69.yaml
beastxpy run --config examples/config_subst_jc69.yaml --workdir runs/demo --seeds 1,2
beastxpy assess runs/demo --json runs/demo/assessment.json
beastxpy report runs/demo --output runs/demo/report.html --lang en
beastxpy lock --config examples/config_subst_jc69.yaml --output beastxpy.lock

These six are the everyday workflow; beastxpy --help lists all 21 commands (quick, validate, trace, tree-annotate, logcombine, compare, pipeline, reproduce, ...). beastxpy capabilities prints the authoritative feature x version matrix.

What it does not do

BeastXPy does not assert convergence, does not select models, and does not judge whether a model suits your data. assess is diagnostics; compare computes marginal likelihoods and leaves the interpretation to you. See docs/en/limitations.md.

BeastXPy targets the BEAST 1 lineage (1.10.4) and its maintained continuation BEAST X 10.5.0, not BEAST 2. BEAST 2 is a different program with a different XML schema and package ecosystem; existing BEAST 1 analyses and models (EBSP, StarBEAST1, random local clocks, empirical codon models, MDS) require that lineage. The novelty claimed here is the combination of four validation gates, packaged official jars, honest multi-chain diagnostics and lock-file reproducibility — not "YAML to XML" by itself. A comparison with BEAUti, babette (BEAST 2), BEASTifier, RevBayes and BEASTling is in docs/en/index.md#positioning; the Chinese overview is in README.zh-CN.md and docs/zh/index.md.

Documentation

English: docs/en/index.md · 中文 · docs/zh/index.md

Installation, quick start, configuration, the full CLI reference, the four validation gates, native BEAGLE, pipelines, assessment, reporting, model comparison, reproducibility, custom XML fragments, containers, troubleshooting, the Python API, development notes, limitations and an FAQ.

Verification

The repository carries three reproducible checks:

python -m pytest -q
python tools/official_validate.py --matrix "examples/config_*.yaml" --mode java-core
python tools/validate_coverage.py

Validation evidence is layered, and every claim in this README and in beastxpy capabilities uses java-core unless it names beagle:

Mode Parsers Likelihood What it proves
parse, java-core official BEAST parsers plus BeastXPy's TreeLikelihood shim none (construct-only) the XML is accepted and the model graph can be built
beagle full official parser set real native hmsbeagle likelihood full parser + likelihood validation

Only beagle is full official validation. Run the all-example matrix on each platform and BEAST version you intend to claim, and report the platform x BEAST version x example count from that run:

python tools/official_validate.py --matrix "examples/config_*.yaml" \
    --mode beagle --versions 1.10.4 10.5.0

See docs/en/validation.md for the mode details, including a recorded platform x version x example-count matrix (16/16 in beagle mode for both BEAST 1.10.4 with BEAGLE 3.1.2 and BEAST X 10.5.0 with BEAGLE 4.0.1 on the validation host).

pytest -q intentionally fails the Gate-3 tests on a machine without a JDK (fail-not-skip is a locked policy). For the Java-free subset use:

python -m pytest -q -m "not java"

CI runs the full suite (with a JDK and BEAST) on 3 OSes x 2 Python versions x 2 BEAST versions, plus a build-from-source beagle evidence job and a byte-level xml_spec.json drift guard.

Data availability

The alignments under examples/ are short published/reference sequences used only to exercise the workflow; no new empirical data were generated for this repository. They are not intended for biological inference. Validation logs recorded for the paper are in docs/en/validation.md. The end-to-end reference-data case study (config, generated XML, lock, assessment and report) is in examples/empirical/; it uses the same shipped tutorial alignment and is explicitly a workflow demonstration, not a biological result.

Author

BeastXPy is developed and maintained by ZengZichao (曾子超) —zengzichao@sjtu.edu.cn · ORCID 0000-0001-6553-970X.

Licence

MIT AND LGPL-2.1-only. BEAST itself is LGPL-2.1-only and the jars keep their own META-INF/LICENSE.txt and META-INF/NOTICE.txt. See LICENSE and NOTICE.

Metadata

Release files for beastxpy 0.1.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 beastxpy 0.1.0
File Size Uploaded Provenance
beastxpy-0.1.0.tar.gz 20.8 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for beastxpy 0.1.0
File Interpreter ABI Platform
beastxpy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.5 MB

Release files / beastxpy-0.1.0.tar.gz

Download URL beastxpy-0.1.0.tar.gz
Size 20.8 MB
Tags Source
SHA-256 checksum
How to use checksums
30e02f17d1b9f0264041650278df568fea7095af4dcda98d8e2926604bc37dd0
BLAKE2b-256 checksum
How to use checksums
b5b3a6b04ed8ac21b6ce83010794af1443e604dc8df9a7985159f821d7c1f867
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / beastxpy-0.1.0-py3-none-any.whl

Download URL beastxpy-0.1.0-py3-none-any.whl
Size 20.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b64cb7cc5a0dc9554d535601fb9930c07149a6856651fab435c987609cf183c7
BLAKE2b-256 checksum
How to use checksums
334e86d9542d7f65b4276ff1ee8714096e514d04c84e0ee2cfdd879fcc9673a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for beastxpy 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for beastxpy-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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