Next-generation sequencing (NGS) data has transformed the biological sciences, and has provided us with an unprecedented opportunity to learn about natural selection. In this talk I will discuss some methods for analyzing NGS data for applications in population genetics. In one project we sequenced the exomes of 200 Danish individuals and found an excess of low frequency non-synonymous variants, from which we inferred the effect of negative selection acting genomewide. In a second project, we sequenced the exomes of representative Han Chinese and Tibetan humans to elucidate the genetic causes of altitude adaptation in Tibetans. We show that selection on the EPAS1 gene can explain previously described physiological differences between Han Chinese individuals and Tibetans at high altitude.