a, Side view of the Orco monomer structure (determined by cryo-electron microscopy37); the approximate location of the plasma membrane is indicated. The location of the residues corresponding to the odour-specificity determinants of Or22a analysed in this study (on the basis of previously generated alignments37) are highlighted as spheres. b, Top view of a cross-section through the putative ligand-binding pocket of the Orco structure shown in a. c, Partial protein sequence alignment of Or22a and Or59b. The equivalent residue to D. melanogaster Or22a M93 in Or59b is V91, which exhibits intraspecific sequence variation that affects odour sensitivity82. d, Results of branch-based models of molecular evolution that tested for changes in the rates of protein evolution among Or22a and Or22b orthologues (Methods, Supplementary Table 8): the rate of protein changes within the Or22a and Or22b phylogenetic tree highlights dN/dS ratios (ω) that differ from the ‘background rate’ (ω = 0.1772). Most branches exhibited low ω, arguing for strong purifying selection to maintain protein function over much of the tree. The two ω values that are >1 indicate an excess of protein changes, consistent with positive selection. The branch leading to D. simulans and D. sechellia Or22a displays nearly equal rates of silent and replacement substitutions, consistent with relaxed constraint during this period. e, Allele frequencies within population datasets for D. melanogaster78,79, D. simulans7,77 and D. sechellia7 at the three sites of Or22a that were functionally characterized in this study. The table displays amino acid (aa) positions 45, 67 and 93 of Or22a and the frequencies at which variants within the corresponding codons are segregating (number of alleles with respective variant/number of alleles analysed). NA (not applicable) indicates that positions within the codon are invariant. Datasets analysed are referenced on the right. Selected Or22a variants from the Drosophila melanogaster Genetic Reference Panel (DGRP)79 were confirmed by sequencing (f) and Or22a-neuron physiology was analysed (g, h). f, Protein sequence alignment of Or22a orthologues of D. melanogaster83, three lines of the DGRP, D. mauritiana (DSSC 14021-0241.151 (Dmau.151)) and D. sechellia. Red shading, amino acid differences (compared to the other analysed sequences) that are shared by DGRP-303, DGRP-304 and D. mauritiana at position 59 and the key odour-specificity determinant at residue 93; blue shading, all other sequence differences. No line within the DGRP with a polymorphism only at position 93 was identified. g, Electrophysiological responses of the Or22a/b neuron to odours present in noni (n = 5–20, female flies) in the strains shown in f. The similarity between the response profiles of DGRP-303, DGRP-304 and D. mauritiana suggests that their only shared polymorphism (at position 59) modifies Or22a-response properties in these strains. Comparisons to responses of Dmel BER flies are shown. Pairwise Wilcoxon rank-sum test and P values adjusted for multiple comparisons using the Benjamini and Hochberg method. D. mauritiana and D. sechellia data are replotted from Fig. 3b. h, Box plots with individual data points showing the same data as in g. D. mauritiana and D. sechellia data are replotted from Extended Data Fig. 8g. i, Protein sequence alignment of Or22a orthologues of the noni-specialized D. yakuba mayottensis (Dyak may.)41 and three other strains of D. yakuba (DSSC 14021-0261.00 (Dyak.00), 14021-0261.40 (Dyak.40) and 14021-0261.49 (Dyak.49)). Blue shading, differences between these sequences. j, Collection sites of D. yakuba strains shown in i. k, Quantification of the number of OSNs that express Or22a/b in D. sechellia, D. simulans, D. melanogaster (data as shown in Fig. 4b) and D. yakuba. n = 10–12 female flies. Comparisons to cell number counts in Dsec.07 flies are shown. In k, l, pairwise Wilcoxon rank-sum test and P values adjusted for multiple comparisons using the Benjamini and Hochberg method. l, Electrophysiological responses to odours present in noni of the Or22a/b neurons in D. sechellia, D. melanogaster and D. yakuba (n = 5–20, female flies). Comparisons to responses of Dsec.07 flies are shown. D. sechellia, D. melanogaster and Dyak.00 data are replotted from Fig. 3b. m, Box plots with individual data points showing the same data as in l. D. sechellia, D. melanogaster and Dyak.00 data are replotted from Extended Data Fig. 8g. NS, not significant (P > 0.05); *P < 0.05; **P < 0.01; ***P < 0.001.