Files
Eric Coissac eee71430a4 add name-tree command and fix --free-loss cost matrix
Introduce the obikmer name-tree subcommand to map numeric leaf labels in phylogenetic tree exports back to taxon names using a reference FASTA file. Correct the --free-loss flag behavior by removing cardinality transition costs from pairwise cost calculations, ensuring sibling gains and losses are priced identically to whole-family events. Update documentation, configuration parameters, and add reference phylogenetic data files.
2026-08-16 13:11:06 +02:00

1.1 KiB

name-tree

Translate a numerically-labelled tree export (TNT, PhyG, or any plain Newick file with bare 1, 2, 3, … leaf labels) back to real taxon names, reading the label order from the FASTA that produced it.

obikmer name-tree TREE --fasta FASTA -o OUTPUT

Arguments

Argument Description
TREE Tree file to translate — a TNT-style NEXUS export (tree NAME = [&U] ...;) or a plain Newick file
--fasta FASTA file whose record order gives the numeric taxon labels (1-based) — typically the _sankoff.fasta/_snp.fasta used to produce TREE
-o, --output Output NEXUS file path

Output

A NEXUS file with a taxa block, a translate table (numeric label → taxon name, from --fasta's header order), and every tree found in TREE, topology unchanged — readable directly in FigTree, PearTree, ape (R), etc.

--tnt's and --phyg's exports (see phylo) both number taxa 1..N in the same order as the pseudo-alignment FASTA they were built from (<prefix>_sankoff.fasta), so pass that same file as --fasta here.