Estimating diversifying selection and functional constraint in the presence of recombination

Models of molecular evolution that incorporate the ratio of non-synonymous to synonymous polymorphism (dN/dS ratio) as a parameter can be used to identify sites that are under diversifying selection or functional constraint in a sample of gene sequences. However, when there has been recombination in the evolutionary history of the sequences, reconstructing a single phylogenetic tree is not appropriate, and inference based on a single tree can give misleading results. In the presence of high levels of recombination, the identification of sites experiencing diversifying selection can suffer from a false positive rate as high as 90%. We present a model that uses a population genetics approximation to the coalescent with recombination, and use reversible-jump MCMC to perform Bayesian inference on both the dN/dS ratio and the recombination rate, allowing each to vary along the sequence. We demonstrate that the method has the power to detect variation in the dN/dS ratio and the recombination rate, and does not suffer from a high false positive rate. We use the method to analyse the porB gene of Neisseria meningitidis, and verify the inferences using prior sensitivity analysis and model criticism techniques.