The genetics behind the alternating sexes of walnut trees have been revealed by biologists at the University of California, Davis. The research, published in Science, reveals a mechanism that has been stable in walnuts and their ancestors going back 40 million years—and which has some parallels to sex determination in humans and other animals.