Allele frequencies and selection coefficients in locally adapted populations.