A Hierarchical Bayesian Model for Next-Generation Population Genomics