Login processing...

Trial ends in Request Full Access Tell Your Colleague About Jove


Dyeing Insects for Behavioral Assays: the Mating Behavior of Anesthetized Drosophila

doi: 10.3791/52645 Published: April 22, 2015


This protocol describes a simple, cost effective way to individually identify Drosophila or other insects. Demonstration data investigating mating success across three species of Drosophila show that this method is comparable or better than the use of CO2 anaesthesia.


Mating experiments using Drosophila have contributed greatly to the understanding of sexual selection and behavior. Experiments often require simple, easy and cheap methods to distinguish between individuals in a trial. A standard technique for this is CO2 anaesthesia and then labelling or wing clipping each fly. However, this is invasive and has been shown to affect behavior. Other techniques have used coloration to identify flies. This article presents a simple and non-invasive method for labelling Drosophila that allows them to be individually identified within experiments, using food coloring. This method is used in trials where two males compete to mate with a female. Dyeing allowed quick and easy identification. There was, however, some difference in the strength of the coloration across the three species tested. Data is presented showing the dye has a lower impact on mating behavior than CO2 in Drosophila melanogaster. The impact of CO2 anaesthesia is shown to depend on the species of Drosophila, with D. pseudoobscura and D. subobscura showing no impact, whereas D. melanogaster males had reduced mating success. The dye method presented is applicable to a wide range of experimental designs.


Over the last few decades there has been increasing interest in how sexual selection and competition between males impact on evolution1,2. Experiments on mating behavior have played an important role in developing and testing theories of sexual selection3,4. In particular, research using species of the genus Drosophila, has contributed greatly to the understanding of sexual selection and behavior. However, it is important to investigate whether commonly used techniques might artificially bias the results of standard mating experiments5,6.

Anaesthesia is often used for handling and identification in experiments7. For example, flies are commonly collected before mating, or sorted into genotypes or experimental treatments using carbon dioxide (CO2) anaesthetic. In experiments where two or more individuals need to be distinguished, it is common practice to anaesthetise the flies and clip part of the wing off to identify each individual or treatment group5,8. It is vital, however, to understand how CO2 treatment will affect behavior. The effect of CO2 anaesthesia has been examined in Drosophilamelanogaster in which males exposed to CO2 took significantly longer to mate and overall had lower mating success than non-anaesthetized males or males anaesthetized using exposure to cold5. This effect was observed both when anaesthesia was applied on the day of the experiment and when flies were given one day to recover. However, this study was limited in only examining trials where a single male was presented to each female5. A more realistic scenario is for a female to encounter multiple males9,10, allowing competition between males, which might allow the detection of more subtle losses of male fitness due to anaesthesia. The use of CO2 anaesthesia has also been found to reduce fecundity and longevity of adult D. melanogaster when they are exposed shortly after eclosion, as is common when collecting virgin flies11.

An alternative to CO2 anaesthesia is to mark flies by feeding them food colored with dye4,6,10,12,13. This dye enters the intestines of the fly and is visible through the abdomen, allowing colored flies to be distinguished from uncolored flies, or from flies labelled with a different color. Methods differ in how this can be applied: being added directly to the food12, via dyed supplementary yeast paste6, or via exposure to a novel dyed food substrate13. These marking techniques appear to show no effect on mating performance4,6. However, a paper directly examining the effects of the same food coloring on adult D. melanogaster found a strong reduction in lifespan14. Previous work has also focused almost entirely on D. melanogaster, both with regard to the effects of CO2 anaesthesia5,11 and food coloring14 methods. Currently, there is little information on how COanaesthesia or the use of intestinal coloring affects the mating behavior of other Drosophila.

The following study evaluates the effect of CO2 anaesthesia on the mating behavior of three species of Drosophila (D. melanogaster, D. pseudoobscura, and D. subobscura). The effect of collecting flies on CO2 was examined in both single and two male mating trials. The effect of CO2 has also been found to vary in D. melanogaster5and so different latency periods between exposure to CO2 and mating were tested. An alternative marking method to anaesthesia and wing clipping: the use of food dyes to stain the flies is also evaluated.


1. Preparation of Fly Food with Food Coloring

  1. Take a standard Drosophila vial with approximately 20 ml of food in the bottom (Figure 1). Use the following recipe for food mix using 1 L of boiling water: 10 g of agar, 85 g of dextrose, 60 g of maize flour, 40 g of yeast, and stir for 5 min of simmering. Add 25 ml of 10% nipagen once the mixture has cooled to 75 °C.
  2. After the food has cooled and solidified add two drops (approximately 0.5 - 1 ml) of blue food coloring to the top of the food and spread over the whole surface of the vial (Figure 1). Use a different color dye if preferred.
  3. Leave the food for two days in the fridge so that the dye is absorbed by the top layer of food; this avoids excessive moisture damaging the flies during the maturation period. Add a small piece of tissue paper if excessive moisture is still a problem to blot up extra moisture and then subsequently remove it.
  4. Transfer flies onto the food either individually or in groups.
    Note: Flies will gain intestinal staining within 1 day of being placed on the food. Alternatively, fully mature the flies on the dyed food prior to the experiment (increased mortality during the maturation period was not observed from exposure to food dye).
  5. Check that the dyed flies can be easily distinguished from the non-dyed flies. If they cannot be distinguished, repeat steps 1.1 - 1.4 using either a higher concentration of dye, or a different dye.

2. Two Male Mating Trials Using Food Coloring

  1. For producing progeny, set up multiple vials containing pairs of female and male flies (small groups of males and females are also suitable, although take care to avoid crowding of larvae). Allow the females to lay eggs and move the flies to new vials every 5 - 7 days. Store vials at a suitable temperature for the species of interest (22 °C for D. pseudoobscura and D. subobscura and 25 °C for D. melanogaster).
  2. Before collecting experimental flies remove all flies from the collecting vials at a set time before collecting males and females to ensure they will be virgins (D. melanogaster – 6 hr at 25 °C, D. pseudoobscura – 18 hr at 22 °C, and D. subobscura – 24 hr at 22 °C).
    Note: If flies are not virgin this will bias their behavior in mating trials15.
    1. Store and mature male individually in standard 75 x 20 mm plastic vials (containing ~ 20 ml of food). This avoids the negative impacts on male mating behavior and fitness seen in some species when males are kept in groups16.
    2. Expose half of the males to the desired treatment (CO2 anaesthesia in this case). Use a CO2 mat or tap to expose the flies for the required time. Store half of the males in each treatment on colored food until the mating takes place. This will make them visually distinguishable during the mating trials.
    3. For transferring flies use an aspirator17. Label each vial to identify both the treatment and the color status of the male. Here, use four treatments (anaesthesia, non-colored = G-NC, anaesthesia, colored = G-C, no anaesthesia, non-colored, NG-NC, and no anaesthesia, colored, NG-C).
  3. Transfer newly emerged females into fresh food vials to mature as groups of 10.
  4. Allow flies to mature to the mating age (D. melanogaster – 3 days, D. pseudoobscura – 5 days, D. subobscura – 7 days18. Store flies at a suitable temperature for the species being studied (e.g., 22 °C for D. pseudoobscura and D. subobscura and 25 °C for D. melanogaster).
  5. Move females to individual vials (containing ~ 20 ml of food) 1 day before the mating trial for acclimatization to the mating vial. Label these vials so that vials can be differentiated. Be careful to blind the experiment by using neutral labelling (i.e., 1 - 150) so it is not possible to guess the identity of the flies in any vial.
    Note: The person who places the flies into each vial will have to know the identity of the flies placed in each vial as they will note which treatment was stained. However, the observer who watches the mating should not know their identity. To do this at least two experimenters will be needed, one to set up and one to observe.
  6. Begin the mating trials between 10 - 12 A.M., or at a time that coincides with the light coming on in the light/dark cycle the flies are exposed to (“dawn” for the flies). Add two male flies to each mating vial (containing a single female fly) using an aspirator. Ensure that the two males are from different treatments (anaesthesia or control) and that one has intestinal staining to make it possible to differentiate them from each other, and note which male is stained.
  7. If copulation occurs, record the status of the male that mates (either colored or non - colored). If trials last for 2 hr, assume the female will not mate.
    Note: 2 hr is suitable for these species, but other Drosophila may need more or less time.

3. Single Male Mating Trials

  1. For single male trials, repeat Protocol 2 with two changes:
    1. In step 2.3 do not keep males on colored food.
    2. In step 2.7, add only a single male to each vial.
  2. In step 2.8, record the time the fly is added to the vial, the time the mating starts and the time the mating finished should be recorded. From these values, calculate mating success, latency, and duration.

4. Data Analysis

  1. Use suitable statistics package for analysis. If the data are normal and only have two treatments, use t-tests or equivalent Generalized Linear Model (GLM). For two male experiments, use binomial tests or a binomial GLM that are available in any basic statistics package.
    Note: For the example data, all analyses were carried out in R version 3.0.319.
  2. Check the mating latency and mating duration data for normality, by plotting frequency histograms of latency and duration for each treatment20, and using a test for normality such as Shapiro-Wilk. If it is not normal, transform it, or use non-parametric equivalent statistics20.
    Note: For the example data from the single male experiments log transformation met the requirements of normality and equal variances.
  3. If the data can be normalized, use t-tests to examine differences between mating latency and duration in the single male mating trials when using two treatments21. If multiple treatments are used, try an Analysis Of Variance (ANOVA)20. If the data cannot be normalized, try equivalent non-parametric tests21.
  4. Use binomial tests to test for an effect of either food coloring or CO2 anaesthesia on the mating success of competing males20. If multiple treatments are used, as is the case with the example data, use a GLM with binomial error structure21.
  5. For the two male trials in the example data, use GLMs with binomial error structures. One GLM examined color as a response variable (colored = 0 and non-colored = 1) with species, gas status, and gas treatment fitted as explanatory variables.One GLM examined CO2 as a response variable (gassed = 0 and not-gassed = 1) with species, color status, and gas treatment fitted. In each case, produce the maximal model, and perform model simplification based upon AIC20.

Representative Results

Two male mating trials – The effect of CO2 anaesthesia on mating behavior

The best model found to explain the variation in the effect of CO2 anaesthesia contained species as a factor (with D. pseudoobscura and D. subobscura fused as they showed no differences between each other). In D. pseudoobscura and D. subobscura there was no significant effect of CO2 anaesthesia on mating success in two male trials (Z1,589 = 0.087, P = 0.931). For D. melanogaster, males exposed to CO2 anaesthesia had significantly lower mating success (Z1,589 = 2.467, P = 0.014). There was also a significant interaction between species and treatment (χ21,589 = 6.83, P = 0.009) with a greater effect being seen when D. melanogaster were exposed to gas at collection or 1 day before trials (Table 1). However, D. melanogaster males exposed to CO2 two days before the experimental trial did not show an effect of CO2.

Two male mating trials – The effect of intestinal coloring on mating behavior

Model simplification showed no significant effect of food coloring being found for any of the three species (P > 0.1). When treatment or gas status were included in the analysis these were also not significant (P > 0.1). The proportions of successful matings for colored flies across treatments are shown in Table 2. The difference in coloration between flies kept on colored and uncolored food can be seen in Figure 1. The intensity of the intestinal food coloring was greater in D. pseudoobscura and D. subobscura than in D. melanogaster.

Single mating trials – The effect of using CO2 anaesthesia on mating behavior

There was no difference in mating latency for any of the three species when CO2 anaesthesia was used to collect recently emerged adults. An effect was found for mating duration in D. subobscura when it was exposed to CO2 two days before mating trials (Figures 2 and 3; Table 2).

Figure 1
Figure 1. Photograph showing Vials of Colored and Non Colored Fly Food (A) and the Strength of Intestinal Coloration in Male D. Subobscura (B).

Figure 2
Figure 2. The Mean and 95% Confidence intervals for Copulation Latency for the Three Species Investigated in Single Male Trials, When Males were Anaesthetized (light bars) or Not Anaesthetized (dark bars) when Collected as Virgins before Sexual Maturity.

Figure 3
Figure 3. The Mean and 95% Confidence Intervals for Copulation Duration for the Three Species Investigated in Single Male Trials, when Males were Anaesthetized (light bars) or Not Anaesthetized (dark bars) when Collected as Virgins before Sexual Maturity.

Treatment Species No. trials No. flies coloured that mated p-value No. flies gassed that mated p-value
Collection on CO2 D. mel 73 36 1 27 0.0344
D. pse 79 41 0.8221 44 0.3682
D. sub 71 40 0.3425 33 0.6353
Exposed to CO2 18 hrs prior D. mel 57 28 1 19 0.0163
D. pse 65 32 1 31 0.8043
D. sub 68 38 0.3961 35 0.9036
Exposed to CO2 2days. D. mel 56 19 0.0222 32 0.3497
D. pse 70 32 0.5504 33 0.7202
D. sub 56 29 0.8939 26 0.6889

Table 1. Results from Two Male Choice Experiments Across All Species and Treatments Examined.

Species Trait d.f. t-value p-value
D. melanogaster Latency 58 1.379 0.174
Duration 58 1.243 0.221
D. pseudoobscura Latency 109 0.419 0.676
Duration 109 0.436 0.664
D. subobscura Latency 83 0.098 0.922
Duration 83 1.767 0.081

Table 2. Results from Single Mating Experiments Examining the Effect of Collection on CO2 Anaesthesia on the Mating Latency and Duration. Tests were carried out on three species of Drosophila (D. melanogaster, D. pseudoobscura and D. subobscura).


This data shows that the impact of CO2 anaesthesia is inconsistent between species, with two of three species showing little impact. Our results suggest labelling with food dye had a lower impact on male mating success than CO2 anaesthesia for D. melanogaster. These experiments demonstrate that food dyes can easily and cheaply be used to label flies for mating assays involving multiple males.

Of the three model Drosophila species examined, only D. melanogaster showed an effect of CO2 anaesthesia on mating performance in a competitive situation. In contrast, none of the species showed an effect of collection on gas in single mating trials in terms of mating latency, contrary to previous results for D. melanogaster5. The effect of competition could therefore be highlighting more subtle fitness effects of CO2 anaesthesia, which are only detectable under situations where there is male-male competition. Exposure at early collection and one day prior to the trial have a negative effect on the ability of males of D. melanogaster to gain a mating. Exposure two days prior to the trial however did not show any effect. Both D. pseudoobscura and D. subobscura did not show any effect of exposure to gas in any of the trials. One explanation is that D. melanogaster was vulnerable to early exposure to CO2 because it must be collected earlier in life (0 - 6 hr old) than the other species to ensure males are virgin. Hence male D. melanogaster of this age may be more sensitive as the cuticle of the fly is still hardening, compared to the other species which have had longer for their cuticle to harden. In general, this supports the idea that the effects of CO2 anaesthesia are species specific and investigators should appropriately test the effect in their target species. Currently, the majority of work on the effect of CO2 anaesthesia has been carried out on Drosophila melanogaster5,11,22 and therefore may not be appropriate to apply to other related species.

The alternative non-invasive method presented to differentiate flies is food dye. Results suggest this treatment had no effect in across all the species examined. However, while its use was successful in providing a cheap and easily visible marker for distinguishing between individuals it should be noted that the dye was easier to distinguish in D. pseudoobscura and D. subobscura than in D. melanogaster. Previous authors have used several colors (red, green and blue)4,6. We found blue coloring to be the easiest to distinguish in all species, particularly D. pseudoobscura and D. subobscura. Using several colors would potentially allow more complex experiments with many individually marked flies. However, preliminary tests of different dyes are essential, as some food dyes fail to color the flies, possibly being digested when consumed. Other dyes can have toxic effects and reduce survival of the flies, and should be avoided14). Alternative food coloring methods using more expensive stains have also been used for examining intestinal integrity for D. melanogaster23. These may provide an alternative, although more expensive, dyeing method23.

The dye method is as quick as CO2 wing clipping as flies can be stored on dyed food from collection. Uptake of the food was rapid (~ 3 hr), so storage O/N on colored food would also be sufficient to mark flies, as used in other studies6. However, the duration of the coloring is relatively short (~ 4 - 5 hr) compared to wing clipping (permanent) or fluorescent dust marking (10 - 12 days)24. As Drosophila species vary in appearance, different dyes will be more or less effective for different species, and as some strains (e.g., knock-out mutants) can be vulnerable to changes in diet, any use of dye requires a preliminary test of its effectiveness particularly if longer term exposure to dyes can be toxic14. In contrast to the study by Kalaw et al.14, we found no significant mortality after storage for multiple days on colored foods for D. melanogaster (3 days), D. pseudoobscura (5 days), or D. subobscura (7 days), probably due to the difference in dye used.

The critical step for successful use of the dye technique is step 1.5, validating that the chosen dye works well with the species and strain being used. An alternative technique involves applying colored dust to the outside of the fly prior to use in field experiments24. This method has been used for tracking individuals in the field due to the duration of marking and the ease of mass marking flies24. Although we have not explicitly tested this method in mating trials, it would be important to examine any effects that dust could have on the senses important in mating, particularly in Drosophila25, 26. In species, however, where intestinal dyeing is not possible, these methods could be suitable.

In conclusion we found that in two of the three species tested (D. pseudoobscura and D. subobscura) there was no effect found of either CO2 anaesthesia or food coloring on mating ability of males. For D. melanogaster a negative effect of CO2 anaesthesia was detected, but food coloring did not affect mating success in this species. Overall, the dye method provides a simple and cheap non-invasive method for identifying individual Drosophila that is equivalent or better than methods that require CO2 anaesthesia. It is likely this method would work across a range of species.


The authors declare that they have no competing financial interests.


We would like to thank Alex Hitchen and Meg Booth for their help with the mating trials. This work was supported by NERC grant NE/H015604/1 to TP.


Name Company Catalog Number Comments
Plastic tubing Fisher Scientific TWT-200-061G Other tubing may be suitable however it must fit within a 1ml pipette tip.
Fine mesh Any haberdashery - Fine curtain mesh is suitable
1 ml pipette tips VWR 83007-376 Various brands of pipette tips would be suitable
Plastic Vials Sarstedt 58.49 Larger vials or bottles could also be used.
Cotton Balls Lewis Medical Solutions 28170 The size of cotton will vary depending on the size of vials used
Blue Food colouring Thesugarcraftcompany - Other dye colours and brands can have variable results.
Sharpie Markers Steadtler Lumocolor 313 S Various colours can be used, but Lumocolor S give an excellent combination of durability and fineness
Stopwatch Salter SL3920 Any stopwatch with a good digital display would be fine



  1. Parker, G. A. Sperm competition and its consequences in insects. Biological Reviews. 45, 525-567 (1970).
  2. Hosken, D. J., Stockley, P., Tregenza, T., Wedell, N. Monogamy and the battle of the sexes. Annual Review of Entomology. 54, 361-378 (2009).
  3. Chapman, T., Liddle, L., John, K., Wolfner, M., Partridge, L. Female cost of mating caused by males accessory gland fluids. Nature. 373, 241-244 (1995).
  4. Avent, T. D., Price, T. A. R., Wedell, N. Age-based female preference in the fruit fly Drosophila pseudoobscura. Animal Behaviour. 75, 1413-1421 (2008).
  5. Barron, A. Anaesthetising Drosophila. for behavioural studies. Journal of Insect Physiology. 46, 439-442 (2000).
  6. Moeers, A. O., Rundle, H. D., Whitlock, M. C. The effects of selection and bottlenecks on male mating success in peripheral isolates. The American Naturalist. 153, 437-444 (1999).
  7. Ashburner, M., Thompson, J. N. The laboratory culture of Drosophila. The Genetics and Biology of Drosophila. Ashburner, M., Wright, T. R. F. 2a, Academic Press. London. 1-109 (1978).
  8. Powell, J. Progress and Prospects in Evolutionary Biology: The Drosophila Model. Oxford University Press. Oxford. (1997).
  9. Moore, A. J., Moore, P. J. Balancing sexual selection through opposing mate choice and male competition. Proceedings of the Royal Society of London, series B-Biological Sciences. 266, 711-716 (1999).
  10. Hollocher, H., Ting, C., Pollack, F., Wu, C. Incipient speciation by sexual isolation in Drosophila melanogaster.: Variation in Mating preference and Correlation between sexes. Evolution. 51, 1175-1181 (1997).
  11. Perron, J. M., Huot, L., Corrivault, G. W., Chawla, S. S. Effects of carbon dioxide anaesthesia on Drosophila melanogaster. Journal of Insect Physiology. 18, 1869-1874 (1972).
  12. Wu, C. I., et al. Sexual isolation in Drosophila melanogaster : A possible case of incipient speciation. Proceedings of the National academy of sciences. 92, 2519-2523 (1995).
  13. Melcher, C., Pankratz, M. J. Candidate gustatory interneurons modulating feeding behaviour in the Drosophila brain. PLoS Biology. 3, e305 (2005).
  14. Kalaw, V., Drapeau, M. D., Long, A. D. Effects of food coloring on longevity and viability of Drosophila melanogaster. Dros. Inf. Serv. 85, 128-129 (2002).
  15. Friberg, U. Male perception of female mating status: its effect on copulation duration, sperm defence and female fitness. Animal Behaviour. 72, 1259-1268 (2006).
  16. Lizé, A., Price, T. A. R., Heys, C., Lewis, Z., Hurst, G. D. D. Extreme cost of rivalry in a monandrous species male − male interactions result in failure to acquire mates and reduced longevity. Proceedings of the Royal Society of London, series B-Biological Sciences. 281, 20140631 (2014).
  17. Yeh, S. -D., Chan, C., Ranz, J. M. Assessing differences in sperm competitive ability in Drosophila. Journal of Visualized Experiments. (78), e50547 (2013).
  18. Holman, L., Freckleton, R. P., Snook, R. R. What use is an infertile sperm? A comparative study of sperm-heteromorphic Drosophila. Evolution. 62, 374-385 (2008).
  19. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing. (2011).
  20. Crawley, M. J. Statistics: An introduction using R. Wiley-Blackwell. Oxford, UK. (2005).
  21. Dytham, C. Choosing and Using Statistics: A Biologist's Guide. Wiley-Blackwell, Oxford, UK. (2010).
  22. Kaiser, M. Influence of anaesthesia by carbon dioxide on hatching time and weight at eclosion in Drosophila melanogaster. Drosophila Information Service. 76, 92-93 (1995).
  23. Rera, M., et al. Modulation of longevity and tissue homeostasis by the Drosophila. PGC-1 homolog. Cell Metabolism. 14, 623-634 (2011).
  24. Crumpacker, D. W. The use of micronized fluorescent dusts to mark adult Drosophila pseudoobscura. American Midland Naturalist. 91, 118-129 (1974).
  25. Jallon, J. M. A few chemical words exchanged by Drosophila during courtship and mating. Behaviour genetics. 14, 441-478 (1984).
  26. Liimatainen, J. O., Jallon, J. M. Genetic analysis of cuticular hydrocarbons and their effect on courtship in Drosophila virilis and D. lummei. Behaviour Genetics. 37, 713-725 (2007).
Dyeing Insects for Behavioral Assays: the Mating Behavior of Anesthetized <em>Drosophila</em>
Play Video

Cite this Article

Verspoor, R. L., Heys, C., Price, T. A. R. Dyeing Insects for Behavioral Assays: the Mating Behavior of Anesthetized Drosophila. J. Vis. Exp. (98), e52645, doi:10.3791/52645 (2015).More

Verspoor, R. L., Heys, C., Price, T. A. R. Dyeing Insects for Behavioral Assays: the Mating Behavior of Anesthetized Drosophila. J. Vis. Exp. (98), e52645, doi:10.3791/52645 (2015).

Copy Citation Download Citation Reprints and Permissions
View Video

Get cutting-edge science videos from JoVE sent straight to your inbox every month.

Waiting X
simple hit counter