Scientists have come up with a mathematical approach for analyzing a protein simultaneously in a set of ecologically distinct species to identify occurrences of natural selection in an organism’s evolution. The new method determines the “selective signature” of a gene, that is, the pattern of fast or slow evolution of that gene across a group of species, and uses that signature to infer gene function or to map changes to ecological shifts.