In this example, we read in trees with branch lengths (FastTree2), based on haplotypes and counts reported in Lorenzo-Redondo et al, construct root-to-tip distances for time-stamped tips, and regress those on time to obtain crude evolutionary rate estimates.
The initial rooting of the tree is obtained by considering all time-point 0 sequences and selecting one that maximizes R2 (regardless of the slope). The user can perform arbitrary rerooting and see what the effect on the regression slope is.
Further, 1000 simulated perturbation of haplotype counts are considered for a given rooting: the estimated frequency of each haplotype (encoded in the tip name) is multiplied by a random number from [0.05-10] distributed uniformly. The proportion of perturbations with positive inferred regression slopes is shown on the chart.