Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2026 Apr 3.
Published in final edited form as: J Vis Exp. 2025 Jun 20;(220):10.3791/68332. doi: 10.3791/68332

In vivo imaging of neural activity in unanesthetized Drosophila adult flies

Prachi Shah 1, Isaac Cervantes-Sandoval 1,2
PMCID: PMC13044849  NIHMSID: NIHMS2153390  PMID: 40622880

Abstract

In vivo imaging is crucial for studying neurobiology in Drosophila as it allows real-time visualization of neuronal activity, development, and plasticity within the intact, living brain. This technique provides invaluable insights into dynamic processes such as synaptic function and circuit connectivity, which cannot be accurately captured in fixed or ex vivo preparations. Most techniques for fly preparation for in vivo imaging involves anesthetizing the flies shortly before functional imaging. Nevertheless, extensive evidence demonstrates that anesthesia impacts several cognitive and physiological processes. For this reason, in vivo imaging of adult Drosophila melanogaster without the use of anesthetics during animal preparation is a challenging yet highly desirable approach. The protocol presented here involves immobilizing the head of awake flies by suctioning the proboscis into a small metal tube connected to a vacuum system. While the head is fixed, the fly is prepared for functional imaging without the need of anesthesia. This protocol is rapid and reproducible, ensuring no harm to the fly. The main advantage of this method lies in its avoidance of anesthetic use, thereby accounting for potential complex effects of anesthesia on neural activity. This method is both affordable and highly adaptable, utilizing inexpensive, customizable tools. It allows for the successful imaging of live flies, capturing fast changes in neural activity associated with dynamic cognitive processes.

SUMMARY

A significant barrier studying cellular activity during cognitive processes like learning and memory is the use of anesthetics for in vivo imaging preparation. Anesthesia impairs short-term memory and cognition in multiple models, including Drosophila. This study presents a novel method for preparing adult Drosophila for in vivo imaging without anesthesia.

INTRODUCTION

Recent advancements in genetically encoded activity reporters have revolutionized neuroscience by providing real-time, highly-specific insights into neuronal activity. These reporters, such as calcium or voltage sensors1–9, allow researchers to track the electrical and chemical signals within neurons with unprecedented temporal precision and spatial resolution. By enabling the monitoring of specific, single neurons to neural networks across different brain regions, these tools have deepened our understanding of how neuronal firing patterns relate to cognitive processes like learning, memory or decision making10–14.

To take advantage of these genetically encoded indicators, researchers developed advanced methods to prepare their model organism for in vivo imaging. The first report of neuronal plasticity by in vivo functional imaging, often referred to as a “memory trace”, was discovered in the antennal lobe of the honeybees following appetitive olfactory conditioning15. This discovery inspired research in the genetically versatile model organism, Drosophila melanogaster, leading to the development of innovative in vivo imaging techniques10,16–18.

Drosophila serves as an excellent model for understanding learning and memory due to its robust ability to form olfactory memories via classical conditioning, where an odor (the conditioned stimulus–CS) becomes associated with either an aversive or rewarding stimulus (the unconditioned stimulus–US)19–22. In Drosophila, odors are sparsely represented in the mushroom body (MB)23, a critical brain region for associative memory that consists of approximately 2,000 Kenyon cell neurons (KCs) per hemisphere24. Olfactory information is transmitted from the calyx to the MB lobes via KC axons, which bundle together to form the lobes. During olfactory conditioning, a US, such as an electric shock or a sugar reward, is conveyed to the MB lobes through distinct dopaminergic neurons (DANs): PPL1 neurons for aversive stimuli and PAM neurons for rewarding stimuli25–30. Memory acquisition is thought to involve the simultaneous activation of CS and US pathways, resulting in a synergistic increase in cyclic AMP (cAMP), which encodes the memory31,32. This process induces plasticity at the KC→MBON synapses, modifying their synaptic weight11–13,33–37. DAN-mediated plasticity ultimately drives the mushroom body output neurons (MBONs) to elicit either an approach or avoidance behavior toward the learned odor34. The current model suggests that the information flow from KCs to the MBONs transforms the representation of odor from odor identity in KCs to a more abstract information in the MBONs, such as the valence of an odor based on prior experience34,38. Unlike KCs, MBONs have broadly tuned odor responses; any given odor results in a response to most MBONs39. The odor tuning of the MBONs is modified by synaptic plasticity and varies significantly between individual flies, suggesting that MBONs change their response to odors based on experience. There are 34 MBONs, with the majority of the MBON network seemingly divided into two mutually antagonist classes that drive either approach of avoidance behavior34. For this reason, using in vivo imaging to study memory retrieval by recording in different MBONs has been widely used.

Early methods for in vivo functional imaging include conducting surgeries to remove a section of cuticle from the top of the head capsule, which was then covered with a small piece of plastic wrap18. While this marked the beginning of in vivo imaging in Drosophila, there have since been significant advancements in fly preparation techniques and the delivery of stimuli under the microscope to investigate processes like learning and memory. However, even today, most techniques for fly preparation for in vivo imaging involve anesthetizing the flies. This practice presents challenges, as there is extensive evidence – and an entire field of research– demonstrating how anesthesia impacts memory, as well as other cognitive and physiological processes. For instance, a study was conducted to understand the effects of different anesthetics that are very commonly used in the lab setting (carbon dioxide, isoflurane, sevoflurane and cold shock). They found that the longer the exposure to anesthesia, there was an increase in recovery time, changes in locomotor activity, lower fecundity, and may impact water and lipid stores40. In addition, it has been reported that giving cold shock anesthesia immediately after training can completely disrupt short-term memory21. From this initial study, it is now known that in Drosophila, there is unconsolidated memory (anesthesia sensitive memory) that decays within 6–8 hours, and a form of consolidated memory (anesthesia resistant memory) that is formed gradually after leaning and can last around 24 hours41. Based on this, anesthesia can affect cognitive processing and affect the activity of neurons that eventually allows for proper memory expression.

The effects of anesthesia on memory are not confined to Drosophila. Numerous human and other mammalian studies have demonstrated similar findings. For example, a cross-sectional study done in a university hospital found that short-term memory was significantly reduced in patients 24 hours after general anesthesia42. Another study done in mice found that general anesthesia robustly reduced spiking dynamics, decorrelated cellular ensembles, and altered spine dynamics in the CA1 region of the hippocampus, an important brain area involved in learning and memory in mammals43. To overcome these difficulties, the goal of this study is to provide a novel protocol that eliminates the use of anesthesia during fly preparation for in vivo imaging leaving the fly’s body completely free. This approach allows more accurate neuronal activity recordings, improves fly health for longer recordings, and eliminates possible confounding effects of anesthesia compared to other approaches. This protocol is designed to record activity from neurons in Drosophila, specifically looking at how neurons exhibit plasticity during and after learning experience. However, the dissection protocol is versatile and can be adapted to various applications in live imaging research.

PROTOCOL

The details of the equipment and reagents used for this study are listed in the Table of Materials.

Table of Materials

Name of Material/ Equipment Company Catalog Number Comments/Description
0.102 mm Platinum wire Surepure Chemetals 2690
0.25 OD, 0.125 ID, platinum-cured silicone tubing VWR 89068-474
0.3 mm ID Silicone tubing Fisher Scientific 11-189-14
Banana plugs Amazon
Black acrylic sheet for chamber 0.0125 in Precision Brand 44250
Calcium Chloride Sigma-Aldrich 746495
Copper shock grid Custom made
DC power supply for platinum resistor Fisher Scientific S35740
Dremel tool 3000-1 Dremel 3000-N/18
Drosophila melanogaster / ;;uas-tdtom BDSC 36328
Drosophila melanogaster / ;uas-gcamp6f; BDSC 42747 This uas line was combined with ;;uas-td-tom to generate a stock containing both insertions
Drosophila melanogaster/ ;;MB077C-gal4 BDSC 68287
Epoxy glue Gorilla 4200102
Gas flow meter 1.5 LPM Amazon B01N0UWZ2T
Glass 1 mL serological pipette Fisher Scientific 50-232-9516
Glass Slides Fisher Scientific 12-550-A3
Glucose Sigma-Aldrich G7528
HEPES Sigma-Aldrich H4034
Hypodermic 12TW gauge tubing Microgroup 316H12TW
Hypodermic 22X gauge tubing Microgroup 304H22X
Magnesium Chloride Hexahydrate Sigma-Aldrich M9272
Myristic Acid Acros Organics 156961000
Neodymium Magnets 3×2 mm Amazon B0CXSQ387M
P1000 tips Genesee Scientific 23-165RL
P200 tips Genesee Scientific 23-150RL
Pneumatic push connector 6mm OD Amazon B07ZHG8Y1Y
Potassium Chloride Sigma-Aldrich P3911
PTFE tubing 6mm OD Amazon
Razor blades Amazon B08LYD6645
Sodium Bicarbonate Sigma-Aldrich S5761
Sodium Chloride Fisher Scientific S271-500
Sodium Phosphate Dibasic Sigma-Aldrich S0876
Sucrose Sigma-Aldrich S9378
Trehalose Sigma-Aldrich T0167

1. Transgenic fruit flies, Drosophila melanogaster

  • 1.1 Cross female virgins and male flies (raised at 25 °C in 60% relative humidity on a 12 h light/dark cycle) carrying the desired Gal4 and UAS constructs, respectively, to produce flies in which specific neurons of interest express the desired genetically encoded activity reporter.

  • 1.2 Age the progeny of the above cross until they are in the range of 2–5 days post-eclosion. Both males and females can be used as the imaging chambers are custom made to fit both sexes.

2. Building an aspirator (5-minute workflow)

  • 2.1 Cut 6 mm silicon tubing to about 8 inches long using a razor blade. Take a p200 pipette tip and cut about half of it using a razor blade for the mouthpiece (Figure 1A). Insert the cut tip into the tubing. Cut a p1000 pipette tip enough so that a fly can move through it.

  • 2.2 Take a small piece of cotton and cover the silicon tubing. This is to prevent the fly from aspirating into the experimenter’s mouth. Place the cut p1000 tip onto the cotton covered tubing.

  • 2.3 Cover the p1000 pipette tip with a new p200 pipette tip. To determine the appropriate length for cutting the p200 pipette tip, first remove the p200 pipette tip and aspirate a fly into the p1000 pipette tip. Reattach the p200 tip. Gently blow and tap the fly to move it as far as it can go into to the p200 tip. Once it can no longer advance further, use a dissecting microscope to mark the point where the fly’s head ends, and the thorax begins, using a razor blade. Aspirate the fly back into the p1000 pipette tip and cut the p200 pipette tip at the marked position.

Figure 1: In vivo imaging preparation of Drosophila without the use of anesthesia.

Figure 1:

(A) Upper panel, diagram showing steps for aspirator preparation. Lowe panel, diagram of chamber held in a micromanipulator for fly preparation. Using metal tubing connected to a vacuum at 500 mL/min, place the proboscis of the fly into the opening of the tubing using an aspirator. The chamber is then moved to have the opening on top of the fly. (B) Using a custom-made platinum resistor, glue the sides of the eyes and thorax of the fly with myristic acid. (C) Remove the fly’s proboscis from the metal tubing and flip the chamber over to glue the proboscis of the fly to minimize movement during recordings. (D) Attach the chamber to the glass slide base and add tape to both the top of the chamber (covering the antennae) as well as in the back side to prevent eventual saline from falling through. (E) Using a fine dissecting needle, make 2 vertical cuts alongside the cuticle next to the compound eyes. Made an additional 3rd cut across the cuticle near the thorax. This should effectively create a “window” to the brain of the fly. (F) Add 100–200 μL of saline to the head of the fly where the cuts have been made. (G) Using sharp, fine forceps, swiftly lift, pull and detach the “window” of the cuticle to expose the fly brain. (H) Remove any fat and trachea to be able to properly visualize cells under the microscope. (I) Place completed fly under the microscope and adjust to fit the body on top of the shock grid. (J) Expression pattern of MBON γ2α’1 using pseudo color. Region of interest is shown using the dashed line around the dendritic arbor of the neuron.

3. Building the metal tubing proboscis aspirator (5–10-minute workflow)

  • 3.1 Cut the 22X gauge hypodermic metal tubing to desired size (~10 cm) using Dremel tools and a diamond saw blade. Buff ends of metal tubing with a Dremel 420 cut-off wheel to create a smooth and clean opening. (This opening will accommodate the proboscis of the fly).

  • 3.2 Wrap tubing around a 15mL centrifuge tube to get the desired curved shape (Figure 1A). The curve should create a hook-like shape that will allow the fly’s body to be in line with the chamber.

  • 3.3 Cut a piece (~7 cm long) of the 12TW gauge hypodermic metal tubbing using Dremel tools (this tubing should fit into a 2 μL pipette tip). Take a 2 μL pipette tip and cut the end using a razor blade to fit the 22X gauge metal tubing. Fit the bigger metal tubing into the other end of the 2 μL pipette tip.

  • 3.4 Mix a small amount of resin and hardener of epoxy glue together. Apply mixture where the small metal tubing meets the pipette tip and where the bigger metal tubing connects to the pipette tip. Allow the adhesive to fully cure overnight before connecting the assembly to a holder on a micromanipulator. Adjust angle as necessary.

4. Building a shock and odor delivery pipette for learning and memory experiments under the microscope (10-minute workflow)

  • 4.1 Using Dremel diamond tool, cut a 1 mL in 1/100 glass pipette at the 3 mL mark. Cut a small rectangular piece of acrylic sheet with dimensions 24.5 mm × 8mm and a thickness of 1/8 inch. Alternatively, this piece can be 3D printed to accommodate the shock grid better (the stl and obj files can be found in supplemental information – Grid_holder.stl, Grid_holder.obj).

  • 4.2 Cut the copper shock grid to fit onto the rectangular acrylic piece from previous step. Solder two electrical wires on opposite ends of the copper grid. Place copper grid into rectangular acrylic piece and curve it so that the fly’s abdomen and legs fit onto the shock grid (Figure 1I).

  • 4.3 Tape the copper grid to the rectangular plastic using a piece of electrical tape. Using a hot glue gun, securely attach the glass pipette to the shock grid, ensuring it is straight and properly centered. Using a digital multimeter, verify the copper grid is working to effectively deliver a shock to the fly’s legs.

5. Assembly of platinum resistor for glue melting (Myristic acid) (20-minute workflow)

  • 5.1 Using wire strippers, cut 200 mm of wires to desired length and strip one end of both wires. Cut about 60 mm of the platinum wire (this length should be enough to create a loop that will be used to melt the glue).

  • 5.2 Using a soldering gun, solder one end of the platinum wire to the electrical wire. Pass a heat shrink tubing through the electrical wire and use a Bunsen burner to shrink the tubing onto the wire to cover the soldered parts.

  • 5.3 Cut two 20 mm pieces of the 2.55 mm ID rubber tubing and pass them through the platinum wire (keep platinum wire straight to facilitate this process). Use the soldering gun to solder the other end of the platinum wire to the other electrical wire. Use a new heat shrink tubing to cover this new soldered part.

  • 5.4 Remove the plunger of a BD tb 1 mL syringe and pass the wires from the previous steps through the barrel. The platinum should be sticking out of the syringe barrel end. There should be no exposed wires, and the small rubber tubing should be covering the platinum wire except to the very end.

  • 5.5 Using a wire stripper, strip a small amount of both the other ends of the electrical wires. Using a soldering gun, solder each wire to banana plug until it is securely connected.

  • 5.6 Use epoxy glue to glue the top and base of the syringe barrel to glue the wires and barrel together, this will avoid tension to the wires inside the syringe and will ensure longer life to the resistor. Let the glue cure overnight.

  • 5.7 Connect finished resistor to DC power supply.

6. Building of recording chamber – Figure 1 (2-day workflow)

  • 6.1 Using the supplemental adobe illustrator file (Chamber_laserCut.ai), laser cut a black shim sheet (thickness 0.0125 in). The size of the opening in the middle of the chamber can be modified to fit the size of the flies (the size in the file generally fits females and males).

  • 6.2 Take a glass microscope slide that will serve as the base of the chamber. Mix resin and epoxy together. Take the black acrylic chamber and using epoxy glue, attach neodymium 3 mm × 2 mm, magnets onto all four corners. It is recommended to glue one magnet at the time and hold it while the glue cures with a paper clip.

  • 6.3 Place two new magnets onto each of the magnets glued on the chamber previously. Using epoxy, glue the last attached magnet to a glass slide and use paper clips to hold in place while curates.

  • 6.4 After the glue is curated, the chamber is complete, and more magnets can be added to adjust the height of the chamber for experiments. Supplemental mp4, stl, and obj files show the assembled recording chamber (Recording_chamber.stl, Recording_chamber.obj, Recording_chamber_animation.mp4).

7. In vivo dissection protocol without anesthesia – Figure 1 (5–7-minute workflow)

  • 7.1 Remove the p200 pipette tip from the aspirator. Insert the aspirator into the vial and aspirate a single fly into the p1000 pipette tip. Replace the p200 pipette tip back onto the aspirator. Gently blow and flick the aspirator so that the fly is immobilized at the top of the p200 pipette tip, headfirst.

  • 7.2 Place the dissection chamber onto the manipulator holder. Connect the vacuum to the fly holding tubing and adjust the flow level as needed (~500 ml/min). Use a fast connector to easily and quickly connect-disconnect the vacuum (Figure 1A).

  • 7.3 Move the vacuum metal tubing to center it to the field of view when looking through the microscope. Confirm the chamber is positioned correctly so that it will go directly on top of the metal tubing when ready to glue the fly. Gently, aspirate the fly’s proboscis into the vacuum holder (Figure 1A).

  • 7.4 Once the fly is in the correct position, move the manipulator so that the fly’s head is aligned to the chamber opening.

  • 7.5 Turn on the DC power supply. The current should be set to range between 0.40 to 0.50 Amps. Higher currents may cause the myristic acid to melt to the point where its viscosity becomes too low, increasing the risk of the glue spreading over the fly’s head.

  • 7.6 Using the platinum resistance, glue the sides of the eyes and thorax to the chamber using melted myristic acid (Figure 1B). To prevent getting glue on the cuticle of the head use as little glue as possible, especially when gluing the sides of the eyes.

  • 7.7 Once the eyes and thorax are glued, disconnect the vacuum tubing and use the manipulator to take the recording chamber off the vacuum tubing. Turn the chamber upside down and use the platinum resistance to glue the proboscis from below (Figure 1C). Gluing the eyes from the bottom is optional and can help keep the fly in place during dissection but is not necessary.

  • 7.8 Once everything is glued, turn off the DC power supply and turn the chamber upright and attach it to the glass side base. Cut a small piece of tape using scissors and apply it right in front and back the fly’s head (Figure 1D).

  • 7.9 Turn the chamber so that the head is facing the experimenter at a 90. Using a dissecting needle, make a vertical cut along the sides of the eyes (Figure 1E). Turn the chamber so that it is horizontally placed. Using the dissecting needle, cut across the cuticle (Figure 1E). Make sure the cuticle “window” just created can be lifted using the dissecting needle. If it lifts without any resistance, put the dissecting needle back onto its cover. Saline is not used in steps 13 and 14 to prevent light refraction, which could obstruct a clear view during the cuts.

  • 7.10 Add 100 μL of saline to the fly’s head top (Figure 1F). Using sharp forceps, carefully remove the window (Figure 1G). Using the sharp forceps, carefully remove any remaining fat or trachea. The brain should be ready for imaging now (Figure 1H–1J).

8. Visualization of learning-induced plasticity through aversive olfactory conditioning (20-minute workflow)

  • 8.1 Using a confocal microscope equipped with a laser and a water immersion objective, place prepared fly on the stage of the microscope. Optionally, use a camera with a macro lens focus on the fly making sure that fly is healthy, moving.

  • 8.2 Adjust its position of the shock grid/odor pipette using a micromanipulator so the fly is sitting on the shock grid. The fly should still be able to move freely as the shock grid is just touching the legs and slightly the abdomen (the fly should be able to remove its legs and abdomen from the grid if retracted). The odor delivery pipette should be directed towards the antennae of the fly.

  • 8.3 Using the coarse Z adjustment knob, scan through the Z axis of the brain and locate the brain region of interest. Adjust the frame size to 512 × 512 px. The scanning frequency should be adjusted to the desired speed – with a minimum of 2 Hz. Finally, set the duration of the recording.

  • 8.4 Start the recording of the neuron of interest and using a custom-made or a commercial odor delivery system, initiate a “pre-training” odor delivery simultaneously (Figure 2C). Set the recording to two minutes. The pre-training odor presentation starts by recording responses to a 5s first odor pulse (CS–) follow by a 5 s second odor pulse (CS+) with a 30 s inter stimuli interval.

  • 8.5 After collecting pre-training responses, wait 5 minutes before initiating a training protocol in the odor delivery system. For this example, only the CS+ was presented during the training. The CS+ odor is presented for 1 min initiated at 30 seconds after triggering the odor delivery system. The shock stimulator is programmed to simultaneously deliver 12, 90 V shocks while the odor is presented.

  • 8.6 After training, wait 5 or 15 min before obtaining post-training responses. Record post-training responses in the same way pre-training responses were recorded in step 6. Save all files in appropriate format for subsequent image analysis.

Figure 2: Learning-induced plasticity visualized in MBON γ2α’1 post aversive olfactory conditioning.

Figure 2:

(A) Expression patten of MB077C-splitGal4 driver expressing GCaMP. Brains were dissected and stained using anti-GFP and anti-nc82 as a counterstain. (B) Pseudo color visualization of zoomed in MBON γ2α’1, showing the cell body, extending process and dendritic arbor. The dendritic arbor is the region of interest from which calcium responses are collected. (C) Diagram of experimental setup (aversive training protocol): the fly is exposed to 5 second pulses of MCH and OCT pre aversive training with 30 s of clean air in between. After 5 minutes, flies are trained to associate OCT with 12 90V shocks. After 5 minutes, post training calcium responses to MCH and OCT pulses are recorded. This is repeated after 15 minutes as well. (D) Pre, 5 minutes post and 15 minutes post training odor response traces to MCH (upper panel) and OCT (lower panel) are shown. The thick black bar below each trace represents the time of odor presentation. (E) Pseudo colored images of dendritic arbor of MBON γ2α’1 pre, post 5 minutes and post 15 minutes of training are shown for both MCH and OCT. In the upper panel, there is significant potentiation to the CS-, while the fluorescence is completely abolished to the CS+. (F) The mean odor response to MCH was significantly potentiated 5- and 15-minutes post training. In contrast, CS+ odor responses are completely depressed post-conditioning. Non-parametric Wilcoxon-paired test. N=12. The mean odor response to OCT was significantly depressed 5- and 15-minutes post training. (G) Pre and 5 minutes post training odor response traces to MCH (upper panel) and OCT (lower panel) are shown for flies anesthetized during imaging preparation. The thick black bar below each trace represents the time of odor presentation. (H) In contrast to non-anesthetized animal, the mean odor response to MCH was not significantly potentiated post-training. Similarly, CS+ odor responses show only partial depression when compared to non-anesthetized animals. (I) The plasticity observed after training, calculated as the CS+/CS− ratio, is significantly lower in anesthetized animals when compared to flies prepared without anesthesia.

Non-parametric Wilcoxon-paired test. N=8–12.

9. Image analysis

  • 9.1 To analyze recordings, draw a region of interest (ROI) around the area of the neuron. This should be as precise as possible to limit the influence of background fluorescence.

  • 9.2 Use the measurement tool to extract mean florescence intensity data within the ROI for each frame of the recording. Export this data as a CSV file.

  • 9.3 Open the data in MATLAB, or any data analysis program, to calculate ΔF/Fo values for each odor trace. Combine the data to get the average ΔF/Fo over all individual fly recordings and create a graph of the mean odor responses traces pre and post training (Figure 2E–F).

REPRESENTATIVE RESULTS

Here, in vivo imaging of adult Drosophila without anesthesia is utilized to investigate aversive olfactory conditioning inducing plasticity in a well charactered Mushroom Body Output neuron (MBON γ2α’1)12. The calcium indicator GCaMP6f44 along with the red fluorescent protein TdTom are expressed in an MB output neuron, whose dendrites innervate the compartment of the MB γ and α’ lobes and is genetically targeted to the MBON γ2α’1 using the split-Gal4 line MB077C34 (Figure 2A, B). To observe plasticity post aversive olfactory conditioning, the fly is placed under the confocal microscope, with its abdomen and legs aligned to the middle of the shock grid and the odor delivery pipette pointed towards the fly’s antenna. First, calcium odor responses were recorded to a 5 second pulse of 4-methyl cyclohexanol (MCH) followed by a 5 second pulse of 3-octanol (OCT), separated by a 30 sec inter-stimulus interval. Five minutes after, flies were trained by the simultaneous presentation of a one min OCT (CS+) pulse along with 12, 90 V shocks. This associative conditioning schedule produces robust behavioral aversive memory. Finally, 5 and 15 minutes after conditioning, calcium responses to MCH and OCT were recorded as prior to training. MBON γ2α’1 responds robustly by calcium transients to both MCH and OCT before conditioning (Figure 2D–F). Nevertheless, matching previous findings12, 5 min post conditioning calcium responses to CS+ (OCT) are completely depressed (Figure 2S–F). Additionally, responses to the CS− (MCH), were significantly potentiated. Fifteen min post-training shows the similar results, as the calcium response to the CS+ is significantly depressed and CS− were potentiated. These results indicate that the memory trace observed in both odors last for at least 15 min (Figure 2D–F). These responses were quantified using the average odor response during the 5 second pulse and compared within the fly. These changes in odor responses can also be visualized by a pseudo color representation of the change in GCaMP6 fluorescence pre and post aversive training (Figure 2E). In contrast, anesthetizing the fly during preparation, shows reduced plasticity to both CS+ and CS–. Only partial depression to CS+ is observed in anesthetized animals as post-training responses are still present. In addition, CS− responses are not significantly different after training (Figure 2G, H). To better observe this, we calculated the induced plasticity as the ratio of CS+/CS− and show that non-anesthetized flies show significantly increased plasticity when compared to anesthetized animals (Figure 2I). These representative results indicate that this protocol is suitable to study learning and memory under the microscope and ensures the fly’s health during imaging from neurons for a long period of time. This protocol is versatile enough and can be applied to other types of in vivo imaging and other neurons of interest.

DISCUSSION

Understanding the neural circuity behind learning and memory is a central aim in the field of neuroscience. The genetic toolkit available in Drosophila, combined with the simplicity and versatility of behavioral testing, makes it an ideal model organism for studying these processes. Published studies from various labs have described different protocols for preparing flies for functional imaging without the use of anesthesia45,46. However, these protocols vary widely and often rely on highly specialized, custom-made tools, with limited guidance on how to build or use them. In this protocol, a method for performing in vivo functional imaging in flies that avoids the confounding effects of general anesthesia is presented. Furthermore, this approach allows for the capture of real-time neuronal activity within the same fly, enabling direct comparisons of neural responses before and after exposure to various stimuli.

When completing this protocol, critical steps include making sure the fly’s proboscis is properly placed into the vacuum tubing. This step ensures that subsequent gluing will occur in the right spots, as well as making sure the head is in the correct angle to visualize the neurons of interest. Minimal glue application is essential to maintain fly health; using the smallest amount necessary to secure the fly in place is ideal. This protocol also allows some modifications to match specific needs, for example, gluing only the sides of the eyes so the entire body is free. Similarly, a perfusion chamber can be attached to the top of recording chamber, to facilitate ringer perfusion or drug delivery. Finally, a rotating floating treadmill can be place below the fly as previously reported, allowing the analysis of locomotion directionality47,48.

This protocol does have some limitations, including the stress the flies are subjected during the microsurgery to prepare the flies for live imaging. Handling the small flies, applying glue sparingly, and carefully opening the head capsule without damaging any brain tissue or body requires substantial expertise, which can only be acquired through meticulous practice and repetition. While this method is particularly beneficial for studying cognitive processes at the cellular level, in vivo imaging still has some limitations when compared to electrophysiological recordings. Additionally, while our protocol avoids the use of anesthesia prior to imaging, the fly is still constrained to a physical chamber, which can always alter cellular responses. Nonetheless, our methodology provides the closest way to preserve the fly’s health for optimal in vivo imaging. Compared to existing methods that use anesthesia and constrain the fly, our method aims to keep the fly as freely moving as possible while being able to image from cells with minimal movement.

Supplementary Material

Supplementary File 2

Grid_holder (OBJ). File containing a OBJ 3D model of the custom-made piece used to hold the electric grid.

Supplementary File 1

Grid_holder (STL). File containing a stl 3D model of the custom-made piece used to hold the electric grid.

Supplementary File 6

Recording_chamber_animation. MP4 video file showing an animation of the general aspect of the assembled recording chamber.

Download video file (1,021.2KB, mp4)
Supplementary File 5

Recording_chamber (OBJ). File containing a OBJ 3D model of the custom-made recording chamber.

Supplementary File 4

Recording_chamber (STL). File containing a stl 3D model of the custom-made recording chamber.

Supplementary File 3

Chamber_LaserCut. Adobe illustrator file used to laser cut top component of the recording chambers for both female and male flies.

ACKNOWLEDGMENTS

This work was supported by the National Institute for General Medical Science for 1R01GM147917-01A1 and the Brain and Behavior Research Foundation for 30442.

Footnotes

A complete version of this article that includes the video component is available at http://dx.doi.org/10.3791/68332.

DISCLOSURES

The authors have nothing to disclose.

REFERENCES:

  • 1.Nakai J, Ohkura M, Imoto K A high signal-to-noise Ca2+ probe composed of a single green fluorescent protein. Nat Biotechnol. 19(2), 137–141 (2001). [DOI] [PubMed] [Google Scholar]
  • 2.Chen TW, Wardill TJ, Sun Y, et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature. 499(7458), 295–300 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Tian L, Hires SA, Mao T, et al. Imaging neural activity in worms, flies and mice with improved GCaMP calcium indicators. Nat Methods. 6(12), 875–881 (2009). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Akerboom J, Chen TW, Wardill TJ, et al. Optimization of a GCaMP calcium indicator for neural activity imaging. J Neurosci. 32(40), 13819–13840 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Zhao Y, Araki S, Wu J, et al. An expanded palette of genetically encoded Ca2+ indicators. Science. 333(6051), 1888–1891 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Sun F, Zeng J, Jing M, et al. A Genetically Encoded Fluorescent Sensor Enables Rapid and Specific Detection of Dopamine in Flies, Fish, and Mice. Cell. 174(2), 481–496 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Li Y, Tsien RW. pHTomato, a red, genetically encoded indicator that enables multiplex interrogation of synaptic activity. Nat Neurosci. 15(7), 1047–1053 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Wang L, Wu C, Peng W, et al. A high-performance genetically encoded fluorescent indicator for in vivo cAMP imaging. Nat Commun. 13(1), 5363 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Jing M, Zhang P, Wang G, et al. A genetically encoded fluorescent acetylcholine indicator for in vitro and in vivo studies. Nat Biotechnol. 36(8), 723–737 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Yu D, Akalal DBGB, Davis RL. Drosophila alpha/beta mushroom body neurons form a branch-specific, long-term cellular memory trace after spaced olfactory conditioning. Neuron. 52(5), 845–855 (2006). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Hige T, Aso Y, Modi MN, Rubin GM, Turner GC. Heterosynaptic Plasticity Underlies Aversive Olfactory Learning in Drosophila. Neuron. 88(5), 985–998 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Berry JA, Phan A, Davis RL. Dopamine Neurons Mediate Learning and Forgetting through Bidirectional Modulation of a Memory Trace. Cell Rep. 25(3), 651–662 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Cervantes-sandoval I, Davis RL, Berry JA. Rac1 Impairs Forgetting-Induced Cellular Plasticity in Mushroom Body Output Neurons. Front Cell Neurosci. 14(258), 1–11 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Martinez-Cervantes J, Shah P, Phan A, Cervantes-Sandoval I. High order unimodal olfactory sensory preconditioning in Drosophila. Elife. 11, 79107 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Faber T, Joerges J, Menzel R. Associative learning modifies neural representations of odors in the insect brain. Nat Neurosci. 2(1), 74–78 (1999). [DOI] [PubMed] [Google Scholar]
  • 16.Yu D, Baird GS, Tsien RY, Davis RL. Detection of calcium transients in Drosophila mushroom body neurons with camgaroo reporters. J Neurosci. 23(1), 64–72 (2003). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Yu D, Keene AC, Srivatsan A, Waddell S, Davis RL. Drosophila DPM neurons form a delayed and branch-specific memory trace after olfactory classical conditioning. Cell. 123(5), 945–957 (2005). [DOI] [PubMed] [Google Scholar]
  • 18.Yu D, Ponomarev A, Davis RL. Altered representation of the spatial code for odors after olfactory classical conditioning: Memory trace formation by synaptic recruitment. Neuron. 42(3), 437–449 (2004). [DOI] [PubMed] [Google Scholar]
  • 19.Tully T, Quinn WG. Classical conditioning and retention in normal and mutant Drosophila melanogaster. J Comp Physiol A. 157(2), 263–277 (1985). [DOI] [PubMed] [Google Scholar]
  • 20.Quinn WG, Harris WA, Benzer S. Conditioned behavior in Drosophila melanogaster. Proc Natl Acad Sci U S A. 71(3), 708–712 (1974). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Quinn WG, Dudai Y. Memory phases in Drosophila. Nature. 262(5569), 576–577 (1976). [DOI] [PubMed] [Google Scholar]
  • 22.Tempel BL, Bonini N, Dawson DR, Quinn WG. Reward learning in normal and mutant Drosophila. Proc Natl Acad Sci U S A. 80(5), 1482–1486 (1983). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Turner GC, Bazhenov M, Laurent G. Olfactory representations by Drosophila mushroom body neurons. J Neurophysiol. 99(2), 734–746 (2008). [DOI] [PubMed] [Google Scholar]
  • 24.de Belle JS, Heisenberg M. Associative odor learning in Drosophila abolished by chemical ablation of mushroom bodies. Science. 263(5147), 692–695 (1979). [DOI] [PubMed] [Google Scholar]
  • 25.Schwaerzel M, Monastirioti M, Scholz H, Friggi-Grelin F, Birman S, Heisenberg M. Dopamine and octopamine differentiate between aversive and appetitive olfactory memories in Drosophila. J Neurosci. 23(33), 10495–10502 (2003). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Kim YC, Lee HG, Han KA. D1 dopamine receptor dDA1 is required in the mushroom body neurons for aversive and appetitive learning in Drosophila. J Neurosci. 27(29), 7640–7647 (2007). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Riemensperger T, Völler T, Stock P, Buchner E, Fiala A. Punishment prediction by dopaminergic neurons in Drosophila. Curr Biol. 15(21), 1953–1960 (2005). [DOI] [PubMed] [Google Scholar]
  • 28.Mao Z, Davis RL. Eight different types of dopaminergic neurons innervate the Drosophila mushroom body neuropil: anatomical and physiological heterogeneity. Front Neural Circuits. 3(5), 1–17 (2005). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Liu C, Plaçais PYY, Yamagata N, et al. A subset of dopamine neurons signals reward for odour memory in Drosophila. Nature. 488(7412), 512–516 (2012). [DOI] [PubMed] [Google Scholar]
  • 30.Burke CJ, Huetteroth W, Owald D, et al. Layered reward signalling through octopamine and dopamine in Drosophila. Nature. 492(7429), 433–437 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Tomchik SM, Davis RL. Dynamics of learning-related cAMP signaling and stimulus integration in the Drosophila olfactory pathway. Neuron. 64(4), 510–521 (2009). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Gervasi N, Tchenio P, Preat T. PKA dynamics in a Drosophila learning center: coincidence detection by rutabaga adenylyl cyclase and spatial regulation by dunce phosphodiesterase. Neuron. 65(4), 516–529 (2010). [DOI] [PubMed] [Google Scholar]
  • 33.Séjourné J, Plaçais PYY, Aso Y, et al. Mushroom body efferent neurons responsible for aversive olfactory memory retrieval in Drosophila. Nat Neurosci. 14(7), 903–910 (2011). [DOI] [PubMed] [Google Scholar]
  • 34.Aso Y, Sitaraman D, Ichinose T, et al. Mushroom body output neurons encode valence and guide memory-based action selection in Drosophila. Elife. 3, 04580 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Pai TP, Chen CC, Lin HH, et al. Drosophila ORB protein in two mushroom body output neurons is necessary for long-term memory formation. Proceedings of the National Academy of Sciences. 110(19), 7898–7903 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Owald D, Felsenberg J, Talbot CB, et al. Activity of defined mushroom body output neurons underlies learned olfactory behavior in Drosophila. Neuron. 86(2), 417–427 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Perisse E, Owald D, Barnstedt O, Talbot CB, Huetteroth W, Waddell S. Aversive Learning and Appetitive Motivation Toggle Feed-Forward Inhibition in the Drosophila Mushroom Body. Neuron. 90(5), 1086–1099 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Aso Y, Rubin GM. Dopaminergic neurons write and update memories with cell-type-specific rules. Elife. 5, 16135 (2016) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Hige T, Aso Y, Rubin GM, Turner GC. Plasticity-driven individualization of olfactory coding in mushroom body output neurons. Nature. 526(7572), 258–262 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.MacMillan HA, Nørgård M, MacLean HJ, Overgaard J, Williams CJA. A critical test of Drosophila anaesthetics: Isoflurane and sevoflurane are benign alternatives to cold and CO2. J Insect Physiol. 101, 97–106 (2017). [DOI] [PubMed] [Google Scholar]
  • 41.Margulies C, Tully T, Dubnau J. Deconstructing memory in Drosophila. Curr Biol. 15(17), R700–R713 (2005). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Amiri A, Karvandian K, Ramezani N, Amiri A. Short-term memory impairment in patients undergoing general anesthesia and its contributing factors. Saudi J Anaesth. 14(4), 454–458 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43.Wang R, Zhang L, Wang X, et al. Electrophysiological activity pattern of mouse hippocampal CA1 and dentate gyrus under isoflurane anesthesia. Front Cell Neurosci. 18, (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Chen TW et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499, 295–300 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45.Berry JA, Cervantes-Sandoval I, Chakraborty M & Davis RL Sleep Facilitates Memory by Blocking Dopamine Neuron-Mediated Forgetting. Cell 161, 1656–1667 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Delestro F et al. In vivo large-scale analysis of Drosophila neuronal calcium traces by automated tracking of single somata. Sci Rep 10, 1–15 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47.Moore RJD, Taylor GJ, Paulk AC, Pearson T, van Swinderen B, Srinivasan MV. FicTrac: A visual method for tracking spherical motion and generating fictive animal paths. J Neurosci Methods. 225, 106–119 (2014). [DOI] [PubMed] [Google Scholar]
  • 48.Seelig JD, Chiappe ME, Lott GK, et al. Two-photon calcium imaging from head-fixed Drosophila during optomotor walking behavior. Nat Methods. 7(7), 535–540 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary File 2

Grid_holder (OBJ). File containing a OBJ 3D model of the custom-made piece used to hold the electric grid.

Supplementary File 1

Grid_holder (STL). File containing a stl 3D model of the custom-made piece used to hold the electric grid.

Supplementary File 6

Recording_chamber_animation. MP4 video file showing an animation of the general aspect of the assembled recording chamber.

Download video file (1,021.2KB, mp4)
Supplementary File 5

Recording_chamber (OBJ). File containing a OBJ 3D model of the custom-made recording chamber.

Supplementary File 4

Recording_chamber (STL). File containing a stl 3D model of the custom-made recording chamber.

Supplementary File 3

Chamber_LaserCut. Adobe illustrator file used to laser cut top component of the recording chambers for both female and male flies.

RESOURCES