Skip to content

migrate to beast3 - #10

Open
walterxie wants to merge 1 commit into
masterfrom
beast3
Open

walterxie wants to merge 1 commit into
masterfrom
beast3

Conversation

@walterxie

@walterxie walterxie commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Migrate TreeStat2 to BEAST 3 (BEAST v2.8)

Moves TreeStat2 from the BEAST 2.7 Ant build to a BEAST 3 Maven package that runs as a Java module (Java 25), following the beast3-migration skills and using starbeast2 as the reference.

Build and packaging

  • Maven layout: sources moved with git mv (history kept). Java is under src/main/java; the GUI images are under src/main/resources/treestat2/images.
  • pom.xml (new): io.github.compevol:treestat2:0.3.0-SNAPSHOT, Java 25.
    • BEAST 3 beast-base/beast-pkgmgmt 2.8.0-rc1.
    • io.github.compevol:ccd 1.2.2 and io.github.beast2-dev:beast-labs 2.1.1 from Maven Central.
    • beast-fx and javafx as optional dependencies, because CCD's API refers to beast-fx's TreeAnnotator.
    • commons-math3 3.6.1.
  • jam.jar: it isn't on Maven Central, so it moved to a Maven repository inside the project, lib/local/jam/1.0/, as local:jam:1.0.
  • module-info.java (new): module treestat2, with 3 exported packages and 57 BEASTInterface providers.
  • src/assembly/beast-package.xml (new): builds target/TreeStat2.v.zip. Its lib/ contains treestat2, jam and commons-math3, which the BEAST 3 runtime doesn't provide.
  • Zip name: ${beast.pkg.name}.v${project.version}, the same as beast3 and CCD, so there's no separately derived version property.
  • version.xml: version 0.2.0 → 0.3.0. Minimum dependency versions are now BEAST.base/BEAST.app 2.8.0, CCD 1.2.2 and BEASTLabs 2.1.1. Nothing else changed.
  • Removed: build.xml (Ant), .classpath and .project (Eclipse).
  • CI: added .github/workflows/ci-publish.yml, copied unchanged from beast3. It builds on master and publishes on v* tags.

Code changes

  • No BEAST 3 class replacements were needed. TreeStat2 only uses Tree, Node, TreeParser, TreeUtils and TreeIntervals, which are unchanged in BEAST 3 and not deprecated.
  • CCD API rename: CCD 1.2.2 renamed averageRFDistances(Tree) to expectedRFDistances(Tree), so CCD{0,1,2}ExpectedRFDistance were updated to match.

Documentation

  • README.md:
    • Updated for BEAST v2.8, with new Installation and "Running from source with Maven" sections.
    • Every existing applauncher TreeStatApp … examplehing mvn -q compile exec:exec@treestat-Dbeast.args="…" command.
  • tutorial/treestat2logger.md: builds with mvn packatalls into the BEAST 2.8 package directory.
  • Tutorial XML:
    • tutorial/updated_aln268_b3_draft.xml is a draft sn't run yet: it depends on BDMM and MultiTypeTree,which have no BEAST 3 release.
    • tutorial/TODO.md explains what's blocking it, whwhat's left.
    • The original updated_aln268.xml is unchanged, for BEAST 2.7.

Testing

  • mvn clean package passes. The project has no unit tests.
  • Every README command was run exactly as written, w-help, single and multiple statistics,--out-file/--out-tag, control file, full class names, --ccd-burn-in, and the RNNI/RF jump distances. The output files and columns
    were checked.
    • Via Maven, against the build.
    • Via applauncher on an installed BEAST 2.8.0, witough BEAST_PACKAGE_PATH alongside the installed CCD1.2.2 and BEASTLabs 2.1.1.
  • beast -validate on the draft tutorial XML fails astiTypeTree classes can't be found.

Known issues / follow-ups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant