Skip to main content
Dryad logo

Melanic pigmentation and light preference within and between two Drosophila species


Cooley, Arielle et al. (2022), Melanic pigmentation and light preference within and between two Drosophila species, Dryad, Dataset,


Environmental adaptation and species divergence often involve suites of co-evolving traits. Pigmentation in insects presents a variable, adaptive, and well-characterized class of phenotypes for which correlations with multiple other traits have been demonstrated. In Drosophila, the pigmentation genes ebony and tan have pleiotropic effects on flies’ response to light, creating the potential for correlated evolution of pigmentation and vision. Here we investigate differences in light preference within and between two sister species, Drosophila americana and D. novamexicana, which differ in pigmentation in part because of evolution at ebony and tan, and occupy environments that differ in many variables including solar radiation. We hypothesized that lighter pigmentation would be correlated with a greater preference for environmental light, and tested this hypothesis using a habitat choice experiment. In a first set of experiments, using males of D. novamexicana line N14 and D. americana line A00, the light-bodied D. novamexicana was found slightly but significantly more often than D. americana in the light habitat. A second experiment, which included additional lines and females as well as males, failed to find any significant difference between D. novamexicana-N14 and D. americana-A00. Additionally, the other dark line of D. americana (A04) was found in the light habitat more often than the light-bodied D. novamexicana-N14, in contrast to our predictions. However, the lightest line of D. americana, A01, was found substantially and significantly more often in the light habitat than the two darker lines of D. americana, thus providing partial support for our hypothesis. Finally, across all four lines, females were found more often in the light habitat than their more darkly-pigmented male counterparts. Additional replication is needed to corroborate these findings and evaluate conflicting results, with the consistent effect of sex within and between species providing an especially intriguing avenue for further research.


Fly lines

Drosophila americana lines A04, A00, and A01, and Drosophila novamexicana line N14 were ordered from the Cornell University Drosophila Stock Center (Table 1), and maintained at Whitman College on Nutri-Fly Instant fly food (Genesee Scientific, San Diego, CA, U.S.A.). Flies were maintained at ambient light, on benches adjacent to windows.

Within D. americana, A01 is the lightest line that has been documented to date, and it contains a novamexicana-like (functionally “light”) allele linked to the tan gene, while the dark A00 line contains functionally “dark” alleles at both ebony and tan  (Wittkopp et al., 2009). The dark A04 line is functionally uncharacterized, although it is phenotypically very similar to line A00 (Table 1). Drosophila novamexicana-N14 is the best characterized line of its species (Wittkopp et al., 2009; Cooley et al., 2012), but is actually somewhat dark relative to the range of variation within D. novamexicana (see Davis and Moyle, 2019 for images of lighter lines).

Experimental overview

Mixed-species trials were performed in fall 2017, summer 2018, and spring 2019. For each trial, twenty male flies were placed in each cage: ten on each side, with five D. americana-A00 and five D. novamexicana-N14 on each side (Fig. 2A). This number was selected as being easily countable by eye. The number of flies in the “light” habitat was counted at 12 pm daily, for six days per trial. In 2019, an additional 4 pm data collection time was added to assess the effect of time of day on fly behavior.

Single-taxon trials were performed in the spring, summer, and fall of 2020, across five separate rounds of data collection. For each trial, ten flies were placed in each cage: five on each side, with each cage containing flies from a single line (Fig. 2A). The number of flies in the “light” habitat was counted at 12 pm daily, for six days per trial. Both males and females were tested in the 2020 experiments, but each cage contained only a single sex. Due to the COVID-19 pandemic, data collection by two of the experimenters was split between work done at Whitman College and work done at the students’ homes. In each case, the data were coded as two separate experiments based on their locations.

Cage construction

To provide alternate light environments for the behavioral choice experiments, cages were constructed using small, transparent betta fish tanks with a dark plastic divider (Fig. 2B). All outer sides of half of each cage were covered in two layers of duct tape to create a dark environment. Uniform holes ¼” in diameter were drilled into the dividers, allowing flies to pass between the light and dark sides of the cages. The dividers were locked in place by hot glue, sealing them to the insides of the cages. Clear tape was used on the inside of the lids to prevent flies from escaping through air-holes. Each side of the container had identical plastic caps filled with synthetic fly food to sustain the flies throughout the trial period. Only enough water was added to the synthetic fly food to slightly saturate it, to prevent the buildup of excess condensation in the cages.

Selection of flies for behavioral trials

To ensure that flies used in the behavioral trials were no more than one week old, all adult flies were transferred out of the collecting vials one week prior to each trial. On the day of the trial, the collecting vials – containing flies which had eclosed within the past week – were chilled at 4°C to immobilize the flies. Genital morphology was used to sex the flies, since these species lack both sex combs and sex-specific pigmentation patterns. Flies of a single sex and taxon were sorted in sets of five into empty test tubes. The vials were kept off ice so liveliness could be evaluated once they warmed up. This was to ensure they had not been damaged and could fly and move normally. Flies that appeared old, deformed, or injured were also returned to the main population. Once collected and checked for liveliness, flies were re-immobilized by chilling on ice to facilitate transfer and were then poured into each side of the cage. The lids were secured with clear tape.

Data collection in the behavioral trials

In 2017, fly cages were placed in a darkened room under a greenhouse grow light set on a 12-hour timer. Due to concerns that the artificial light was creating warm temperatures, in all subsequent experiments, fly cages were instead placed on a table about a meter away from a large window, exposing them to natural sunlight.

Each trial was run for six consecutive days. At 12 pm every day, the number and species of flies in the light side of each cage were recorded. In the mixed-species experiments, this was done by looking for the number of dark-bodied flies (D. americana-A00) and light-bodied flies (D. novamexicana-N14) present in the light side of the cage. In 2019, a second observation period at 4 pm was added.

At the end of each trial, cages were placed in a freezer at -20 °C for one hour to immobilize the flies. This allowed us to remove the lid and more thoroughly look for missing or dead flies. The data from cages with dead or missing flies were excluded from analysis. We disposed of the flies and cleaned the cages with ethanol.

Temperature evaluation

In the 2019 experiment, a temperature control study was set up to test for a temperature difference between the light and dark sides of the cages. The wire probes of Fluke 52 II dual input digital thermometers (Everett, WA) were placed in both the light and dark sides of two empty cages. We recorded the temperature reading of each side of each cage, at noon and 4 pm daily for six days.

Statistical analyses

To test for differences in fly light preference, a generalized linear model was fitted using the glm() command in RStudio 1.3.1093, “Apricot Nasturtium,” within the lme4 package. We assumed a Poisson distribution for the dependent variable, which was the number of flies on the light side of the cage. Independent variables included a fixed effect of taxon; a fixed effect of sex in experiments that included both male and female flies; a fixed effect of time of day for comparisons between 12 pm and 4 pm; a random effect of cage, to account for the repeated measurements made on each cage; and a random effect of experiment to account for the fact that multiple rounds of data collection were performed, at different times and by different groups of experimenters.

A paired t-test in R was used to determine whether there was a significant temperature difference between the light and dark sides of the cages.


At the end of the 2020 experiments, the flies were visually inspected to verify homogeneity of pigmentation within each line. To further confirm that the lines had not interbred over the course of the experiments, one female fly of each line was sequenced at both the tan and ebony genes. DNA was extracted using the Omega E.Z.N.A. Tissue DNA Kit (Norcross, GA, U.S.A.) and eluted in 50 uL of water. Partial sequence was amplified from the tan gene using primers 5’- CCGATGCCTGTTCCATTAAC-3’ and 5’- GGCGGCTTGTATTTACCAAA-3’, and from the ebony gene using primers 5’-AGCCCGAGGTGGACATCA-3’ and 5’GTATGGGTCCCTCGCAGAA-3’, with G-Biosciences Taq DNA Polymerase (St. Louis, MO, U.S.A.). Thirty cycles of PCR were performed with a 54°C annealing temperature and a 30-second extension time. PCR product purity and concentration were estimated from a 1% agarose gel. Samples were sequenced using both forward and reverse primers by Eton Biosciences (San Diego, CA, U.S.A.). Sequences were compared to sequences of D. americana and D. novamexicana obtained from GenBank and from Cooley et al. (2012). Alignments were created in Geneious R9 (

Usage Notes

“Experiment” – character variable – unique name given to each round of experiments. Differences across experiments include year, season, identity of the researcher, whether the data were collected at a student’s home (during the Sars-CoV-2 pandemic – marked “home”) - and which lines and sexes were included.

“Taxon” – character variable.

  • N14 = Drosophila novamexicana (light pigment)
  • A01 = Drosophila americana (moderate pigment)
  • A00 = Drosophila americana (dark pigment)
  • A04 = Drosophila americana (dark pigment)

“Unique CageID” – numeric variable. Flies were counted once per day, for six days per cage. Each cage is assigned a unique ID number.

“Day” – count variable. Records observation day, with Day 1 being ~24 hours after flies were placed in the cage.

“FliesInLight” – count variable. Number of flies observed on the light side of the cage. (Number on the dark side could not be observed directly.)

“Imputed?” – a comments column, marking two experimental days in which observations were not obtained for a set of cages. The data were instead imputed, by fitting a line to (Flies in Light) as a function of (Day) for the collection of cages with missing data.


NSF-DEB, Award: 1655311

NSF-DEB, Award: 1754075

Whitman College, Award: Abshire and Faculty-Student Research awards

NSF-DEB, Award: 1655311

Whitman College, Award: Abshire and Faculty-Student Research awards