For the dN/dS analysis, we first estimated Bayesian molecular clock phylogenies for SARS- and MERS-CoV independently using BEAST v 1.8.470. For both viruses, we assumed an uncorrelated log-normal distributed molecular clock71, Bayesian Skyline coalescent prior72 and a codon-structured substitution model73. Multiple independent MCMC runs of 10–20 million steps were executed to ensure that stationarity and convergence had been achieved. Empirical distributions of time-scaled phylogenies were obtained by combining (after the removal of burnin) the posterior tree distributions from the separate runs, which were subsequently used to estimate dN/dS ratios using the renaissance counting approach74,75 implemented in BEAST v 1.8.4. We also estimated per-site amino-acid diversity, which was calculated as the average number of amino-acid difference between two sequences at an amino-acid position in all possible pairs in the sequence alignment.