The advent of accessible ancient DNA technology now allows the direct
ascertainment of allele frequencies in ancestral populations, thereby enabling
the use of allele frequency time series to detect and estimate natural
selection. Such direct observations of allele frequency dynamics are expected
to be more powerful than inferences made using patterns of linked neutral
variation obtained from modern individuals. We develop a Bayesian method to
make use of allele frequency time series data and infer the parameters of
general diploid selection, along with allele age, in non-equilibrium
populations. We introduce a novel path augmentation approach, in which we use
Markov chain Monte Carlo to integrate over the space of allele frequency
trajectories consistent with the observed data. Using simulations, we show that
this approach has good power to estimate selection coefficients and allele age.
Moreover, when applying our approach to data on horse coat color, we find that
ignoring a relevant demographic history can significantly bias the results of
inference. Our approach is made available in a C++ software package.Comment: 27 page