Abstract
Carbon dioxide is produced by many organic processes and is a convenient volatile cue for insects(1) that are searching for blood hosts(2), flowers(3), communal nests(4), fruit(5) and wildfires(6). Although Drosophila melanogaster feed on yeast that produce CO(2) and ethanol during fermentation, laboratory experiments(7-12) suggest that walking flies avoid CO(2). Here we resolve this paradox by showing that both flying and walking Drosophila find CO(2) attractive, but only when they are in an active state associated with foraging. Their aversion to CO(2) at low-activity levels may be an adaptation to avoid parasites that seek CO(2), or to avoid succumbing to respiratory acidosis in the presence of high concentrations of CO(2) that exist in nature(13,14). In contrast to CO(2), flies are attracted to ethanol in all behavioural states, and invest twice the time searching near ethanol compared to CO(2). These behavioural differences reflect the fact that ethanol is a unique signature of yeast fermentation, whereas CO(2) is generated by many natural processes. Using genetic tools, we determined that the evolutionarily conserved ionotropic co-receptor IR25a is required for CO(2) attraction, and that the receptors necessary for CO(2) avoidance are not involved in this attraction. Our study lays the foundation for future research to determine the neural circuits that underlie both state- and odorant-dependent decision-making in Drosophila.