Excitation and inhibition onto central courtship neurons biases Drosophila mate choice

The ability to distinguish males from females is essential for productive mate selection and species propagation. Recent studies in Drosophila have identified different classes of contact chemosensory neurons that detect female or male pheromones and influence courtship decisions. Here, we examine central neural pathways in the male brain that process female and male pheromones using anatomical, calcium imaging, optogenetic, and behavioral studies. We find that sensory neurons that detect female pheromones, but not male pheromones, activate a novel class of neurons in the ventral nerve cord to cause activation of P1 neurons, male-specific command neurons that trigger courtship. In addition, sensory neurons that detect male pheromones, as well as those that detect female pheromones, activate central mAL neurons to inhibit P1. These studies demonstrate that the balance of excitatory and inhibitory drives onto central courtship-promoting neurons controls mating decisions. DOI: http://dx.doi.org/10.7554/eLife.11188.001


Introduction
Across the animal kingdom, the ability to distinguish males from females is critical to select among potential mates. The specificity of mating decisions is exemplified by the Drosophila courtship ritual, in which males follow, sing to, and copulate with females but not males. Although much progress has been made in identifying the circuits that underlie mating decisions in the male fly brain, the sensory neurons that detect sex-specific cues and the pathways that they activate to generate sex-specific behaviors are incompletely understood.
A major advance in elucidating the neural circuits that govern male mating decisions has come from the discovery that a male-specific splice form of the Fruitless trancriptional regulator (FruM) is expressed in peripheral and central neurons that drive courtship behavior (Manoli et al., 2005;Stockinger et al., 2005), arguing that FruM marks neural circuits for courtship. Studies of the function of FruM-positive neurons has led to the identification of olfactory and gustatory neurons that detect pheromones, as well as central neurons that drive behavioral subprograms of courtship (Datta et al., 2008;Ha and Smith, 2006;Kurtovic et al., 2007;Lu et al., 2012;Ruta et al., 2010;Thistle et al., 2012;Toda et al., 2012;von Philipsborn et al., 2011).
One set of neurons that has emerged as a central driver of male mating behavior is the group of P1 (a.k.a. pMPe, pMP4 or pC1) neurons in the protocerebrum (Cachero et al., 2010;Kimura et al., 2008;Lee et al., 2002;Yu et al., 2010). Inducible activation of these neurons leads to sustained male courtship behaviors (Inagaki et al., 2014;Kohatsu et al., 2011;Pan et al., 2012;von Philipsborn et al., 2011). Moreover, these neurons are activated by female pheromones and this activation is partially inhibited in the presence of the male inhibitory pheromone, cis vaccenyl actate (cVA) (Kohatsu et al., 2011). These data show that P1 neurons receive sensory cues signaling females or males and drive courtship decisions, suggesting that they may be command neurons for courtship behaviors.
The sensory pathways that converge onto P1 neurons are poorly defined. Diverse sensory stimuli contribute to courtship decisions, including visual, auditory, and chemosensory cues. Important sensory cues detected primarily by contact chemosensory neurons are sex-specific cuticular hydrocarbons that act as pheromones. Multiple gustatory receptors and neurons have been implicated in pheromone detection (Bray and Amrein, 2003;Koh et al., 2014;Miyamoto and Amrein, 2008;Moon et al., 2009;Watanabe et al., 2011). We and others recently showed that leg chemosensory neurons expressing the PPK23 pickpocket ion channel detect pheromones (Lu et al., 2012;Thistle et al., 2012;Toda et al., 2012). PPK23 is expressed in sensory neurons of many leg chemosensory bristles, with generally two PPK23 cells per bristle. One cell responds selectively to male pheromones (M cells) and the other cell to female pheromones (F cells) (Pikielny, 2012;Thistle et al., 2012). In contrast, the PPK25 channel is expressed in one of the two PPK23-positive cells per bristle, and PPK25 is required for cellular and behavioral responses to female pheromones, arguing that it selectively labels F cells (Starostina et al., 2012;Vijayan et al., 2014). Unlike other classes of gustatory neurons implicated in pheromone detection, PPK23 cells are Fruitless-positive (Lu et al., 2012;Thistle et al., 2012;Toda et al., 2012). This suggested that it may be possible to trace pheromonal pathways from PPK23 cells in the periphery to the central nervous system by using FruM neurons as a guide.
Here, we examine sensory pathways in the male brain, from pheromone-sensing cells on the legs to the ventral nerve cord to the protocerebrum, in order to elucidate the neural circuits that allow the male fly to distinguish between appropriate and inappropriate mates. These studies define sensory pathways that act as excitatory and inhibitory drives onto P1, providing insight into the functional connectivity of the courtship circuit.

Results
Genetic access to sensory neurons that detect female or male pheromones To examine pathways activated by female excitatory pheromones and male inhibitory pheromones, we focused on different subpopulations of PPK23 cells as specific sensory inputs. By GCaMP6s eLife digest Courtship displays are seen throughout the animal kingdom. For example, male birds-of-paradise are perhaps best known for the elaborate dances they use to attract a mate. Male fruit flies, belonging to the species Drosophila melanogaster, also perform courtship toward female flies. However, male flies do not court other males. Previous studies have shown that sex-specific chemical signals (or pheromones) are important cues that males use to direct courtship towards females. Researchers have previously identified two sets of sensory neurons that detect pheromones: one set detects female pheromones and promotes courtship, while the other detects male pheromones and inhibits courtship. However it was unclear how these sensory neurons controlled courtship behavior. Now, Kallman et al. have studied the circuits of neurons in the fruit fly that promote or inhibit courtship when a fly detects a pheromone. The experiments identified several pathways of neurons in the brain of male Drosophila that respond to female and male pheromones. These pathways send signals that either excite or inhibit a central target, called P1 neurons. Female pheromones activated a pathway that activates the P1 neurons, whereas male pheromones activate another pathway that inhibits the P1 neurons. Kallman et al. suggest that the balance of these excitatory and inhibitory signals controls a fly's decision to court.
Following on from this work one of the next challenges will be to identify the neural circuits that act downstream of the P1 neurons to control courtship. Future studies could also explore how P1 neurons integrate signals from different senses. calcium imaging (Chen et al., 2013) of PPK23 cells in a background in which PPK25 cells were independently labeled, we first confirmed that the PPK25-positive cells (F cells) are tuned to female pheromones and the PPK25-negative cells (M cells) to male pheromones ( Figure 1A,B; Table 1 contains genotypes of flies used for all experiments). In addition, we found that F cells are the only leg neurons that express the vesicular glutamate transporter-Gal4 driver (vGlut-Gal4) (Daniels et al., 2008), suggesting that the two classes differ in their neurotransmitter profiles and providing an additional marker that selectively labels F cells ( Figure 1C,D). F cells and M cells also differ in their axonal projection patterns: F cells terminate in the ventral nerve cord (VNC) whereas M cells also have fibers that project to the subesophageal zone (SEZ) of the central brain ( Figure 1E,G).
To ask whether F or M cell activation is sufficient to modify courtship behavior, we used genetic strategies to express the heat-activated cation channel dTRPA1 (Hamada et al., 2008) selectively in F or M cells. A single male was placed in a chamber with a virgin female and number of single wing extensions by the male was monitored, as this motor subprogram occurs specifically during courtship song production. Males expressing dTRPA1 in F cells tested at 30˚C (a temperature that activates dTRPA1) had a significantly higher wing extension rate than genetically identical flies tested at the non-activating temperature of 23˚C or control flies at either temperature ( Figure 1F). In contrast, males expressing dTRPA1 in M cells had a significantly lower wing extension rate at 30˚C compared to genetic and temperature controls ( Figure 1H). Thus, F and M cells comprise genetically and anatomically distinct chemosensory neuron classes that respond to female or male pheromones and promote or inhibit courtship.

F cell stimulation activates P1 neurons
The ability to genetically access and specifically activate cells responding to female or male pheromones provided the opportunity to trace sex-selective pathways in the male brain and examine the neural substrates for courtship decisions. We genetically accessed F cells with the ppk25-Gal4, vGlut-LexA and vGlut-QF2 drivers, all of which specifically label F cells in the legs ( Figure 1C,D, and Figure 1-figure supplement 1). To selectively access M cells (PPK23-positive, PPK25-negative cells), we used a driver that labels both F and M cells (ppk23-LexA) while driving Gal80 with F cell drivers ( Figure 1-figure supplement 1). The ATP-gated cation channel P2X2 (Lima and Miesenbock, 2005) was selectively expressed in these sensory classes and ATP was applied to the legs for robust cell-specific activation.
Male-specific, Fru-positive P1 neurons (Cachero et al., 2010;Kimura et al., 2008;Lee et al., 2002;Yu et al., 2010) are prominent courtship-promoting neurons in the protocerebrum that trigger sustained courtship behaviors upon ectopic activation (Inagaki et al., 2014;Kohatsu et al., 2011;Pan et al., 2012;von Philipsborn et al., 2011). As P1 neurons have been shown to respond to hydrocarbon extracts from female and male abdomens (Kohatsu et al., 2011), we tested whether F and M cells provided specific sensory inputs onto P1 neurons. P1 activity was monitored by GCaMP6s calcium imaging in live flies expressing P2X2 in both F and M cells (F+M), F cells, or M cells while ATP was applied to the legs (Figure 2A,B). Activation of F cells triggered calcium increases in P1, demonstrating that sensory neurons that detect female pheromones activate courtship-promoting P1 neurons. In contrast, we observed no significant calcium response in P1 neurons upon M cell activation. Activating F+M cells using the same ppk23-LexA driver (without expression of Gal80 in F cells) caused robust calcium responses in P1 neurons. These experiments argue that F cells, but not M cells, activate P1 neurons. This is in contrast to a previous study that observed calcium increases in P1 neurons in response to male abdomens (Kohatsu et al., 2011); however, male abdomens may activate other sensory neurons in addition to M cells, such as Fru-negative pheromone-sensing neurons, gustatory neurons, or mechanosensory neurons. The selective activation of single classes of sensory cells allows us to disambiguate sensory cues and determine the contribution of specific sensory inputs.

PPN1 neurons respond to F cell stimulation and activate P1 neurons
As F cells terminating in the VNC do not directly contact P1, we screened existing Gal4 collections (Gohl et al., 2011;Jenett et al., 2012) for neurons that might contact F cell projections and project to higher brain regions. We identified a pair of neurons with dendrites in the VNC and axons in the protocerebrum, marked specifically by R56C09-Gal4, which we name Pheromone Projection Neuron  Figure 3E,F). To test whether PPN1 is involved in courtship behavior, we expressed dTRPA1 in PPN1 neurons and monitored male courtship towards females upon heat-induced neural activation. Consistent with a role in promoting courtship, activating PPN1 with dTRPA1 increased male courtship behavior toward females, as measured by unilateral wing extension rate ( Figure 3D). Unlike other neurons of the courtship circuit, PPN1 is not Fru-positive based on intersectional approaches with Fru-Flp and Fru-LexA and PPN1 projections are not sexually dimorphic (data not shown). Nonetheless, the anatomical and behavioral studies suggest that PPN1 might transmit F cell activation to P1 to promote courtship.
To test whether PPN1 receives pheromonal signals, we stimulated F cells or M cells by ATP-mediated activation of P2X2 while monitoring calcium changes in PPN1 axons in the higher brain. These studies revealed calcium increases in PPN1 axons upon F cell stimulation but not M cell stimulation ( Figure 4A). As with P1, activating F+M cells using the same ppk23-LexA driver (without expression of Gal80 in F cells) triggered robust calcium responses in PPN1, further arguing that PPN1 neurons are downstream of F cells and not M cells. To more directly test whether F cell activity is transmitted to P1 by PPN1, we expressed the red-shifted opsin Chrimson (Klapoetke et al., 2014) in PPN1 and monitored calcium changes in P1. Activation of PPN1 with red light generated calcium responses in P1 ( Figure 4B). Red light had no effect on P1 activity in control animals not fed the essential cofactor retinal. Together, these experiments argue that female pheromones activate a neural pathway from F cells to PPN1 to P1 to drive courtship behavior.

M cells and F cells activate mAL neurons
As M cell stimulation did not activate P1, we searched for other targets of F and M cells by monitoring calcium responses in all Fru neurons upon F+M cell stimulation, observing activity throughout the brain using spinning disk confocal microscopy. One set of neurons was prominently activated by F+M stimulation ( Figure 5A). These were anatomically identifiable as mAL neurons (a.k.a. aDT2, aDTb) by their distinct arborization patterns (Cachero et al., 2010;Ito et al., 2012;Kimura et al., 2005;Yu et al., 2010). Based on their anatomy and neurotransmitter profile, mAL neurons have been proposed to be sexually dimorphic GABAergic interneurons that convey inhibitory courtship signals to the higher brain in males (Koganezawa et al., 2010). However, the behavioral role of mAL neurons in courtship, the sensory stimuli that activate mAL, and the relationship between mAL and other components of the courtship circuit have not been determined. To examine these questions, we visually screened Gal4 lines (Jenett et al., 2012) and identified R43D01-Gal4, which includes Fru-positive, GABAergic mAL neurons ( Figure 5B and To test whether mAL neurons participate in courtship behavior, we conditionally activated or inactivated them using the genetic intersection of R43D01-Gal4 and Fru-LexA and monitored courtship behavior. Activation of mAL neurons with dTRPA1 greatly suppressed courtship toward females compared to controls ( Figure 5C), as measured by unilateral wing extension rate. Inactivation of mAL neurons with tetanus toxin caused robust male-male chaining, a behavior in which three or more males serially court each other ( Figure 5D), and which was almost never observed in control animals. Furthermore, expression of RNAi against the vesicular GABA transporter (vGAT) using R43D01-Gal4 also caused male-male chaining ( Figure 5D), arguing that GABA release from mAL inhibits courtship. Thus, activation of mAL inhibits courtship, whereas inactivation enhances courtship, demonstrating an inhibitory role for mAL in courtship decisions.
Finally, we tested the specificity of the response of mAL neurons to pheromone sensory cell stimulation, using the R43D01-Gal4 line to express GCaMP6s and the same drivers used for the PPN1     and P1 experiments to express P2X2 in M and F cells ( Figure 5E,F). Surprisingly, both M cells and F cells activated mAL, arguing that detection of female as well as male pheromones provides an inhibitory courtship drive. As F cells additionally activated PPN1 and P1 courtship-promoting neurons, whereas M cells did not, this suggests that the balance between excitation and inhibition underlies the decision to court.

mAL neurons inhibit P1 courtship command neurons
How do mAL neurons inhibit courtship? P1 neurons are in close proximity to mAL termini ( Figure 6A), suggesting that they may be candidate targets of GABAergic mAL neurons. To test whether P1 neurons receive inhibitory signals, we generated flies containing an RNAi against the GABA-A receptor subunit Resistant to dieldrin (Rdl) (Ffrench-Constant et al., 1991) in P1 neurons and examined the behavioral consequence. Males expressing Rdl RNAi in P1 neurons displayed increased courtship toward other males, arguing that P1 neurons receive GABAergic inhibition ( Figure 6B). In addition, whereas Chrimson-mediated activation of P1 neurons induced courtship    behavior in solitary males, co-activation of P1 and R43D01-Gal4 neurons suppressed this behavior ( Figure 6C), arguing that mAL suppresses P1-mediated courtship. To more directly test whether inhibitory signals from mAL impinge on P1, we simultaneously stimulated F and M cells and monitored activity in P1 before and after 2-photon guided lesioning of mAL axons ( Figure 6D

Discussion
This work identifies pheromone-responsive neural circuits underlying mating decisions (Figure 7). We used cell-specific activation to determine sensory pathways that impinge on courtship-promoting P1 neurons, providing insight into the functional connectivity of the courtship circuit. Female pheromones trigger neural pathways that excite and inhibit P1, with PPN1 providing an excitatory drive onto P1 and mAL providing an inhibitory drive. F cell activation leads to P1 activation and increased courtship behavior, arguing that the sum of inputs onto P1 produces excitation or that the sequence of inputs, i.e., fast excitation followed by inhibition, provides a temporal window for excitation. In contrast, M cells activate mAL neurons to inhibit P1 and inhibit courtship behavior. These studies argue that the balance of excitation and inhibition onto P1 neurons is different following F cell or M cell activation: F cell activation leads to overall P1 activation whereas M cell activation leads to overall P1 inhibition.
Our calcium imaging studies provide strong support that the pathways identified in this study are activated by F and M cell stimulation, and our behavioral experiments demonstrate that activation of these neurons directly contributes to courtship decisions. However, we do not exclude the possibility that additional intermediary neurons may also be activated by F or M cells. Indeed, a recent study identified vAB3 neurons, with projections in the first leg neuromere in the VNC, the SEZ and protocerebrum, as activated by female but not male pheromones (Clowney et al., 2015). This study also showed that mAL neurons are activated by male and female abdomens and provided evidence that mAL inhibits P1. Our independent observations are consistent with this work and extend the findings by providing behavioral evidence that each identified component of the circuit promotes or inhibits courtship as predicted by its response properties, by using cell-type specific activation strategies coupled with cell-type specific imaging studies to directly test potential connections, and by identifying PPN1 as a novel neural component of the courtship circuit. Together, the studies argue that pheromones activate multiple excitatory and inhibitory interneurons that impinge on P1.
A caveat of our studies is that they rely on ectopic expression of reporters, and expression levels of P2X2 and GCaMP6s may influence the ability to detect responding cells. Nevertheless, the same driver was used to express P2X2 in M cells in all calcium-imaging experiments, but application of ATP only elicited calcium responses in mAL neurons. Furthermore, the ppk23-LexA driver (in F+M  cells) that we used for M cell activation was sufficient to produce ATP-mediated activation of P1 and PPN1, and these responses were abolished in the presence of Gal80 in F cells. Thus, the observation that M cells activate mAL but not P1 or PPN1 is unlikely due to technical limitations.
This study demonstrates a specific computational logic used by the nervous system to integrate different sensory inputs. Pheromones provide excitatory or inhibitory drives onto P1, such that P1 activity reflects the integration of positive and negative sensory inputs, with female pheromones causing net excitation and male pheromones causing net inhibition. P1 also integrates inputs from other sensory systems, as P1 neurons respond to visual stimuli (Kohatsu and Yamamoto, 2015) and olfactory pheromones (Clowney et al., 2015;Kohatsu et al., 2011). Thus, diverse sensory stimuli may alter the weight of excitation versus inhibition onto P1 and bias the decision to court. Altering the weights of excitation or inhibition through experience or evolution is an appealing strategy to dynamically modulate the response to potential mates or to tune attraction to conspecifics. Taken together, these studies reveal an elegant strategy used by the nervous system in which excitatory and inhibitory inputs directly converge onto a common output to control a significant behavioral decision.

Leg bristle GCaMP6s imaging
Single bristle imaging was performed as previously described (Thistle et al., 2012). Flies containing ppk23-LexA, LexAop-GCaMP6S, ppk25-Gal4, UAS-CD8::tdTomato were placed in a custom imaging chamber and their forelegs were secured with wax. Female (7,11-heptacosadiene and 7,11-nonacosadiene) or male (7-tricosene and cis-vaccenyl acetate) pheromone mixes (100 ng/mL, Cayman Chemical, Ann Arbor, MI) were applied to single bristles on the three distal leg segments for 30 s. GCaMP6s responses were captured using a 3i spinning disk confocal system equipped with a 20x air objective and 1.6x optical zoom. Responses in the two PPK23 cells under each bristle were analyzed based on their expression of CD8::tdTomato; M cells were tdTomato-negative, and F cells were tdTomato-positive. The change in fluorescence in each cell was calculated as follows: 100*((F t -F 0 )/ F 0 ), where F 0 is the mean fluorescence intensity during the 4 s prior to stimulation.
The heat map in Figure 1B was created in Fiji. The average fluorescence intensity of the 10 frames preceding each stimulation (female and male mixes) was subtracted from the frame at which the fluorescence intensity of the responding cell was at a maximum. The resulting images from each stimulation were then merged into a two-channel image. The channels corresponding to the female or male pheromone stimulation were pseudocolored red and blue, respectively.

Central brain GCaMP6s imaging and ATP stimulations
GCaMP imaging experiments were performed as previously described (Harris et al., 2015). Virgin males were collected at eclosion and were aged in isolation for 2 to 6 days before imaging. They were briefly anaesthetized with CO 2 and placed into a small slit on a custom-built plastic mount at the neck such that the head was isolated from the rest of the body. The head was then immobilized using nail polish. Two small pieces of plastic were affixed with nail polish to the underside of the plastic mount on either side of the thorax, such that the legs were forced into a forward-facing position. The proboscis was covered with wax to prevent labellar taste input. The head cuticle was dissected with fine forceps in ice-cold adult hemolymph-like solution (AHL) (Wang et al., 2003), and obscuring air sacs and other debris were removed. Eyes were damaged or removed to minimize visual input from the imaging laser. A coverglass was placed at a 45-degree angle to the plane of the plastic mount such that the head was isolated from the rest of the body.
GCaMP6s responses were captured using a fixed-stage 3i spinning disk confocal system equipped with a 20x water objective and 1.6x (mAL and P1) or 2.5x (PPN1) optical zoom and a 488 nm laser. During the stimulation, stacks of 15-20 Z-slices (1-1.5 mm/Z-slice, for mAL and P1) or 8-12 Z-slices (0.5-0.8 mm/Z-slice, for PPN1) were obtained with a 100-ms exposure per Z-slice, resulting in each imaging volume/timepoint being acquired every 1.7-3.9 s. For each trial, 20 imaging timepoints were acquired.
For P2X2-mediated stimulation of M and/or F cells,~4 mL of 100 mM ATP (adjusted to pH 7) was pipetted onto a small cube of 2% agar, which was placed on the end of a glass capillary (OD 1.0 mm, ID 0.78 mm). The capillary was placed into an electrode holder that was secured to a micromanipulator. The agar cube was advanced such that it touched the flies' legs at timepoint 6 of 20. The cube was left within reach of the flies' legs for 3 timepoints before being removed.
F and M cells were exogenously activated to ensure specific stimulation of different sensory classes. Delivery of synthetic pheromones requires solubilization in ethanol or hexane, solvents that dissolve the fly's endogenous cuticular hydrocarbons, which may independently activate F or M cells. It was possible to apply pheromone solutions to the tip of a single sensory bristle without detriment ( Figure 1A).
For PPN1 imaging, because GCaMP6s baseline fluorescence was very low, a red reporter (UAS-CD8::tdTomato) was included in order to visualize axonal endings. One stack of 15-20 Z-slices from the 561 nm laser line was obtained at the beginning of each imaging session. These were later used to define regions of interest for imaging analysis.

Chrimson-mediated activation of PPN1
For PPN1 activation experiments, we fed isolated adult male flies for a minimum of 3 days on standard fly food supplemented with all-trans retinal (final concentration 400 mM). These flies, as well as control males fed normal food, were kept in constant darkness until the experiment. Imaging was performed similarly to above ("GCaMP6s imaging") except that a 635 nm laser (Laserglow, Canada) was directed at the thorax. The laser was turned to its highest power (~0.01 mW/mm 2 ) but was in standby mode until frame 6 of 20, at which time the key was turned to open the shutter. The laser was left on for 6 frames. During imaging, a 525/45 bandpass emission filter (Semrock, Rochester, NY) was used to prevent the 635 nm laser light from interfering with the GCaMP signal. In some cases, we found that the 488 nm imaging laser was sufficient to activate Chrimson and trigger calcium responses in downstream neurons (i.e., ppk23>Chrimson, P1>GCaMP6s). In addition, we found that Chrimson was weakly activated in the absence of retinal (see ArcLight imaging below). However, these phenomena were not observed in PPN1>Chrimson flies, likely due to weak PPN1 or Chrimson transgene expression.

GCaMP imaging analysis
For Figures 2, 4 and 6D, calcium imaging data were processed in Fiji. For PPN1, a red anatomy scan (with 561nm laser) measuring CD8::tdTomato fluorescence was taken prior to GCaMP calcium imaging. A maximum intensity Z-projection for the anatomy scan and each GCaMP timepoint was used for analysis. The anatomy projection was used to draw an ROI covering the axonal region in the ventrolateral protocerebrum ("anatomical ROI"). A second ROI was drawn in a region lacking both tdTomato and G-CaMP signal ("background ROI"). Mean fluorescence levels from the background ROI was subtracted from the anatomical ROI at each GCaMP timepoint resulting in the fluorescence trace over time: F t . 4F/F(%) was calculated as follows: 100*((F t -F 0 )/F 0 ), where F 0 is the mean fluorescence intensity during time points 2 to 5. For P1 fibers, 4F/F(%) was calculated in the same way, except that in place of an anatomical CD8::tdTomato scan, "anatomical ROIs" covering P1 commisural fibers were drawn using the maximum projection across time of the GCaMP signal. Maximum 4F/F(%) was calculated by subtracting the average 4F/F(%) of the 3 timepoints preceding the stimulation from the maximum 4F/F(%) of the 4 timepoints following the stimulation. Due to unavoidable differences in the background fluorescence between pre-and post-ablation imaging scans, the 4F/F values presented in Figure 6D were calculated without background subtraction.
For Figure 5, calcium imaging data were processed in Matlab. ROIs were drawn around mAL cell bodies in single slices. 4F/F(%) was calculated as follows: 100*((F t -F 0 )/F 0 ), where F 0 is the mean fluorescence intensity during time points 2 to 5 and F t is the fluorescence at each timepoint. Maximum 4F/F(%) was calculated by subtracting the average 4F/F(%) of the 3 timepoints preceding the stimulation from the maximum 4F/F(%) of the 4 timepoints following the stimulation.
For the heatmap in Figure 5A, 4F values were calculated for each pixel in each slice at each timepoint, generating a 4-dimensional data set. These data were collapsed spatially into a 3-dimensional data set using a maximum intensity projection in the Z dimension. The heat map represents the maximum 4F values that occurred during stimulus (timepoints 6-9). This heatmap was overlaid on a grayscale image that is the maximum intensity projection of the average baseline fluorescence (timepoints 2-5). The color bar scale represents the minimum (blue) to maximum (dark red) 4F.
For all GCaMP data, averaging the 4F/F(%) traces across animals required re-sampling the individual 4F/F(%) traces at 10 Hz (completed with Matlab using a linear interpolation), due to the variable duration of timepoints between animals.

Two-photon laser-mediated ablations
Ablations were performed on a Zeiss LSM 780 NLO AxioExaminer microscope. Flies expressed GCaMP6s in both mAL and P1 neurons, visualized using 488 nm light. A rectangular ROI (approximately 5 mm x 15 mm) was drawn to cover the width of the tract carrying mAL axons in a single z-section located in the middle of the tract. We then scanned the ROI 10 times (3.15 ms pixel dwell time) with intense 760 nm light (~50 mW at the front lens). Lesions were considered successful when the mAL axonal tract became discontinous. Mock ablations were performed identically except that the ROI was moved lateral to the mAL axonal tract (at the edge of the optic lobe). All ablations were performed bilaterally. Pre-and post-ablation stimulation of F and M cells were performed on a spinning disk microscope as described above. We waited 10-20 min after the ablation to stimulate the fly with ATP ("post-ablation" condition).

ArcLight imaging with mAL activation
Isolated adult male flies were fed standard fly food supplemented with all-trans retinal (final concentration 400 mM) for a minimum of 2 days and were kept in constant darkness until the experiment. Three-to 5-day-old flies were prepared as described above (GCaMP6s imaging). Imaging was performed on a Zeiss LSM 780 NLO AxioExaminer microscope. To find the region of greatest mAL-P1 overlap, Chrimson.mVenus in mAL neurons was briefly imaged with low-intensity 514 nm light, and the ROI to be scanned (approximately 30 mm x 30 mm) was drawn around the distal mAL axons where they interdigitate with P1 fibers ("signal ROI"). A second region of interest ("background ROI") was drawn in an area lacking ArcLight or Chrimson.mVenus fluorescence. ArcLight was excited with 925 nm light and scanned at approximately 15 Hz. To activate mAL neurons, flies were stimulated 5 times (~5 s/stimulation,~30 s between stimulations) with a 635-nm laser (Laserglow, Canada,~0.01 mW/mm 2 ). We observed weak responses in flies expressing Chrimson in mAL but not fed retinal. These responses were significantly smaller than the responses in flies fed retinal.

ArcLight imaging analysis
To calculate 4F/F of P1 ArcLight signal, the background ROI intensity trace was first subtracted from the signal ROI intensity trace, resulting in F. For each fly, the 5 laser stimulations were then aligned such that laser onset for each stimulation was t = 0 and the average was taken. 4F/F(%) for each animal was calculated as follows: 100*((F-F 0 )/F 0 ), where F 0 is the mean fluorescence intensity over the period from 0.7 to 2.6 s preceding the stimulation. Maximum 4F/F(%) was calculated by subtracting the average 4F/F(%) of 2 s preceding the stimulation from the maximum 4F/F(%) of 2 s following the stimulation.

Courtship behavior
Courtship behavior experiments were performed essentially as described (Thistle et al., 2012), with the following modifications: male-female assays were recorded for 10 min; assays involving UAS-dTRPA1 were performed at room temperature (~23˚C) and 30˚C; for Figure 3E, due to the relative weakness of UAS>stop>TRPA1 myc , male flies were pre-incubated at 30˚C for 5 min before being presented with a female; assays involving Chrimson were performed under white light (~0.05 mW/ mm 2 ) with male flies fed 400 mM all-trans retinal for a minimum of 3 days in the dark. We found that bright white light was sufficient to activate Chrimson and cause behavioral phenotypes.

Transgene generation
To generate R43D01-LexA, 1157 bp fragment from genomic DNA, including the entire R43D01 tile from the FlyLight collection , was amplified using the primers ttgagcacggatttcagcag and ggggtcctcaaatgtgtcgatttgt. This fragment was recombined into the pBPLexA::p65Uw plasmid (Pfeiffer et al., 2010), and inserted into the VK00018 landing site (Venken et al., 2006).