Fly husbandry
Flies were maintained at 23–25 °C and 60–70% relative humidity under a 12-h light–dark cycle. The quality and composition of the fly food was a key factor for eliciting robust edge-tracking behaviour in tethered flies, particularly during imaging experiments. We found that flies that were raised for several generations on Wurzburg food39 exhibited robust edge tracking more consistently than did those raised on standard cornmeal–agar–molasses food. All behavioural experiments were performed using starved flies, which were removed from food and placed in vials containing only a water-soaked KimWipe or cotton plug for 16–24 h before tethering. For optogenetic experiments, flies were reared in complete darkness. Two days before an experiment, one-to-two-day old flies were transferred to a food vial containing 0.4 mM all-trans-retinal (Sigma, R2500). Sixteen to twenty-four hours before an experiment, flies were removed from food and placed in a vial containing a Kimwipe soaked in 1–2 ml of 0.2 mM all-trans-retinal in water.
Detailed fly genotypes
For all behavioural experiments examining edge tracking of an odour plume (Figs. 1, 2, 4 and 5 and Extended Data Figs. 1–3, 5–7, 9, 11 and 12), we used Canton-S. For perturbations of EPG neurons (Fig. 3), we used the SS00098 EPG split Gal4 line: 19G02-p65AD/+; R22E04-DBD/UAS-GtACR1-EYFP. For functional imaging of EPG neurons (Figs. 3 and 6 and Extended Data Fig. 14), we used the 60D05-Gal4 driver: UAS-jGCaMP7f/+; 60D05-Gal4/+. For perturbations of FC2 neurons (Fig. 6 and Extended Data Fig. 14), we used VT065306-AD; VT029306-DBD/UAS-GtACR1-EYFP. For functional recording of FC2 neurons (Fig. 6 and Extended Data Fig. 14) we used VT065306-AD/UAS-syt-jGCaMP7f; VT029306-DBD/60D05-Gal4. For optogenetic activation of olfactory sensory neurons (Extended Data Fig. 4), we used: UAS-Chrimson.mVenus/Orco-GAL4, w1118 UAS-CsChrimson.mVenus, Orco-GAL4, w*.
Drosophila stock sources. EPG split line: 19G02-p65ADZp (in attP40); R22E04-ZpGdbd (in attP2) (Bloomington Drosophila Stock Center (BDSC) 93169); FC2 split line: VT065306-AD; VT029306-DBD (gift from G. Maimon); R60D05-Gal4 (BDSC 39247); 10XUAS-sytGCaMP7f (attP2) (BDSC 94619); 20XUAS-IVS-CsChrimson.mVenus(attP18) (BDSC 55134); Orco-GAL4.C(142t52.1), w[*] (BDSC 23909); UAS-GtACR1.d.EYFP(attP2) (BDSC 92983); 20XUAS-IVS-jGCaMP7s(VK00005) (BDSC 79032).
Fly tethering and dissection
All assays were performed using 1–5-day old female flies. Flies were briefly anaesthetized (less than 10 s) using CO 2 and tethered to a custom-milled fly-plate similar to what has been previously described56. Flies were mounted to the fly-plate using a strand of hair or a single paintbrush bristle, which was used to secure their heads and subsequently their bodies to the plate before gluing the eyes and thorax using UV-curable glue. In all assays, the filament was removed after successful tethering and flies were placed in a dark, climate-controlled space (25 °C, 40–60% relative humidity) to recover for 15–30 min before the start of the experiment. Flies were then transferred to the closed-loop apparatus and allowed to walk freely on the ball for at least 15 min before experiments.
For functional imaging experiments, fly preparation varied accordingly. After tethering, the proximal portion of the extended proboscis was glued to minimize movement during recording while allowing the distal portion of the mouthparts to move freely during experiments. Flies were provided a recovery period of 30–120 min after tethering. After the recovery period, the fly-plate was then filled with saline (108 mM NaCl, 5 mM KCl, 2 mM CaCl 2 , 8.2 mM MgCl 2 , 4 mM NaHCO 3 , 1 mM NaH 2 PO 4 , 5 mM trehalose, 10 mM sucrose and 5 mM HEPES sodium salt, pH 7.5 with osmolarity adjusted to 275 mOsm). The cuticle covering the posterior portion of the brain was then cut using a 30-gauge needle and removed using forceps to facilitate optical access to central complex structures. Obstructing trachea were removed taking care to not damage the antennae or the antennal nerves. Flies were subsequently transferred and allowed to walk on the ball for at least 15 min.
Preparation of the olfactory environment
A virtual olfactory environment was created for walking tethered flies using a previously described16 closed-loop olfactory system with the addition of custom Python scripts that allowed for two-dimensional (2D) rendering of odour plumes.
... continue reading