The courtship conditioning assay can be used to measure learning and memory in Drosophila. In order to demonstrate this, the results presented here analyze STM and LTM in control flies compared to flies with the neuron-specific knockdown of Dhap-at. Control males express an RNA interference hairpin sequence targeting a Caenorhabditis elegans-specific gene, putative zinc finger protein C02F5.1219. This control strain ensures an equal number of upstream activating sequence (UAS) elements between the knockdown and control in the same genetic background, and the control RNAi hairpin accounts for any non-specific effects of the RNAi system. Control males (genotype: UAS-dcr2/+; P{KK108109}VIE-260B/+; elav-Gal4/+) show a significant reduction in CI in trained versus naïve for both STM (Figure 3A, p = 1.2 x 10-4, Mann-Whitney U-test) and LTM (Figure 3B, p = 1.2 x 10-4, Mann-Whitney U-test). This result reflects the normal capacity for learning and memory in these flies. Dhap-at knockdown flies (genotype: UAS-dcr2/+; P{KK101437}VIE-260B/+; elav-Gal4/+) also show a significant reduction of CI in trained versus naïve flies for STM (Figure 3A, p = 1.2 x 10-4, Mann-Whitney U-test). However, they do not show a significant reduction in CI after LTM training (Figure 3B, p = 0.33, Mann-Whitney U-test). The Mann-Whitney U-test was used to compare the mean CI of naïve and trained flies due to the non-parametric distribution of the CI data for some conditions (Figure 3A and 3B). The differences observed through the analysis of CIs are reflected by the LI for each genotype, which measures the percent reduction in CI in naïve versus trained flies (Figure 3C). There is no significant difference in LI between controls and Dhap-at knockdown flies for STM (p = 0.115, 10,000 bootstrap replicates, Figure 3C, Table 3), whereas the LI for LTM is significantly lower in Dhap-at knockdown flies (p = 0.0034, 10,000 bootstrap replicates, Figure 3C, Table 3). For the comparison of LI between genotypes, a randomization test20 adapted from a method first recommended by Kamyshev et al.7 was used. Since the LI is a single value derived from population data (i.e., mean CI-naïve and mean CI-trained), standard statistical methods that rely on experimentally derived distributions do not apply. The randomization test is distribution-free and uses bootstrapping (i.e., random sampling with replacement) to generate hypothetical data sets that are derived from the actual data. The analearn script (File S3) generates a set of hypothetical LIs for each genotype and calculates the difference between the control and the test genotype (LIdiff). This process is repeated 10,000 times, and the resulting values are used to determine the 95% confidence interval of LIdiff (Table 3). This data is used to generate a p-value indicating the probability that the LI of the two genotypes is different. The results shown here demonstrate that Dhap-at is required in neurons for LTM but not for STM.
In order to control for day-to-day variability, CIs and LIs are compared between replicate days (Table 4). Although some fluctuation in LI is observed from day to day, the results are generally reproducible. It is important to note that CI data can vary greatly depending on the control strain used and the environmental conditions of testing. The CI data shown here is typical for this control genotype, but other genotypes may exhibit a higher or lower mean CI and distribution.

Figure 1: Determination of the Courtship Index and Experimental Overview. (A) Images showing stereotypical male courtship behavior towards a female fly. Different stages of courtship behavior are shown: orientation (I), following (II), wing vibration (extension) and tapping (III), licking (IV), and attempted copulation (V). (B) Schematic overview of training and testing times relative to the incubator light cycle, marked in hours. Training times are indicated with bars, resting periods for STM and LTM are indicated with a dashed line, and the testing start point is indicated as an arrow. Note that the testing time for LTM is the day after after training. Please click here to view a larger version of this figure.

Figure 2: Equipment used for the Drosophila Courtship Conditioning Assay. (A) The housing block is a flat, bottom block with 500 µL of powerfood per well. It is sealed with a qPCR adhesive film with at least 4 holes per well that were created using a syringe needle with a 0.8 mm diameter. Individual rows are cut lengthwise into strips using a razor blade to allow opening and closing. (B) The aspirator is required for the gentle transfer of male and female flies without the use of anesthesia. The inset shows the tip of the aspirator, closed with a piece of cotton to keep the flies within the tip. (C) Setup of a two-camera system for the simultaneous recording of two courtship chambers. (D) A courtship chamber with 18 arenas. Sliding entry holes are used to place the flies in the arenas. The white dividers can be simultaneously opened to initiate interaction between the males and females. Please click here to view a larger version of this figure.

Figure 3: Analysis of STM and LTM in Control and Dhap-at Knockdown Flies. (A-B) Boxplots showing the distribution of CI values for naïve (N) and trained (T) flies of the control (gray) and Dhap-at knockdown (white) genotypes tested for STM (A) and LTM (B). (C) Corresponding LI values for control and Dhap-at knockdown flies tested for STM and LTM. Differences in LI between control and knockdown genotypes were compared using a randomization test (10,000 bootstrap replicates). Error bars indicate the standard error of the mean derived from the LI values calculated on different test days. The genotypes are: w+, UAS-dcr2/+; P{KK108109}VIE-260B/+; and elav-Gal4/+ (Control) and w+, UAS-dcr2/+;P{KK101437}VIE-260B/+; and elav-Gal4/+ (Dhap-at-RNAi). Please click here to view a larger version of this figure.
| General | Collect | Train | Test |
| day -11 | Start premated female collection cultures (step 1.3) | | | |
| day -10 | Start cultures for the collection of male test subjects (step 2.2) | | | |
| day 1 | | rep. 1 | | |
| day 2 | | rep. 2 | | |
| day 3 | | rep. 3 | | |
| day 4 | | rep. 4 | rep. 1 | |
| day 5 | | | rep. 2 | rep. 1 |
| day 6 | | | rep. 3 | rep. 2 |
| day 7 | | | rep. 4 | rep. 3 |
| day 8 | | | | rep. 4 |
| day 9 | Video data analysis and statistics (step 8) | | | |
| | | | |
| rep = repeat | | | |
Table 1: Example Timeline for Testing LTM over Three Replicates on Individual Days.
| Learning | STM | LTM |
| Training time | 1 h. | 1 h. | 8 h. |
| Resting time | 0 h. | 1 h. | ~ 24 h. |
| start training | 0 h. ALO | 0 h. ALO | 4 h. BLO |
| stop training | 1 h. ALO | 1 h. ALO | 4 h. ALO |
| start test | 1 h. ALO | 2 h. ALO | 0 h. ALO (next day) |
| ALO = after lights turn on, BLO = before lights turn on, STM = short term memory, LTM = long term memory |
Table 2: Training Duration, Training Times, and Testing Times for Learning, STM, and LTM.
| Genotype | Learning
condition | CI
naive | CI
trained | LI | LI
difference | Lower limit
(95% conficence interval) | Upper limit
(95% conficence interval) | p-value |
| Control | STM | 0.467 | 0.116 | 0.752 | NA | NA | NA | NA |
| Dhap-at-RNAi | STM | 0.699 | 0.257 | 0.633 | 0.119 | -0.030 | 0.265 | 0.116 |
| Control | LTM | 0.590 | 0.384 | 0.348 | NA | NA | NA | NA |
| Dhap-at-RNAi | LTM | 0.697 | 0.650 | 0.068 | 0.280 | 0.103 | 0.446 | 0.003 |
Table 3: Statistical Data Produced from the Analearn Script.
Statistical data produced from the analearn script. The output file of the bootstrapping R-script containing the genotype, learning condition (i.e., learning, STM, or LTM), mean CI naïve, mean CI trained, LI, difference between LI of the control compared to experimental condition (LI dif), the lower limit (LL) and upper limit (UL) of the 95% confidence interval of LI dif, and the p-value indicating the probability that there is no significant difference.
| | Control | | | Dhap-at-RNAi | | |
| | Average CI naïve | Average CI trained | LI | Average CI naïve | Average CI trained | LI |
| STM | Day 1 | 0.300 | 0.125 | 0.584 | 0.679 | 0.239 | 0.648 |
| Day 2 | 0.634 | 0.107 | 0.831 | 0.720 | 0.276 | 0.617 |
| All Days | 0.467 | 0.116 | 0.752 | 0.699 | 0.257 | 0.633 |
| LTM | Day 1 | 0.590 | 0.441 | 0.252 | 0.630 | 0.646 | -0.027 |
| Day 2 | 0.640 | 0.363 | 0.432 | 0.709 | 0.710 | -0.002 |
| Day 3 | 0.547 | 0.349 | 0.363 | 0.738 | 0.598 | 0.190 |
| All Days | 0.590 | 0.384 | 0.348 | 0.697 | 0.650 | 0.068 |
Table 4: CI and LI Values Obtained on Separate Testing Days.
| “naivelevel” determines the text that will identify naïve values for each genotype. The default is “N,” but this can be changed into any other alphanumerical text. |
“refmutation” is set to “NA” (not applicable) by default, but can be changed to the name of the control or the genotype in order to perform statistical comparisons.
This will cause the script to automatically select the control genotype. |
| "datname” refers to the name of the data file and can be specified in this argument instead of the default file selection. |
"header” can be used to indicate whether or not the data file contains column headers.
The default is “TRUE,” but a file with no headers can be used when this argument is changed to “FALSE.” |
"seed” initializes the random number generator. This is set by default to “NA” and ensures a random number each time the script is used.
By design, a bootstrap analysis will give slightly different results each time it is run, even when using the same data file.
When the seed is specified by any integer number larger than zero, the same set of random bootstrap samples is obtained. |
| "writeoutput” can be set to “TRUE” or “FALSE” in order to determine whether an output file will be generated. The default is “TRUE.” |
Table 5: Arguments used in the Analearn Function that Can Alter the Default Settings of the Function to Adjust the Parameters of the Bootstrapping
Supplemental File S1: Building plan of a courtship chamber. The file can be opened with any application that allows .stp extensions (CAD-files). Please click here to download this file.
Supplemental File S2: Example of an Input File for the Analearn Script. Please click here to download this file.
Supplemental File S3: The Analearn.R Acript. The file can be opened with R-studio18. Please click here to download this file.