Clare E Hancock1, Bart R H Geurten2, André Fiala1. 1. Department of Molecular Neurobiology of Behaviour, Johann-Friedrich-Blumenbach-Institute for Zoology and Anthropology, University of Goettingen, Julia-Lermontowa-Weg 3, 37077 Goettingen, Germany. 2. Department of Cellular Neurobiology, Johann-Friedrich-Blumenbach-Institute for Zoology and Anthropology, University of Goettingen, Julia-Lermontowa-Weg 3, 37077 Goettingen, Germany.
Abstract
This protocol enables the quantification of odor-evoked calcium activity in mushroom body Kenyon cells of the Drosophila melanogaster brain at the single bouton level. We also present subsequent characterization of naive and learned odor representations in the context of olfactory coding. This approach to analyzing the neuronal basis of associative learning provides a substrate for similar studies, perhaps in other animals, to probe the attributes of a neuronal memory trace at the level of synapses distributed across neurons. For complete details on the use and execution of this protocol, please refer to Bilz et al. (2020).
This protocol enables the quantification of odor-evoked calcium activity in mushroom body Kenyon cells of the Drosophila melanogaster brain at the single bouton level. We also present subsequent characterization of naive and learned odor representations in the context of olfactory coding. This approach to analyzing the neuronal basis of associative learning provides a substrate for similar studies, perhaps in other animals, to probe the attributes of a neuronal memory trace at the level of synapses distributed across neurons. For complete details on the use and execution of this protocol, please refer to Bilz et al. (2020).
To visualize calcium transients in single Kenyon cells, flies must first be generated that express the required transgenes in a limited number of cells. In this study (Bilz et al., 2020), cells were monitored both functionally (in vivo) and anatomically (ex vivo). The former requires the expression of an activity-dependent, genetically encoded calcium indicator (in this case GCaMP3), whilst the latter was aided by the additional inclusion of a strongly expressed fluorescent cell marker (mCherry). Details of the specific fly strains used in this study can be found in the Key resources table. With the exception of the heat-shock protocol required for the induction of gene expression using the MARCM gene expression system, flies were raised under standard laboratory conditions. For a schematic depiction of the preparatory steps described in this section, see Figures 1A–1D.
Figure 1
Schematic depiction of the generation of experimental flies and data acquisition
(A) Parental fly lines that were crossed to generate experimental flies.
(B) F1 generation produced by the parents in (A), collected at the time of egg-laying.
(C) Induction of hs-Flp activity in the larval stage (48 h after egg-laying) by exposure to increased temperature (37°C in a water bath). Induction of hs-Flp-mediated recombination at flippase recognition target (FRT) sites results in stochastic flipping-out of Gal80 in daughter cells.
(D) Potential outcome of the heat-shocking protocol. Daughter cells that express Gal80 (lower panel) do not show transcription of mCherry or GCaMP due to inhibition of the Gal4 transcription factor. Daughter cells in which Gal80 was flipped out (upper panel) show expression of transgenes due to normal functioning of Gal4.
(E) Functional imaging setup for the visualization of odor-evoked calcium transients in the flies generated in (A–D). A single fly is fixed in a custom-built imaging chamber, placed on top of electrical wires and in the path of an airstream such that the fly can be exposed to electric shocks and odor stimuli, respectively.
(F) The head of the fly is opened to expose the brain.
(G) During functional imaging experiments, multiple planes are measured such that odor-evoked Kenyon cell responses can be visualized throughout the neuron(s). Two channels are recorded simultaneously in these experiments – one that detects emission from GCaMP, and another that detects emission from mCherry.
(H) Schematic outline of an example odor delivery protocol (top) in which the fly is exposed to three different odors while recording changes in fluorescence over time (schematically depicted in the lower panel). Use of mCherry as an activity-independent cell marker facilitates clear discrimination between small movement artefacts and changes in intracellular calcium.
(I) Following functional imaging experiments, the brain of the fly is removed and subjected to immunohistochemical staining for the anatomical characterization of measured Kenyon cells.
(J) Bouton that were measured in the previous steps (E–H) can be identified from anatomical confocal scans of the same brain.
(K) Boutons can then be mapped to the different compartments of the mushroom body γ lobe for analysis of odor-evoked responses based on anatomical position along the axon.
Schematic depiction of the generation of experimental flies and data acquisition(A) Parental fly lines that were crossed to generate experimental flies.(B) F1 generation produced by the parents in (A), collected at the time of egg-laying.(C) Induction of hs-Flp activity in the larval stage (48 h after egg-laying) by exposure to increased temperature (37°C in a water bath). Induction of hs-Flp-mediated recombination at flippase recognition target (FRT) sites results in stochastic flipping-out of Gal80 in daughter cells.(D) Potential outcome of the heat-shocking protocol. Daughter cells that express Gal80 (lower panel) do not show transcription of mCherry or GCaMP due to inhibition of the Gal4 transcription factor. Daughter cells in which Gal80 was flipped out (upper panel) show expression of transgenes due to normal functioning of Gal4.(E) Functional imaging setup for the visualization of odor-evoked calcium transients in the flies generated in (A–D). A single fly is fixed in a custom-built imaging chamber, placed on top of electrical wires and in the path of an airstream such that the fly can be exposed to electric shocks and odor stimuli, respectively.(F) The head of the fly is opened to expose the brain.(G) During functional imaging experiments, multiple planes are measured such that odor-evoked Kenyon cell responses can be visualized throughout the neuron(s). Two channels are recorded simultaneously in these experiments – one that detects emission from GCaMP, and another that detects emission from mCherry.(H) Schematic outline of an example odor delivery protocol (top) in which the fly is exposed to three different odors while recording changes in fluorescence over time (schematically depicted in the lower panel). Use of mCherry as an activity-independent cell marker facilitates clear discrimination between small movement artefacts and changes in intracellular calcium.(I) Following functional imaging experiments, the brain of the fly is removed and subjected to immunohistochemical staining for the anatomical characterization of measured Kenyon cells.(J) Bouton that were measured in the previous steps (E–H) can be identified from anatomical confocal scans of the same brain.(K) Boutons can then be mapped to the different compartments of the mushroom body γ lobe for analysis of odor-evoked responses based on anatomical position along the axon.
Fly strains and husbandry
Timing: 1 hRaise fruit flies in vials containing standard Drosophila food medium in an incubator at 25°C, relative humidity of 60%, and a controlled 12 h/12 h light/dark cycle.Collect virgin female flies carrying the following transgenes: neoFRT19A and 5HT1B-Gal4. In parallel, also collect male flies carrying the following transgenes: neoFRT19A, hsFLP, tubP-Gal80, 20xUAS-6xmCherry, 20xUAS-GCaMP3. For the exact genotypes and original sources of the flies used in this study, see Key resources table.Combine the collected female and male flies in an approximate 2:1 ratio in a fresh food vial and allow for mating for 2–3 days.
MARCM technique to generate single Kenyon cell clones
Timing: ∼10 daysTo achieve the expression of the cell marker (mCherry) and calcium indicator (GCaMP3) in single Kenyon cells, a temporally precise heat-shock must be applied to induce the action of Hsp70-FLP1 on FRT sites. This causes stochastic flipping-out of tubP-Gal80 and allows Gal4-mediated expression of transgenes downstream of UAS sites (Lee and Luo, 2001). To more specifically target γ-type Kenyon cells, here this heat-shock is applied at 48 h after egg laying – the time at which these cells are born (Lee, Lee, and Luo, 1999). For a schematic depiction of this step, see Figure 1.Transfer the fly cross set up in the previous step to a fresh food vial for 4 h to collect eggs.Allow these offspring to develop for 48 h under normal rearing conditions in an incubator.48 h after the egg-laying period, transfer the food vial (containing the larval offspring) to a water bath heated to 37°C for 45 min such that the lower 3/4 of the vial is submerged.Remove the vial from the water bath and return to the incubator for 30 min.Repeat step 6.Return the vial to the incubator and allow for development until the adult stage.Collect the emerging F1 generation daily and keep in standard food vials. Experiments can be conducted on flies aged between 3 and 6 days post-eclosion.
Key resources table
Materials and equipment
Ringer’s solutionRinger’s solution is stored at −20°C before use, then kept refrigerated at 4°C after defrosting for no more than 3 weeks. The solution is adjusted to pH 7.3 using HCl or NaOH.Phosphate buffered saline (PBS) solutionPBS solution is stored at 4°C for no more than 2 months.Washing solutionWashing solution is stored at 4°C for no more than 4 weeks.Blocking solutionBlocking solution is stored at 4°C for no more than 4 weeks.
Step-by-step method details
Preparation of fly for imaging
Timing: 15 minIn this step, transgenic flies generated in the previous steps are prepared for functional imaging of odor-evoked calcium transients. For an in-depth description of these steps, also see Hancock et al. (2019). Photographs of the imaging chamber used in this study can be seen in Figure 2.
Figure 2
Custom-built fly chamber used for in vivo functional imaging experiments
(A) The fly chamber is formed of a microscope slide, plastic mesh, and clear adhesive tape and is fitted with two electrical wires that run parallel through the middle.
(B) A small hole is cut in the adhesive tape, leaving a platform to the front on which the head of the fly is later placed.
(C) A fly fixed in the chamber.
(D) The head of the fly glued in position and opened to reveal the brain.
Scale bars in (B) and (C), 1 mm; in (D), 0.5 mm.
Select a single transgenic female fly generated in the previous steps and place in an empty plastic vial on ice for 5 min to anaesthetize.Fix the fly in a custom-built imaging chamber using clear adhesive tape. The chamber should comprise of a narrow channel (with approximate width of 1 mm) into which the fly can be placed, ventral side down, with the head supported and stabilized to reduce movement. Placed in front of the head should be a channel through which an air stream can be delivered during the experiment. Under the fly should be two parallel electrical wires through which electric shocks can be delivered to the thorax during the training phase of the protocol.Cut a hole in the adhesive tape using a surgical scalpel blade to expose only the head of the fly and keeping the rest of the body covered.Using blue light-curing glue, fix the head on the back and sides to limit its movement. In this study, an insect pin held by concave-convex jaws was used to manipulate the glue around the head. Leave the dorsal surface of the head free for opening. Ensure there are no gaps through which the Ringer’s solution (applied in the next step) could leak.Apply a drop of room temperature (19°C–21°C) Ringer’s solution on the exposed head cuticle and open the head capsule using a fine bladed knife.Using fine forceps, remove the cuticle and any excess tissue that lies on top of the brain.Custom-built fly chamber used for in vivo functional imaging experiments(A) The fly chamber is formed of a microscope slide, plastic mesh, and clear adhesive tape and is fitted with two electrical wires that run parallel through the middle.(B) A small hole is cut in the adhesive tape, leaving a platform to the front on which the head of the fly is later placed.(C) A fly fixed in the chamber.(D) The head of the fly glued in position and opened to reveal the brain.Scale bars in (B) and (C), 1 mm; in (D), 0.5 mm.
In vivo imaging of odor-evoked calcium transients
Timing: 30 min to 1 hIn this step, the flies prepared previously are imaged using two-photon microscopy to visualize odor-evoked calcium transients in single Kenyon cells before, during, and after an olfactory associative conditioning protocol conducted in vivo under the microscope. Photographs of the setup used in this study can be seen in Figure 3, and schematic summary of the imaging protocol can be seen in Figures 1E–1H.
Figure 3
Microscope setup for in vivo functional imaging
The fly chamber (A) shown in Figure 2 is placed under the microscope objective and is connected to electrical wires (D) and a needle (B) that connects the chamber to the odor delivery system (C). The odor delivery machine holds eight different odor bottles, from which odors are carried by a continuous airstream by the timely controlled opening and closing of valves at their opening.
Prepare the odor mixtures. In this study, MCH, 3-octanol, and 1-octanol were used at concentrations of 1:750, 1:500, and 1:400, respectively, in mineral oil. Install odors in the odor delivery system.Place the prepared fly under a microscope equipped for two-photon imaging. For details of the setup used in this study, see Figures 2 and 3 and the Key resources table.Illuminate the preparation using a red filter set. Through the eyepieces, observe the fly brain for expression of mCherry in Kenyon cells.CRITICAL: due to the stochastic nature of the MARCM expression system, a variety of outcomes are possible - ranging from single cell expression to expression in dozens of cells. In order to later identify single cells, only flies in which a maximum of 3 Kenyon cells per hemisphere are labelled can feasibly be utilized in these experiments.If the correct number of cells are labelled, position the fly head in the center of the field of view for imaging, ensuring the odor delivery system is in place and the electrical wires have been connected to a power source.CRITICAL: due to the sensitivity of detector systems used in this setup, limit external light sources as much as possible.Start the microscope control software and initialize image acquisition settings. To visualize both red and green fluorophores, an excitation wavelength of 940 nm and a customized filter set with a 605 nm beamsplitter and two bandpass filters of ∼620–680 nm for mCherry detection, and ∼500–550 nm for GFP detection is recommended. For specific software and equipment used in this study, see Key Resources Table.Initiate image acquisition and locate the labelled Kenyon cells. Crop and rotate the acquisition region such that the Kenyon cells are positioned in the center of the field of view.Through multiple z-planes, run a synchronized image acquisition and odor presentation sequence whereby, in each imaging plane, all of the odors and mineral oil are presented to the fly via air stream. Save these image sequences for later analysis.In this study, the airstream flow rate was 1 mL/s.Dependent on the number of cells and their anatomical complexity, the number of imaging planes required to capture maximal axonal branches can vary. In this study, generally between 4 and 7 planes were imaged per brain.In this study, a framerate of 4 Hz was used.Run the associative conditioning protocol. In this protocol, present one of the odors continuously for 60 s with overlapping pulsing electric shocks (this is now the CS+ odor). After a 60 s break, present a second of the odors for 60 s with no electric shocks (now the CS- odor). For control groups, either omit the electric shock (CS-only control) or deliver the electric shock 2 min before the onset of the first odor (unpaired control).For post-training data, repeat the odor presentation protocol as in step 13. Ensure that measurements are conducted in the same imaging planes as before the conditioning, so that odor-evoked responses can be compared in the same boutons.When all planes have been measured, capture a z-stack which covers the entire depth of the brain to later refer to when identifying and mapping cells/boutons.Remove the imaging chamber from the microscope and, with the fly intact, proceed to the next section.Microscope setup for in vivo functional imagingThe fly chamber (A) shown in Figure 2 is placed under the microscope objective and is connected to electrical wires (D) and a needle (B) that connects the chamber to the odor delivery system (C). The odor delivery machine holds eight different odor bottles, from which odors are carried by a continuous airstream by the timely controlled opening and closing of valves at their opening.
Brain explant and immunohistochemistry
Timing: ∼2.5 daysIn this step, the brain of the fly imaged in the previous step is removed for immunohistochemical staining. This will facilitate later confocal microscopic scanning of the brain to produce high resolution images from which the functionally imaged Kenyon cells can be fully anatomically characterized.Carefully remove the fly from the imaging chamber and transfer to a dissection dish containing a black-dyed silicon mixture (Elastosil-based, see Key Resources Table).Fix the fly in place, ventral side up, using insect pins through the thorax and abdomen and cover with 2–3 drops of ice-cold Ringer’s solution.Using fine forceps, carefully remove the proboscis.Pull apart the two sides of the head capsule until they are completely removed from the brain. Clear away the residual tissues from the brain.Detach the brain from the thorax, leaving behind the ventral nerve cord.Place the brain in fixative solution (4% paraformaldehyde in PBS) for 2 h on a shaker at 4°C.Wash the brain 3 times for 20 min each in PBS-T washing solution (PBS with 0.6% Triton X-100) at room temperature (19°C–21°C) on a shaker.Place the brain in blocking solution (2% bovine serum albumin in PBS-T) for 2 h on a shaker at room temperature (19°C–21°C).Transfer the brain to a dish containing a primary antibody mix containing antibodies against GFP (which will bind GCaMP in Kenyon cells) and discs-large (DLG; which will bind the pan-neuronal synaptic protein, discs-large) and incubate on a shaker at 4°C for 12–16 h. In this study, we used rabbit anti-GFP (Invitrogen) at a concentration of 1:2000 and mouse anti-DLG (Developmental Studies Hybridoma Bank) at a concentration of 1:200 in blocking solution.mCherry autofluorescence is in most cases robust enough to not require additional fluorophore binding, so no mCherry antibody is used in this study.Wash the brain as in step 24.Transfer the brains to a dish containing a secondary antibody mix. All secondary antibodies were used at a concentration of 1:300 in blocking solution. In this study, we used anti-rabbit Alexa Fluor 488 and anti-mouse Alexa Fluor 633. For further details about the antibodies used, see Key Resources Table. Incubate on a shaker at 4°C for 12–16 h.Wash the brain as in step 24.Mount the brain for confocal scanning. Inside a 13 mm tape ring, pipette approximately 5 μL of VectaShield and carefully place the brain in the liquid, taking care to orient the brain so that it lays flat with the anterior of the brain facing upwards for easier scanning.Scan the brain using a confocal laser scanning microscope. Laser and detector settings should be chosen according to the secondary antibodies used. To maximize image quality, use an immersion lens and a frame size of at least 1024 × 1024 pixels. Brains were scanned sequentially, such that GFP and DLG channels were captured simultaneously, followed by an additional scan for mCherry. For the exact hardware and software used in this study, see Key Resources Table.
Functional imaging analysis
Timing: ∼1–1.5 hIn this step, the images acquired during the functional calcium imaging step are processed and analyzed to quantify odor-evoked activity in individual synaptic boutons.Install and open an image processing program. In this study, ImageJ was used for all image processing steps.Either individually or using a custom-written batch-processor, correct each image series for any movement in the X and Y dimensions using an image registration plug-in such as TurboReg (Thévenaz et al., 1998).In each imaging plane, pre- and post-training, mark regions of interest (ROIs) encompassing individual synaptic boutons along the Kenyon cell axons. Boutons can be identified by their spherical shape and their greater size relative to the axonal diameter.CRITICAL: the number of identifiable boutons for a given Kenyon cell can vary widely, in this study ranging from 29–158 boutons. To investigate the effects of training on odor representations, only boutons that are identifiable in both the pre- and post-training recordings can be used in this analysis.For each bouton, use the “Multi Measure” function in ImageJ to extract fluorescence intensity values over time for both the green (GCaMP) and red (mCherry) channels of each recording.From the raw fluorescence values, calculate the ΔF/F0 values for each channel.First, generate the F0 value by calculating the average fluorescence values from the 5 s preceding odor onset.Second, generate the ΔF values by subtracting the F0 value from the raw fluorescence.Finally, divide the ΔF value at each frame by F0 to generate a ΔF/F0 trace over time.To temporally filter the ΔF/F0 trace, apply a 3-frame moving average through the time series.To reduce the presence of ΔF/F0 fluctuations that are due to slight movements in the preparation rather than calcium fluctuations, subtract the mCherry ΔF/F0 from the GCaMP ΔF/F0.
Kenyon cell anatomy and bouton mapping
Timing: 1–2 hIn this final image analysis step, boutons that have been functionally analyzed are allocated to a Kenyon cell (in the case of a brain in which multiple cells were labelled) and assigned to the correct compartment of the mushroom body γ-lobe. This facilitates the analysis of bouton activity in the context of their anatomical position along the Kenyon cell axon. A schematic depiction of this process can be seen in Figures 1J and 1K.In ImageJ, open the confocal image stacks of the immunostained brain.Using the mCherry and GFP image stacks, track the Kenyon cell(s) through the image stacks and generate a 3-dimensional projection view of the Kenyon cell(s). This projection will aid in the translation of the bouton positions from the functional imaging view (dorsal) to the anatomical imaging view (anterior).If necessary, separate the distinct Kenyon cells to form separate projections for each cell.Using the z-stack generated during functional imaging, map the identified boutons onto the anatomical images. Boutons for which positions cannot be translated should not be analyzed.Using the anti-DLG neuropil staining, identify the 5 compartments of the mushroom body γ-lobe, and note the compartment location of each of the measured boutons.
Calculating the amplitude corrected correlation (ACC)
Timing: 20 minThe overall aim of the analysis described in this step is to quantify single bouton responses before and after learning. This is achieved through two different analysis protocols - the Bouton Response Class analysis (BRC) and the Amplitude Corrected Correlation (ACC) (see Figure 4). Both protocols analyze the bouton responses, with regard to the individualization of each bouton, which is in contrast to the canonical approach, in which the comprehensive cell response is quantified (e.g., in the form of calcium imaging or membrane potential). We developed the ACC to quantify the congruence of Kenyon cell synaptic boutons within the same cell. This congruence reflects both the temporal structure of the calcium responses and their amplitude.
Figure 4
Workflow of the analysis pipeline
Different shapes in the flow diagram are illustrated in the upper right corner, within the dashed gray line. Rectangles with rounded corners denote the start or end of the workflow. Rectangles with sharp corners indicate routine calls. Parallelograms highlight data structures, whereas diamond shapes indicate decisions by the user. The different boxes are color coded for the different programming environments (light blue, ImageJ/Fiji; green, table calculations; orange, MATLAB). The workflow starts with the dynamics of calcium-dependent fluorescence changes in single boutons and their compartment location. These data are then transferred into xlsx or csv files. The KCC loading routines then make those data available for two different analysis options: the Amplitude Corrected Correlation (ACC) index or the Bouton Response Class (BRC) analysis. The analysis pipeline ends in data structures or plots.
Workflow of the analysis pipelineDifferent shapes in the flow diagram are illustrated in the upper right corner, within the dashed gray line. Rectangles with rounded corners denote the start or end of the workflow. Rectangles with sharp corners indicate routine calls. Parallelograms highlight data structures, whereas diamond shapes indicate decisions by the user. The different boxes are color coded for the different programming environments (light blue, ImageJ/Fiji; green, table calculations; orange, MATLAB). The workflow starts with the dynamics of calcium-dependent fluorescence changes in single boutons and their compartment location. These data are then transferred into xlsx or csv files. The KCC loading routines then make those data available for two different analysis options: the Amplitude Corrected Correlation (ACC) index or the Bouton Response Class (BRC) analysis. The analysis pipeline ends in data structures or plots.The former can be directly quantified by the cross-correlation between both calcium responses. The correlation is further normalized by its auto correlation coefficients, limiting the numerical range of the cross-correlation from 0 (not correlated) to 1 (identical temporal structure).where the time-series of the calcium responses are represented by either Cl1 or Cl2. The time-point is demarcated by t and the phase lag of the correlation by τ.To address the difference in response amplitude, the Michelson contrast of the two amplitudes is calculated as: , where Ax is the respective maximum amplitude of each calcium response. Thereby, the contrast value becomes 1 if there is no difference between both responses and approaches 0 if they are very dissimilar.The resulting ACC is sensitive to congruent responses, meaning that it correctly detects similar response pairs. However, traces that lack any response will also render an ACC close to 1. To remedy this, a third term is introduced that calculates the mean response of two boutons, normalized by the maximum response of the neuron:A1 and A2 are again the maximum amplitude of the responses and n represents the entirety of all responses. Thereby, flat responses are set to 0, while robust responses will render values close to 1.Now each of the three measures (cross correlation, amplitude contrast, and normalized mean amplitude) are within the limits of 0 to 1 and can be multiplied to derive a sensitive and specific measure to quantify the congruence in the responses of two synaptic boutons as follows:For the MATLAB (MathWorks, USA) implementation of the aforementioned formulas, as used in this study, see Key Resources Table. In the following steps, an example function call is given that can be tested with the data deposited at https://data.mendeley.com/datasets/wf7gz3wfr3/1.Download the scripts from https://github.com/zerotonin/KCC_KenyonCellCorrelator/ and the sample data from https://data.mendeley.com/datasets/wf7gz3wfr3/1. For these scripts to run smoothly, data files must follow a strict format, as described below.Response data for each cell is saved into one xlsx file. The file consists of two sheets in which sheet 1 contains the pretraining responses and sheet 2 the post-training responses.Each sheet includes 4 tables of m rows and n columns. The columns hold the information for each identified bouton and each row reflects the sample time. The first row of the sheet shows in which γ-lobe compartment the bouton is situated. The first column identifies which odor was used for stimulation.In this step, an xlsx file is read and transcribed it into a 4-dimensional matrix. The input variables are defined as follows: fpos is a string with the file position of your xlsx file. samples describe the length of each recording. gap holds the amount of empty rows between different odor presentations in the xlsx file. The resulting variable is the 4 dimensional data m × n × p × 2 matrix, where m is the number of frames recorded, n the number of boutons, p the number of presented odors, and the fourth dimension holds the pre-/post-training condition. The second return variable is a vector of n-length with the γ-lobe compartment identification (i.e., γ2, γ3, γ4, or γ5).%% load file% set path to your xlsx filefPos = '/path2/Controls/A_170320_3003_0304_fly1_cell1_pre_post.xlsx';samples = 85;% number of frames acquired during Ca2+ imaginggap = 3;% empty rows between each of the odor presentations% function call to read in xlsx example data file[data,ylobesIDX] = KCC_fIO_loadXLSX(fPos,samples,gap);If data are already in MATLAB format, steps 44 and 45 can be omitted. In this case, the data should be arranged in a 4 dimensional matrix (m × n × p × 2) where m is the number of frames recorded during the experiment, n is the number of boutons identified in the cell and p is the number of presented odors. The fourth dimension represents the pretraining recording and then the post-training recording.In the next step, the cross-correlation for all boutons against all other boutons is calculated. To do so, use the data variable created in the last step and define the following inputs: corrWin is a 2 entry integer vector holding the first and the last frame of the odor presentation. fps is the frame rate of the recording. maxPhaseShift is the maximum temporal deviation between two calcium traces allowed during the cross-correlation analysis. The function call “KCC_fbf_xcorr” will result in another 4D matrix (m × m × 4 × 2) holding the correlation coefficients normalized by their auto correlation such that these values will be scaled from 0 (no correlation) to 1 (identity). Here, m is the number of boutons, the third dimension holds odor identity, and the fourth dimension is pre-/post-training. The diagonal of the m × m slides of the cross-correlation matrix are NaN (not a number) values, as these represent identity and are therefore not explicitly calculated. Function call for this step:%% calculate the cross correlation between all boutons%data is the output variable of KCC_fIO_loadXLSXcorrWin = [4 13]; % correlation windowfps = 4; % frames per secondmaxPhaseShift = 5; % maximum of temporal deviation between both boutons%function call to calculate cross correlationcorrMat = KCC_fbf_xcorr(data,corrWin,fps,maxPhaseShift);Next, prepare the amplitude data using the KCC_fbf_meanAmps function to then combine everything in Step 48. This function call gets inputs from the previously run functions, and results in 3 new variables: dataM is a m × 4 × 4 × 2 matrix holding the median response for all boutons of each γ-lobe compartment, where m is the number of frames recorded. The second dimension is the four γ-lobe compartments, the third represents the four odors, and the fourth is the pre-/post-training condition. amps is a 4 × 4 × 2 matrix in which the first dimension represents the γ-lobe compartment, the second dimension the odor, and the third the pre-/post-training condition.%% calculate the correction factors% calculate the mean response[dataM,amps,ampsN] = KCC_fbf_meanAmps(data,ylobesIDX,corrWin,fps);Finally, to calculate the ACC index, run the KCC_fbf_lobeSimilarityCorr function. The resulting variables are the ACC and lobesCorr. lobesCorr is a m × m × 4 × 2 matrix, where m is the number of γ-lobe compartments. Each entry is the median of all bouton-to-bouton correlations specific for a compartment, an odor, and the pre-/post-training condition. The odors are represented in the third dimension and the pre-/post-training condition is represented in the fourth dimension. The ACC is identical to the lobesCorr variable, but is multiplied with the amplitude contrast and relative amplitude strength, as below:%% calculate ACC index[ACC,lobesCorr] = KCC_fbf_lobeSimilarityCorr(corrMat,ylobesIDX,amps,ampsN);To calculate the pre- to post-training differences in ACC indices, use the function “KCC_fbf_lobeSimilarityDiff”, which will carry out a simple subtraction. The resulting 3D matrix contains the difference in ACC as a m × m × 4 matrix where m is the number of γ-lobe compartments and the third dimension represents the four different odors presented in the experiment.%% calculating the pre post difference of the ACCaccDiff = KCC_fbf_lobeSimilarityDiff(ACC);If only pre- or post-training data are of interest (and not the comparison between them), step 49 can be omitted.Save the data into a MATLAB data file:%% save result%set file position where data should be savedsavePos = '/folder2/saveDestination.mat';% saving to disksave(savePos,'ACC','accDiff','corrMat','dataM','data',...'ylobesIDX','amps','ampsN','lobesCorr');Through steps 49 and 50, the primary analysis for the experiment is completed. To plot the results of these steps, use the following functions:%% plotting% bouton-to-bouton cross-correlationKCC_plot_plotBoutonCorrelation(1,corrMat,ylobesIDX);% mean bouton responses by compartment (see
Bilz et al. (2020), Figure 3A)KCC_plot_deltaFbyFmeans([2,3],data,dataM,ylobesIDX);% ACC indices (see
Bilz et al. (2020), Figure 6B, left and center plots)KCC_plot_plotLobeSimilarityCorrelation([4 5],lobesCorr,ACC);% calculate pre- to post-training ACC differences (see
Bilz et al. (2020), Figure 6B rightmost plots)KCC_plot_plotLobeSimDiff(6,accDiff);The full MATLAB script used in this study is available by following the link in the Key Resources Table.
ACC analysis
Timing: 20 minIn the previous step, single synaptic bouton responses were quantified in the form of the ACC. Now, these results are used to acquire information about the responses of all boutons of a single neuron.In this step, the resulting data from the ACC calculation is combined to draw conclusions about the congruity of bouton responses and, more specifically, how this is modulated through the associative conditioning paradigm applied during the experiment. To this end, it is necessary to build so-called “collections”. That is, compose a collection of a subset of the data grouped according to the different experimental conditions (e.g., the different training conditions used in this study). This collection can then be analyzed further, and the results can be seen in Bilz et al. (2020), Figure 6.Compose the data collection by choosing the datasets that fit all criteria. The data collection variable should be the compiled dataM variables for the specific odor presentation (e.g., CS+, CS-, CS-only). This would in theory result in a 5 dimensional m × m × 1 × 2 × p matrix, where m represents the number of γ-lobe compartments, the third dimension is the chosen stimulus odor, the fourth dimension represents the pre-/post-training condition, and p represents the different cells. As the third dimension now became a singleton dimension we can eliminate it by using the squeeze function in MATLAB. The 5D matrix (m × m × 1 × 2 × p) thereby becomes 4D (m × m × 2 × p), and here we call this variable “collection”.%% reducing the collection dimensionalitycollection = squeeze(collection5Dl);Using the collection variable, calculate the median pretraining condition as follows:%% calculating median pretraining ACC indicesmedPre = median(collection(:,:,1,:),4)Now, the difference between the pre- and post-training conditions can be calculated using the bsxfun function and, again, using the squeeze function, this matrix can be reduced from four dimensions (m × m × 1 × p) to three (m × m × p), where m is the number of γ-lobe compartments and p is the number of cells.%% calculating pre-/post-training differencediffData = bsxfun(@minus,collection(:,:,2,:),medPre);diffData = squeeze(diffData);In this step, the median response difference between pre- and post-training is determined and tested for statistical significance. In this study, we used a non-parametric confidence interval (CI). Using this test, we ask whether there is a statistically significant change (either increase of decrease) in the ACC indices before and after the different training protocols implemented in the experiment. The function definition used in this study is largely based on standard functions of MATLAB and is used as below:%% calculating the median differences and the corresponding 95% confidence intervalmedDiff = median(diffData,3);% lo represents the lower confidence interval and hi the higher confidence interval[lo,hi]=confintND(diffData,3);If lo and hi are both below zero, there is 95% confidence that there is a decrease in the bouton response congruity. If both are above zero there is 95% confidence that there is an increase in the bouton response congruity. In both cases, the null hypothesis that the congruity does not change from pre- to post-training condition can be rejected with a 5% reversal probability.
Bouton response classes
Timing: 30 minIn this step, bouton responses are categorized into distinct classes, so-called Bouton Response Classes (BRCs). Each class then represents a distinguishable response signal. Thereby we can reduce the complexity of the responses from a continuous signal with complex response properties (amplitude, latency, etc.) to a single class. This can then be used to examine which classes are prevalent under different conditions (e.g., pretraining, CS+ post-training, CS- post-training, etc.).The calculation of Bouton Response Classes (BRC) is an augmenting analysis to the ACC. Where the ACC aims to check if the response of the boutons becomes more or less similar in respect to the training, the BRC approach aims to describe the different response types of boutons. Using a similar collection as in the ACC analysis, we can use hierarchical agglomerative clustering to identify and analyze recurring odor response types (so-called BRCs) observed across Kenyon cell boutons.The first step in this analysis is feature selection. Features are parameters of the data that can be quantified and are characteristic of the data set to be analyzed. In this study, we used the peak amplitude (ΔF/F0) during the stimulus presentation and the latency to the peak (s).Agglomerative hierarchical clustering initially treats every sample of the data set (i.e., each bouton response) as one cluster. The clustering algorithm then calculates the distances between data samples and merges them into progressively fewer, larger clusters. In this study, we used simple Euclidean distance. We also used Ward’s criterion (Murtagh and Contreras, 2017) to select which samples are merged first, such that minimal within-cluster variance is prioritized.The result of such a clustering algorithm is the assignment of each sample to one cluster, in this case assignment of each observed bouton response to a BRC. Once the BRCs are calculated, their median response, frequency of occurrence and, in this case, how these parameters change from pre- to post-training condition, can be calculated.Select all cells of your collection by the appropriate criteria (e.g., training condition).Load the data, ylobesIDX, and fps variable for each of your cells. data is a m × n × p × 2 matrix, where m is the number of frames recorded, n the number of boutons, p the number of presented odors, and the fourth dimension holds the pre-/posttraining condition. ylobesIDX is a vector of n-length with the γ-lobe compartment identification (γ2, γ3, γ4, or γ5). Select the odors that are of interest. fps is the framerate used when acquiring the calcium traces.For the pretraining condition of each bouton, calculate the maximum amplitude (amp) and the latency (ampT) to that amplitude. Given that a single response is saved in the vector boutResp, this can be done as follows:%% calculate bouton response features% find all peaks inside the stimulus presentation[ampHeights,frames]=findpeaks(boutResp(startOfStimPresentation:endOfStimPresentation));% find the highest peak[amp,ampT] =max(ampHeights);% find the original frame of the peak and divide by the fps to calculate it in secondsampT = frames(ampT)/fps;Store the results from step 58 in one m × 2 matrix (clustData) where m is the number of all boutons involved in this collection, and the first column holds the amp values and the second column the ampT values.CRITICAL: it is important to be able to associate your sample consisting of these features with the cell, γ-lobe compartment, and other critical information for the later analysis.As the peak and the latency are measured in different units and widely differ numerically, in this step they are normalized to a mean of zero and a standard deviation of one – a process called z-scoring (Kreyszig, 1979). Z-score clustData via MATLAB’s built-in zscore function.%% z-scoringclustDataZS = zscore(clustData);This data can now be clustered via MATLAB’s hierarchical clustering algorithms, and a dendrogram and the derivative of the clustering costs over the number of clusters can be plotted (see Bilz et al. (2020), Figure 7A). The dendrogram shows each data sample on the x axis and the costs of merging on the y axis. The relationship between merger cost and cluster number is directly demonstrated by the second plot generated in this step – for which the derivative of the cost is normalized to the sum of the costs.%% clustering% agglomerative hierarchical clustering with Euclidean distance and Ward’s criterionZ = linkage(clustDataZS,'ward','euclidean');% plotting a dendrogram with as many leaves as data samplesdendrogram(Z,size(clustDataZS,1))% calculating the costs relative to number of clusterscost = flipud(diff(Z(:,3)));cost = cost./sum(cost);% plotting the costs - from 2 to length+1, as the derivative is n-1plot(2:length(cost)+1,cost)set(gca,'XScale','log')Based on the two graphs generated in step 61, one can identify the optimal number of clusters to utilize based on the increasing cost relative to sample mergers. This increase identifies to the user the number of clusters that can be formed before the cost of merges - due to the sudden merging of very distinct samples – rapidly rises. We refer to this number of clusters as kMax. In this study, the kMax of the dataset was 4. By using the cluster function of MATLAB, determine the assignment of the samples to the different clusters (BRCs) in the IDX variable:%% get cluster assignmentIDX = cluster(Z,'maxclust',kMax);Based on the IDX, calculate the mean response and the centroid of each BRC by running the following commands:% get centroidsfor kI =1:kMaxmeanResp(kI,:) = mean(boutonResponses(IDX==kI,:),1);centroid(kI,:) = mean(clustData(IDX==kI,:),1);endCombine the IDX variable with the ylobesIDX variable to calculate how often a given BRC is found in a specific γ-lobe compartment. As the compartment identifiers in our case range from 2 to 5 and the BRC identifiers range from 1 to 4, this data can be saved in a 4 × 4 matrix (BRC_occ):%% calculating the BRC occurrence per γ-lobe compartment% go through compartment identitiesfor yI =2:5% go through BRC classesfor brcI =1:4% sum up the combined logical indicesBRC_occ(brcI,yI-1) = sum(ylobesIDX == yI && IDX==brcI);endendCRITICAL: Make sure to keep the different data descriptors aligned. The assignment of BRCs is only relevant if you can associate it with the correct cell, treatment, γ-lobe compartment, etc.
Calculating bouton entropy
Timing: 10 minIn the previous step, odor response data were transformed from numerical to categorical data by assignment into BRCs. This facilitates the application of a more direct calculation of the variance of the neuronal activity that was observed in this study.To do this, we used the Shannon entropy (Shannon, 1949) as a measure for variance (Allaj, 2018). As entropy is measured in bits, we can directly see how many categories (BRCs, in this study) are needed to describe the responses in a γ-lobe (see Bilz et al. (2020) for more on this principle).In this study, we used a MATLAB script created by Will Dwinnel (see Key Resources Table) implemented as below.Choose a BRC IDX variable for the training condition and γ-lobe compartment of interest.Run the Entropy function as below:% calculate entropy for γ-lobeentropyRes = Entropy(IDX(ylobesIDX==2));
Expected outcomes
Using the method described here, we were able to generate transgenic flies that showed expression of our genetically encoded calcium indicator and cell marker in 1–3 Kenyon cells with a success rate of approximately 50%. The remaining flies generated showed expression in 4 or more cells, or, in some cases, no cells were labelled at all. The protocol shown here was attuned to achieve the optimal cell number for these experiments, and deviations from the heat-shock protocol outlined here would likely cause this success rate to fall. An example of a fly in which two cells were labelled and distinguished can be seen in Figure 5.
Figure 5
Example images obtained in this study
(A–D) Four example functional imaging planes show the axonal branches of the two labelled Kenyon cells.
(E) After immunohistochemistry, a confocal image series is used to disentangle the branches and identify individual cells, as well as mushroom body compartments. Here, a maximum projection is shown. All scale bars, 20 μm.
Example images obtained in this study(A–D) Four example functional imaging planes show the axonal branches of the two labelled Kenyon cells.(E) After immunohistochemistry, a confocal image series is used to disentangle the branches and identify individual cells, as well as mushroom body compartments. Here, a maximum projection is shown. All scale bars, 20 μm.Odor representations in the mushroom body are encoded very sparsely, meaning for each given odor only a very small proportion of the cell population is activated. In this study, we found that approximately 8%, 10%, 4%, and 2% of measured cells responded to MCH, 3-octanol, 1-octanol, and the diluent mineral oil, respectively (Bilz et al., 2020). This is in the range to be expected, based on previous studies (Honegger, Campbell, and Turner, 2011).
Quantification and statistical analysis
Data inclusion/exclusion criteria
This protocol and analysis are based on cells that exhibit responses to the olfactory stimuli used. Therefore, non-responsive cells are excluded from the analysis. Additionally, boutons must be excluded from the pre- to post-training comparison if they are not clearly identifiable in both recordings or they cannot be assigned accurately to a single cell or a mushroom body γ-lobe compartment.Similarly, if excessive movement of the fly brain during odor response measurements causes boutons to leave the focal plane such that their fluorescent intensities could not be accurately and reliably captured throughout, those recordings must also be discarded.
Limitations
In order to visualize calcium transients at the level of the presynaptic boutons and attribute those boutons to specific cells and mushroom body compartments, only 1–3 Kenyon cells can be imaged per fly. With the approximately 50% success rate of the MARCM technique in generating such flies and the additional limitation of only approximately 7% of Kenyon cells responding to a given odor, many trials are required in order to generate a robust sample size.
Troubleshooting
Problem 1
No (or few) odor responses are detectable during calcium imaging step (step 13).
Potential solution
If the percentage of imaged Kenyon cells that show odor-evoked responses is less than approximately 5%–8%, ensure that the fly has not died during the preparation or imaging procedure and that the brain is still intact. Also make sure that no glue or Ringer’s solution is covering the antennae and that odor delivery is not otherwise obstructed.
Problem 2
Flies die during functional imaging experiments (steps 1–17).If the imaging chamber is not constructed with the correct dimensions, it is possible that the body of the fly is compressed and the fly may die either through the process of the preparation or during the experiment. Ensure the fit of the chamber is adequate to restrain the fly and limit movement, without causing injury.Excessive humidity and/or the presence of liquid in the imaging chamber or on the thorax of the fly (e.g., due to leaks of Ringer’s solution during preparation, or condensation carried over from the chilled plastic vials used for anesthesia) can lead to a burning of the fly during the electric shock presentation. Ensure the seal around the head of the fly is water-tight (using the blue light-curing glue) to avoid leaks, and take care to not transfer any liquid on the body of the fly when placing it in the imaging chamber (e.g., by ensuring the plastic vial is dry before placing the fly inside).
Problem 3
No cells are labelled (step 9).Ensure that all transgenes are present in the flies generated. Also, during the heat-shock step, make sure that the vials are adequately submerged in the water bath so that larvae cannot crawl up the vial walls and partially escape the heat-shock.
Resource availability
Lead contact
Further information and requests for resources and reagents should be directed to and will be fulfilled by the Lead Contact, André Fiala (afiala@gwdg.de).
Materials availability
This study did not generate new unique reagents.
Data and code availability
The dataset generated during this study are available on Mendeley (https://doi.org/10.17632/wf7gz3wfr3.1) and code is deposited on GitHub (https://github.com/zerotonin/KCC_KenyonCellCorrelator).
REAGENT or RESOURCE
SOURCE
IDENTIFIER
Antibodies
Mouse anti-discs large (DLG)
Developmental Studies Hybridoma Bank
4F3 (RRID:AB_528203)
Rabbit anti-GFP
Invitrogen
A6455 (RRID:AB_221570)
Anti-mouse IgG (Alexa Fluor 633)
Invitrogen
A21050 (RRID:AB_2535718)
Anti-rabbit IgG (Alexa Fluor 488)
Life Technologies
A11034 (RRID:AB_2576217)
Chemicals, peptides, and recombinant proteins
Triton X-100
Carl Roth
3051.1
Bovine serum albumin
Carl Roth
8076.2
Paraformaldehyde (used at 4% in PBS with 0.1% NaOH)
Carl Roth
03435.1
Mineral oil
Sigma-Aldrich
M8410
4-Methylcyclohexanol (MCH)
Sigma-Aldrich
153095
3-Octanol (3-oct)
Sigma-Aldrich
218405
1-Octanol (1-oct)
Sigma-Aldrich
297887
Elastosil RT 601
Wacker Chemie
9102664429
Deposited data
All calculated data are deposited in Mendeley Data (https://data.mendeley.com/datasets/wf7gz3wfr3/1)