Learning center

Matching splits: minimum cost, saved alignments and rounded summaries

Read the retained six-taxon assignment, its complete alignment and native export, with explicit distinctions between minimum cost, display limits and formatted summary precision.

Matching Split Distance pairs the internal splits of two trees to minimize their total mismatch cost. Keep the split labels, chosen alignment and rounded summary fields together when reading its result.

Scope of this guide. One retained native workflow compares a synthetic six-taxon pair. Separate small checks cover assignment order and selected unresolved-tree cases. A saved-only review on 11 November 2026 compared snapshot 91220f38… with the executed snapshot: eleven selected functions and three shared dependency files match. The full app files differ, so this is not a new whole-app run, real-data benchmark or full-method acceptance.

Product and app: Computational Biology · Tree Comparison & Topology Metrics · computational_biology/Tree comparison.

1. Keep the named input pair

The first input is named Caterpillar AB / ABC / EF, and the second Caterpillar AC / ACD / BF. Their exact Newick strings are:

(((A,B),C),(D,(E,F)));
(((A,C),D),(E,(B,F)));

Both contain A through F, with no branch lengths supplied. Preserve names, order, labels and original strings. The source’s supplied-tree path requires at least four taxa and matching taxon sets; this route also checks unique, nonempty leaf labels. It uses the first two parsed trees. The small retained cases do not establish general Newick-parser acceptance.

The native review supplied the named-tree bundle when the app opened, then exercised Run, the viewer and Export All. It did not test a Load dialog, launcher, hosted upload or sequence-inference workflow. Confirm the delivery contract before planning a run. In the reviewed source, all twenty methods start selected; retain only Matching Split, identified by matching_split_distance, for this example.

2. Read the split costs before the assignment

A nontrivial unrooted split divides the taxa into two unordered groups, with at least two taxa on each side. This route ignores branch lengths. The cost between two splits is the smaller membership mismatch after accounting for the two possible orientations. If one tree has fewer splits, extra unmatched positions use the size of the other split’s smaller side as their cost.

The TreeCmp paper’s Matching Split section describes this minimum-assignment definition. It supplies methodological context; this example does not execute Java TreeCmp or establish equivalent parser, performance or real-data behavior.

The following matrix is read from the retained independent reference and native figure record. Its column labels stand for the second tree’s splits:

  • C1: A,C|B,D,E,F
  • C2: A,C,D|B,E,F
  • C3: A,C,D,E|B,F
First-tree splitC1C2C3
A,B|C,D,E,F232
A,B,C|D,E,F123
A,B,C,D|E,F212

The reference recorded all six possible assignment totals as 6, 6, 6, 8, 4 and 6. Its unique minimum is 4. A previously recorded greedy example gives 6. Choosing the cheapest available pair one step at a time is therefore not the accepted minimum-assignment contract. This guide does not repeat either calculation.

3. Preserve all three chosen pairs

First splitMatched second splitCost
A,B|C,D,E,FA,C,D,E|B,F2
A,B,C|D,E,FA,C|B,D,E,F1
A,B,C,D|E,FA,C,D|B,E,F1

Each split participates once. These membership costs have no physical unit and do not identify actual evolutionary events. The two trees in this native case have three splits each, so no dummy pair is used. Separate numerical checks cover unequal split counts in both directions; they are not additional native exports.

The source uses the installed SciPy minimum-assignment solver for nonempty collections. If the solver cannot be imported, the route returns an explicit unavailable result. When both split collections are empty, the source returns zero without calling the solver and displays no internal splits. A zero for two unresolved trees does not establish resolved biological relationships.

4. Read the complete table and its precision

Saved fieldRetained value
MSD4
Mean Transfer1.333
Matched Pairs3
Max Transfer2.0
First Splits3
Second Splits3
Dummy Pairs0
Optimal MatchingA,B|C,D,E,F -> A,C,D,E|B,F (cost 2); A,B,C|D,E,F -> A,C|B,D,E,F (cost 1); A,B,C,D|E,F -> A,C,D|B,E,F (cost 1)
ScopeUnrooted topology; non-trivial splits; branch lengths ignored
First TreeCaterpillar AB / ABC / EF
Second TreeCaterpillar AC / ACD / BF
RefBogdanowicz & Giaro, IEEE/ACM TCBB 2012; TreeCmp, Evol Bioinform 2012

MSD and the count fields are integers in the saved native table. Mean Transfer is formatted to three decimal places and Max Transfer to one before export. The CSV preserves those strings; it does not restore more precise means. Keep the exact total, pair count and alignment alongside the summary. An empty matching uses N/A for the mean and maximum, rather than supplying measured zeros.

5. Separate the figure from the full record

The retained heatmap has the nine costs shown above. Three circles mark row/column positions (0, 2), (1, 0) and (2, 1); these are zero-based positions in that displayed ordering. The histogram summarizes matched costs 2, 1 and 1. It is not an uncertainty distribution or an empirical population of trees.

For larger split collections, the source displays only the first eight matrix rows and columns, with assignment markers only inside that view. The calculation still constructs the full assignment. This source-level display rule does not establish large-tree resource or cancellation behavior.

The historical native review records small split labels and clipped alignment, scope and reference fields. The complete CSV retains their text. Reading this browser guide does not establish a native-viewer repair.

6. Retain all five exported files

The native viewer’s Export All saved four artifacts plus a separate integrity manifest. This writing review checks the five identities and all 24 CSV data cells against the twelve-field native table.

Saved fileContents and limit
Matching_Split_Distance.csvAll twelve Parameter/Value rows, including the complete alignment string and formatted summary values.
Matching_Split_Distance.pngThe retained cost-matrix and histogram figure, not a separate numeric matrix export.
Input_and_methods.txtThe application, input fingerprint, selected route, selection notes and completed-run status.
Summary.txtThe selected run’s summary.
artifact_manifest.jsonFour artifact names, byte counts and SHA-256 hashes. Retain this manifest separately as the fifth file.

The export contains no original Newick input copy or separate full cost-matrix array. Preserve the named-tree input and numerical reference outside the bundle. The input file’s byte hash is distinct from the app’s fingerprint. Integrity checks do not establish scientific validity or a reloadable app session.

Worked examples describe particular inputs, methods and recorded results. Check current availability and input requirements before planning an evaluation.

← Back to the learning center