A new study of fly behavior and brain circuits reveals how different fly species evolved to prefer different temperatures.

Reference: Capek, M., Arenas, O. M., Alpert, M. H., Zaharieva, E. E., Méndez-González, I. D., Simões, J. M., … & Gallio, M. (2025). Evolution of temperature preference in flies of the genus Drosophila. Nature, 1-9.
Animals live in almost every nook and cranny of our planet, even in conditions that seem utterly inhospitable. But how do animals evolve to thrive in some of the hottest and coldest climates?
Flies from different climates prefer different temperatures
To measure each fly’s favorite temperature, the researchers placed flies in tiny arenas with heated and cooled floor tiles, kind of like a hot-and-cold disco floor for flies. The results showed that temperature preferences are innate to each fly species and closely match the environments they evolved in: As a human commensal, melanogaster preferred room temperature or 77°F, persimilis preferred 59-68°F as is common in cold forests, and mojavensis preferred hot desert temperatures of 86-95°F. While these temperatures may seem comfortable to us, they would be incredibly unpleasant for the other fly species. From there, the researchers were interested in how this preference behavior works and why it is so distinct across species, so they looked at the fly’s brains and genes.

To measure each fly’s favorite temperature, the researchers placed flies in tiny arenas with heated and cooled floor tiles, kind of like a hot-and-cold disco floor for flies. The results showed that temperature preferences are innate to each fly species and closely match the environments they evolved in: As a human commensal, melanogaster preferred room temperature or 77°F, persimilis preferred 59-68°F as is common in cold forests, and mojavensis preferred hot desert temperatures of 86-95°F. While these temperatures may seem comfortable to us, they would be incredibly unpleasant for the other fly species. From there, the researchers were interested in how this preference behavior works and why it is so distinct across species, so they looked at the fly’s brains and genes.
A single gene oversees a fly’s favorite temperature
Capek and colleagues found that a single gene, which encodes a protein called Gr28b.d, helps signal to the fly’s brain when temperatures begin to rise. Gr28b.d is slightly different but still related in each Drosophila species. In each species, Gr28b.d becomes active around the same temperature that they flies prefer, nicely linking the molecular findings to the observed behavior. This means when the fly experiences heat, their Gr28b.d protein becomes active, which sends a signal to the brain to perform a behavior. However, the researchers noticed one surprising difference when comparing behavior results to molecular results: While melanogaster and persimils Gr28b.d proteins became active just above their favorite temperatures, mojavensis Gr28b.d were active just below the fly’s favorite temperature range of 86-95°F. For melanogaster and persimils this means the activation of their Gr28b.d’s serves as a warning signal that the external environment is now too hot for comfort, so the fly avoids the heat source. However, mojavensis is attracted to hot temperatures so they are using their Gr28b.d protein in a new way: to find their favorite environments. To test the idea of Gr28b.d driving attraction to heat in mojavensis, the researchers made a kind of “Frankenstein fly,” swapping the heat sensor from the desert species into another fly. Surprisingly, the fly’s behavior remained the same. This suggested to the researchers that there must be a change in the circuitry in the brain to explain the difference between species.
The signs of evolution in a fly’s brain
Capek and colleagues went on to explore this curious phenomenon inside the fly brain. They found that the D. mojavensis has a distinct brain circuit – particularly in regions involved in innate behaviors – compared to the other species. They suggest that D. mojavensis evolved a new use of its heat sensory system that better suits their hot desert niche, meaning evolution shaped the behavior of animal species when adapting to different environments. This discovery opens the door to several intriguing research questions: How did the fly’s transition to a new environment happen and can it help us predict animal survival due to impending climate change? What other animals are out there that evolved a new use of a gene to adapt to an extreme environment? More broadly, how often does evolution repurpose existing genes in new ways to help animals survive?

