[Paper Review] TraitLab: a Matlab package for fitting and simulating binary tree-like data
TraitLab is a MATLAB-based Bayesian inference package for fitting and simulating binary tree-like data under a stochastic Dollo model of evolution, incorporating trait loss, catastrophes, and lateral borrowing. It uses Markov chain Monte Carlo (MCMC) sampling to estimate joint posterior distributions of tree topology, clade and root ages, and evolutionary rates, with applications in historical linguistics and phylogenetics.
TraitLab is a software package for simulating, fitting and analysing tree-like binary data under a stochastic Dollo model of evolution. The model also allows for rate heterogeneity through catastrophes, evolutionary events where many traits are simultaneously lost while new ones arise, and borrowing, whereby traits transfer laterally between species as well as through ancestral relationships. The core of the package is a Markov chain Monte Carlo (MCMC) sampling algorithm that enables the user to sample from the Bayesian joint posterior distribution for tree topologies, clade and root ages, and the trait loss, catastrophe and borrowing rates for a given data set. Data can be simulated according to the fitted Dollo model or according to a number of generalized models that allow for heterogeneity in the trait loss rate, biases in the data collection process and borrowing of traits between lineages. Coupled pairs of Markov chains can be used to diagnose MCMC mixing and convergence and to debias MCMC estimators. The raw data, MCMC run output, and model fit can be inspected using a number of useful graphical and analytical tools provided within the package or imported into other popular analysis programs. TraitLab is freely available and runs within the Matlab computing environment with its Statistics and Machine Learning toolbox, no other additional toolboxes are required.
Motivation & Objective
- To develop a flexible, accessible software tool for fitting and simulating binary trait data under a stochastic Dollo model of evolution.
- To address limitations in existing phylogenetic tools by allowing for rate heterogeneity through catastrophes and lateral trait borrowing.
- To provide a user-friendly interface and robust convergence diagnostics for MCMC sampling in Bayesian phylogenetic inference.
- To support model fitting and validation for complex data, including linguistic and biological trait datasets with missing or uncertain presence/absence.
- To enable researchers to assess model fit, detect outliers, and perform cross-validation on age constraints using MCMC-based posterior predictive checks.
Proposed method
- Implements a Bayesian framework using Markov chain Monte Carlo (MCMC) to sample from the joint posterior distribution of tree topology, clade and root ages, and evolutionary parameters.
- Uses a stochastic Dollo model that assumes each trait evolves only once, with subsequent loss or gain via mutations, catastrophes, or lateral borrowing.
- Incorporates catastrophe events—simultaneous loss and gain of multiple traits—modeled via a rate parameter and a probability of trait death during such events.
- Allows lateral borrowing of traits between contemporary species, with a separate rate parameter for each trait instance.
- Supports clade constraints on tree topology and node ages, enabling integration of fossil or historical calibration data.
- Provides graphical and analytical tools for visualizing MCMC convergence, trace plots, autocorrelation, and posterior distributions of key parameters.

Experimental results
Research questions
- RQ1Can a stochastic Dollo model with catastrophes and borrowing accurately represent the evolution of binary traits in linguistic and biological data?
- RQ2How well can MCMC sampling in TraitLab recover true tree topologies and parameter values under realistic evolutionary scenarios?
- RQ3To what extent do model misfits, such as outlier taxa or biased data collection, affect posterior inference and convergence?
- RQ4How effective are coupled MCMC chains and posterior predictive checks in diagnosing convergence and model fit?
- RQ5Can Bayesian cross-validation of age constraints reliably identify and exclude outlier taxa that distort phylogenetic inference?
Key findings
- The final MCMC run with Ugaritic and Gehez removed yielded a 95% highest posterior density interval of [4354, 5624] years Before Present for the root age of the Semitic language family.
- A 28% posterior probability of no catastrophes, compared to a 2% prior, indicated model misfit for Ugaritic, suggesting the presence of unmodeled evolutionary complexity.
- Bayesian cross-validation revealed that Biblical Aramaic, Ugaritic, and Gehez were outliers in their age constraints, with posterior distributions not overlapping historical calibrations.
- Model fit improved significantly after removing Ugaritic and Gehez, with all remaining age constraints now supported by posterior distributions.
- The consensus tree with a single catastrophe event on the branch above Ugaritic showed strong posterior support, indicating potential evolutionary bursts in that lineage.
- Visual diagnostics, including trace and autocorrelation plots, confirmed MCMC convergence for key parameters such as the MRCA age of Tigre and Tigrinya, with 85% posterior probability of clade formation.
![Figure 2: Suppose a clade comprises taxa 3, 4 and 5. If $\texttt{rootmin}=t_{1}$ and $\texttt{rootmax}=t_{2}$ , then the age of the node labelled root, node 7 here, is constrained to lie in the interval $[t_{1},t_{2}]$ . Similarly, if $\texttt{originatemin}=t_{3}$ and $\texttt{originatemax}=t_{4}$ ,](https://ar5iv.labs.arxiv.org/html/2308.09060/assets/x2.png)
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.