a Optogenetic stimulation of Or22a OSNs in D. melanogaster and D. sechellia. Left, CsChrimson-Venus expression in the antenna. Scale bar, 20 µm. Middle, single-sensillum recordings of Or22a neuron responses to optogenetic stimulation. Genotypes: D. melanogaster w;UAS-CsChrimson-Venus/+ (control), w;UAS-CsChrimson-Venus/Or22a-Gal4 (experimental), D. sechellia w;;UAS-CsChrimson-Venus/+ (control), w;Or22aGal4/+;UAS-CsChrimson-Venus/+ (experimental). The red line links the mean neuronal response at each light intensity, overlaid with individual data points. Black frames indicate the light intensity used for behavioural experiments. n = 5–10 sensilla (Supplementary Table 1). Right, behavioural responses of the same genotypes in response to optogenetic stimulation (ten 500 ms pulses with 500 ms intervals, indicated by the red bars). Time courses of ΔWBA (mean ± SEM) and quantification in each time window (mean ± SEM) are shown. n = 29 (D. melanogaster) and 30 (D. sechellia) animals. b Behavioural responses of D. sechellia upon optogenetic stimulation of Or22a OSNs and to noni odour stimulation (genotype as in a). Bottom, comparison of ΔWBA between light and odour responses, plotted as in a. n = 27 animals each. c Left, sparser Or22a neuron expression of CsChrimson in D. sechellia; dense packing of soma prevented quantification but is likely ~50% of total OSNs (Supplementary Fig. 6b, d). Scale bar, 20 µm. Middle, single-sensillum recordings of Or22a OSN responses to optogenetic stimulation. ab3 sensilla were first identified by stimulation with diagnostic odours (not shown); responses of CsChrimson-expressing neurons (experimental group) and non-expressing neurons (control, often from the same animal) are shown. n = 8-9 (Supplementary Table 1). Right, D. sechellia behaviour upon optogenetic activation of about half of their Or22a expressing neurons, plotted as in a. n = 26 animals. Genotypes: D. sechellia w;Or22aGal4/UAS-SPARC2-D-CsChrimson-Venus;;nSyb-ΦC31/+. d Left, HA immunofluorescence in a D. sechellia antenna expressing UAS-SPARC2-D-TNT-HA in Or22a neurons. Scale bar, 20 µm. Quantification (below) reveals ~50% of cells express the effector. Right, odour-tracking of noni juice of flies in effector control, driver control and experimental animals with blocked synaptic transmission, plotted as in a. n = 34 animals each. Genotypes: D. sechellia w;UAS-SPARC2-D-TNT-HA-GeCO/+;;+/+ (effector control), D. sechellia w;Or22aGal4/+;;nSyb-ΦC31/+ (driver control), D. sechellia w;Or22aGal4/UAS-SPARC2-D-TNT-HA-GeCO;;nSyb-ΦC31/+ (experimental group). For a–d unpaired Student’s t test (two-sided) (electrophysiology) or paired t test (two-sided) (behaviour): ***P < 0.001; **P < 0.01; *P < 0.05; otherwise P > 0.05.