Skip to content

v0.1.0 — a topology without support is not a result

Choose a tag to compare

@musharna musharna released this 30 Jul 15:03
22bd67e

First release. Phylogenetic inference over MCP, driving IQ-TREE 2 through
piqtree.

pip install phylokit-mcp

The rule

infer_tree always runs a bootstrap and always returns per-clade support. There
is no flag to skip it, because a maximum-likelihood tree looks identical whether
or not the data support it.

Measured on alignments simulated from a known 7-taxon tree, so the right answer
is not in doubt:

sites informative sites recovered the true tree? lowest clade support
300 51 yes, exactly 1.00
60 11 no — RF 2 0.57

At 60 sites the tree contains a clade (C,D,G) that does not exist and omits one
that does (E,F,G). Both runs return a fully resolved Newick string of the same
shape — nothing about the topology distinguishes them. The support values do, and
the false clade is the lowest-supported one in the tree.

What it reports that a Newick string cannot

  • Conflicting clades — groupings the data support at ≥0.70 that are absent
    from the reported tree. A support-annotated Newick string has nowhere to attach
    these, so the standard format drops them silently. Support is computed in-server
    (Felsenstein 1985) because piqtree 0.8.3 runs bootstrap_replicates but does not
    expose the values — which turned out to be the reason this is visible at all.
  • Model runners-up with ΔAIC. On a 400-site alignment simulated under JC,
    the AIC winner is F81 — a model the data were not generated under — with
    several models inside the conventional ±2 margin. A winner without its margin is
    a claim the numbers do not support.
  • Length versus evidencen_parsimony_informative alongside n_sites.

Reproducibility, stated rather than claimed

Across fresh processes the same request reproduces byte-identically. Within one
long-lived process it does not: passing the same rand_seed does not fully reset
IQ-TREE's internal state. Measured drift over six repeated 50-replicate calls was
0.02 on one of four clades — a single replicate flipping, inside the
bootstrap's own sampling error. Every response reports this, because an MCP server
is long-lived by design and that is exactly the condition which exposes it.

Licence

GPL-2.0-only, and the "only" is load-bearing: piqtree declares GPL-2.0-only,
which is incompatible with GPL-3.0, so the distributed combination cannot be GPL-3.


5 tools · 62 tests against real IQ-TREE with no mocked engine · 10 mutation checks
· a real-process JSON-RPC handshake test. Attached artifacts are byte-identical to
those on PyPI (sha256 verified).