  Divergence date estimates are central to understand evolutionary processes
and depend, in the case of molecular phylogenies, on tests of molecular clocks.
Here we propose two non-parametric tests of strict and relaxed molecular clocks
built upon a framework that uses the empirical cumulative distribution (ECD) of
branch lengths obtained from an ensemble of Bayesian trees and well known
non-parametric (one-sample and two-sample) Kolmogorov-Smirnov (KS)
goodness-of-fit test. In the strict clock case, the method consists in using
the one-sample Kolmogorov-Smirnov (KS) test to directly test if the phylogeny
is clock-like, in other words, if it follows a Poisson law. The ECD is computed
from the discretized branch lengths and the parameter $\lambda$ of the expected
Poisson distribution is calculated as the average branch length over the
ensemble of trees. To compensate for the auto-correlation in the ensemble of
trees and pseudo-replication we take advantage of thinning and effective sample
size, two features provided by Bayesian inference MCMC samplers. Finally, it is
observed that tree topologies with very long or very short branches lead to
Poisson mixtures and in this case we propose the use of the two-sample KS test
with samples from two continuous branch length distributions, one obtained from
an ensemble of clock-constrained trees and the other from an ensemble of
unconstrained trees. Moreover, in this second form the test can also be applied
to test for relaxed clock models. The use of a statistically equivalent
ensemble of phylogenies to obtain the branch lengths ECD, instead of one
consensus tree, yields considerable reduction of the effects of small sample
size and provides again of power.
