beast2 icon indicating copy to clipboard operation
beast2 copied to clipboard

Associate data with internal nodes via IDs

Open rbouckaert opened this issue 11 months ago • 2 comments

For fixed tree analysis or just for initialisation, it can be useful to have a starting tree where internal nodes are identiefied by a name instead of a number. Currently, only numbers are recognised, which makes it a bit cumbersome for example for a RealParameter associated with internal nodes to define its specific values.

Perhaps the easiest is to recognise the "id" metadata as special, and assign it to the node's ID, so a three node Newick tree becomes something like ((A:1.0,B:1.0)[id="D"]:1.0,C:2.0); and have a TreeTrait that define properties for A,B,C and D.

rbouckaert avatar Nov 24 '24 22:11 rbouckaert