It has been shown that gut microbes are very important for the behavior and development of Drosophila, as the beneficial microbes are involved in the identification of suitable feeding and egg-laying locations. However, in what way these associated gut microbes influence the fitness-related behaviors of Drosophila melanogaster remains unclear. Here, we show that D. melanogaster exhibits different behavioral preferences towards gut microbes. Both adults and larvae were attracted by the volatile compounds of Saccharomyces cerevisiae and Lactobacillus plantarum, but were repelled by Acetobacter malorum in behavioral assays, indicating that an olfactory mechanism is involved in these preference behaviors. While the attraction to yeast was governed by olfactory sensory neurons expressing the odorant co-receptor Orco, the observed behaviors towards the other microbes were retained in flies lacking this co-receptor. By experimentally manipulating the microbiota of the flies, we found that flies did not strive for a diverse microbiome by increasing their preference towards gut microbes that they had not experienced previously. Instead, in some cases, the flies even increased preference for the microbes on which they were reared. Furthermore, exposing Drosophila larvae to all three microbes promoted Drosophila development, while exposure to only S. cerevisiae and A. malorum resulted in the development of larger ovaries and in increased egg numbers in an oviposition assay. Thus, our study provides a better understanding of how gut microbes affect insect behavior and development, and offers an ecological rationale for preferences of flies for different microbes in their natural environment.

Gut microbiomes play important roles in different physiological processes of their hosts, such as nutrition (Wong et al., 2014; Newell and Douglas, 2014; Tefit and Leulier, 2017; Leitão-Gonçalves et al., 2017), development (Ridley et al., 2012; Shin et al., 2011; Storelli et al., 2011; Tefit and Leulier, 2017), longevity (Guo et al., 2014; Clark et al., 2015), immunity (Sansone et al., 2015) and disease avoidance (Van Nood et al., 2013; Zhang et al., 2015). The fruit fly, Drosophila melanogaster, has been largely used to study host–microbe interactions related to innate immunity and pathogenic association (Lemaitre and Hoffmann, 2007; Keesey et al., 2017). Recently several independent studies analyzing the diversity of gut microbes in D. melanogaster showed that the Drosophila microbiome mainly consists of yeasts, and two genera of bacteria, Acetobacter and Lactobacillus (Chandler et al., 2011; Broderick and Lemaitre, 2012; Staubach et al., 2013; Wong et al., 2011, 2017).

The environmental microbes that flies have been exposed to as larvae and adults not only drive the composition of the flies' gut microbiome (Chandler et al., 2011), but can also affect the flies' behaviors, such as oviposition (Tefit and Leulier, 2017) or foraging (Wong et al., 2017; Leitão-Gonçalves et al., 2017; Keesey et al., 2017). Furthermore, Drosophila larvae and adults can be attracted by odors emanating from food patches that have been previously used by larvae (Durisko and Dukas, 2013; Durisko et al., 2014) and a study performed with axenic Drosophila revealed that at least some of these attractants are produced by the larval gut bacteria (Venu et al., 2014). These results suggest that Drosophila adults may rely on microbe-derived volatiles for long-distance attraction to suitable feeding and egg-laying sites. Recent studies have demonstrated that Drosophila prefer a microbe co-culture, due to the metabolite exchange of the different microbes when grown together (Fisher et al., 2017), and that gut microbe composition can modify microbial and nutritional preferences of D. melanogaster, suggesting that microbiota can affect host chemosensory responses, preferences and behavior (Wong et al., 2017). However, we have limited understanding of how gut microbes, such as yeast and bacteria, affect Drosophila behaviors.

Several innate dedicated olfactory circuits in Drosophila have been described for detecting attractive yeast volatiles for oviposition (Dweck et al., 2015a), as well as circuits for aversive volatiles for detecting danger by fungal mold or parasitoids (Stensmyr et al., 2012; Ebrahim et al., 2015). However, it remains unclear whether similar circuits exist that help Drosophila to identify food containing healthy or preferred gut microbes. Here, we investigate whether fly health is affected by a diet containing primarily one microbe species, and whether flies raised on such a diet change their food preferences (i.e. they prefer food with microbes that could not be accessed previously, and were missing from their dietary intake). To do so, instead of treating flies with antibiotics and/or sterilizing eggs by dechorionation to produce axenic flies (Sabat et al., 2015; Koyle et al., 2016), we raised flies on diets enriched with Saccharomyces cerevisiae, Lactobacillus plantarum or Acetobacter malorum. We found that Drosophila raised on different microbes later differed regarding their olfactory behavioral preference, developmental time and fecundity.

Drosophila stocks

All experiments were carried out with wild type (WT) or Orco−/− transgenic Drosophila melanogaster of the strain Canton-S, which were obtained from the Bloomington Drosophila Stock Center (https://bdsc.indiana.edu/). D. melanogaster were raised on standard diet at 25°C with 70% humidity, and a 12 h light:12 h dark cycle. For behavioral experiments, 3- to 5-day-old flies of both sexes or 3rd-instar larvae were used.

Microbe strains

Saccharomyces cerevisiae (DSM1333), Lactobacillus plantarum (DSM-20174), Acetobacter malorum (DSM-14337) were purchased from Leibniz Institute DSMZ-German collection of microorganisms and cell cultures. Microbes were kept at −80°C in 50% glycerol for long-term storage. Fresh cultures were generated daily and grown at 30°C and 250 r.p.m. in YM medium (S. cerevisiae) or MRS medium (L. plantarum and A. malorum). To expose flies to specific microbes, 1 ml of stationary phase microbe culture pellet (OD=1) was washed and resuspended in 100 μl PBS; this was then inoculated on the surface of antibiotic-free fly food in a 1.5-cm-diameter fly vial, as previous described (Tefit and Leulier, 2017). One- or 2-day-old flies were distributed on fly food associated with the corresponding microbe, and transferred to a new vial twice per day. In order to test for short- and long-term effects of exposure to specific microbes, flies were either exposed to the corresponding microbes for 2 days, or were continuously bred for several generations under these conditions. For the latter, flies were allowed to lay eggs on medium with one of the microbes for 1 day and were discarded afterwards. The medium was not changed until the next generation of flies eclosed. Newly hatched flies were transferred to fresh medium with the same added microbes and their offspring were raised as before. The flies of the fifth generation raised under these conditions were transferred to fresh medium twice per day and were tested at an age of 3–5 days.

Trap assays

Trap assays were performed as previously described (Keesey et al., 2017). Briefly, 35 flies (30 female and 5 male flies, 3–5 days old, starved for 24 h) were introduced into a transparent plastic cup (length, 10×8×10 cm) with holes in the lid, that contained two smaller containers (height, 4.5 cm; diameter, 3 cm) with a cut pipette tip (tip opening, 2 mm). Experiments were always started at the same time of day and carried out in a climate chamber with the same conditions of fly breeding. Containers were equipped with a disc of filter paper (diameter, 5 mm) that was loaded either with 50 μl growth medium containing the equivalent of the microbe pellet or with 50 μl of growth medium only. By the use of a hemocytometer we estimated the numbers of cells per pellet as roughly 106 for S. cerevisiae and each 108 for L. plantarum and A. malorum. The number of flies inside and outside the traps was counted after 24 h. The attraction index (AI) was calculated as AI=(OC)/T, where O is the number of flies that entered the microbe trap, C is the number of flies that entered the growth medium trap and T is the sum of all flies tested. The resulting index ranges from −1 (complete avoidance) to 1 (complete attraction). A value of zero characterizes a neutral or non-responsive treatment. Each experiment was repeated 9–10 times.

Oviposition assays

Oviposition assays were carried out in a small container (10×10×20 cm) equipped with two Petri dishes (diameter, 5 cm) containing 0.5% agarose, of which one was loaded with 50 μl growth medium containing the equivalent of the microbe pellet or with 50 μl growth medium only. Twenty female flies, 4–5 days old, were placed in each container. Experiments were carried out in a climate chamber at the same conditions as the fly breeding. The number of eggs was counted after 24 h. The oviposition index was calculated as (OC)/(O+C), where O is the number of eggs on microbe treatment plate, and C is the number of eggs on the growth medium plate. Each experiment was repeated 10 times.

Feeding assays

Twenty-five flies (20 female and 5 male flies) were collected and tested at age 3–5 days. Flies were starved beforehand for 24 h with constant access to water. Flies were cooled for 3 min at −20°C and then transferred to the behavioral arena. The capillary feeder (CAFÉ) assays utilized glass micropipettes with liquid medium that were filled by capillary action and then inserted through pipette tips into the container holding the adult flies as previously described (Keesey et al., 2016, 2017). One capillary contained the control growth medium, while the other contained the microbe culture. The volume consumed from each side was measured after feeding for 4 h. Feeding index were calculated as (OC)/(O+C), where O is the amount of food consumed from the microbe solution and C is the amount of food consumed from the control solution. Each experiment was repeated 10 times.

Larval two-choice assays

The larval olfactory choice assays were performed as previously described (Ebrahim et al., 2015). The 50 3rd-instar larvae were placed in the center of a Petri dish which was filled with 0.5% agarose. The Petri dish contained two lids of an Eppendorf cap which were placed at opposite positions at the periphery of the Petri dish; 30 μl growth medium containing the equivalent of the microbe pellet or with 30 μl of growth medium only were loaded in each cap lid. Larvae were allowed to crawl for 5 min before their position on the Petri dish was determined. Attraction index was calculated as (OC)/T, where O is the number of larvae on the side of the dish loaded with microbe, C is the number of larvae on the medium control side and T is the total number of larvae. Each experiment was repeated 9–10 times.

Single pair courtship and mating assays

Newly emerged virgin flies were collected; males were kept individually in separate vials, and females were reared in groups of 20–30 flies. All courtship experiments were performed with 4- to 5- day-old virgin flies and the behavioral experiments were conducted within a circular courtship arena (height, 0.5 cm; diameter, 1 cm). Mating and courtship behaviors were documented for 60 min and then analyzed. Copulation latency was measured as the time that the male and female took until successful copulation. Copulation success was calculated as the percentage of all pairs that mated within the 60 min time span. For each combination of flies, the experiments were repeated 20–24 times.

Adult body weight, body size and ovary size measurement

Male and female adults were collected and exposed to each microbe for 2 days in a similar fashion as for the oviposition assays. Fifteen individuals for each treatment were weighed on a Sartorious analytical balance ME235P (Sartorius Weighing Technology GmbH, Goettingen, Germany). The images of 6 male and female adults for each treatment were taken under a stereo microscope (Axio Zoom V16, Zeiss, Germany), where the areas of head, thorax and abdomen were measured with ImageJ software. The ovaries from 10 female flies of each group were dissected in 1× PBS; images were recorded and area measured as above.

Fecundity assessment

Ten female and 5 male virgin wild-type or Orco−/− flies were collected directly after emergence and raised continuously on control diet or on diet enriched with one of the three microbes. The diet was changed every 24 h and egg numbers were recorded every day for 1 week. Each experiment was repeated 10 times.

Larvae developmental timing

Fifty 1st-instar larvae were transferred to control diet or diet enriched with one of the three microbes. The number of pupae appearing was counted twice per day until the last larvae of the population reached the pupae state. Each experiment was repeated 10 times.

Chemical analysis

To analyze the volatiles emitted by the different microbes, a 500 ml laboratory glass bottle was filled with 400 ml fresh culture of the microbes and closed with a custom-made polyether ether ketone (PEEK) stopper. The headspace was collected for 24 h on a Super-Q filter (50 mg, Analytical Research Systems; www.ars-fla.com) according to standard procedures. Airflow at 0.5 l min−1 was drawn through the bottle by a pressure pump. The filter was eluted with 1 ml hexane, and samples were stored at −20°C until analysis. The fly bodywash extracts were obtained by washing 1 fly in 30 µl of methanol for 6 h as previously described (Keesey et al., 2017; Dweck et al., 2015b), 8-10 individual flies for each treatment were extracted. GC-MS (HP5 and HP-innowax) analyses were performed on all volatiles and insect body wash collections. Microbe volatiles as well as fly odors were analyzed via GC-MS. The GC was equipped with a HP5 (for fly bodywash) or HP-innowax (for microbe headspace) MS column (30 m long, 0.25 mm id, 25 μm film thickness; Agilent Technologies) with helium used as carrier gas (1.1 ml min−1 constant flow). The inlet temperature was set to 250°C. The temperature of the GC oven was held at 50°C for 2 min and then increased by 15°C min−1 to 280°C. The final temperature was held for 15 min. The MS transfer line was held at 280°C, the MS source at 230°C, and the MS quad at 150°C. Mass spectra were taken in EI mode (at 70 eV) in the range from 33 m z−1 to 350 m z−1 with a scanning rate of 4.42 scan s−1. GC-MS data were processed with the MDS-Chemstation software (Agilent Technologies). Compounds were identified with the NIST 2.0 mass spectra database using the NIST algorithm. Identification was confirmed by comparison of Kovats retention indices with published data. Several compounds were also confirmed by comparison with synthetic standards (spectrum and retention time), obtained from Sigma-Aldrich (http://www.sigma-aldrich.com) at highest available purity. The internal standard bromodecane was used for quantification and statistical comparisons between analyzed samples.

Statistics analysis

Statistical analysis were performed using Prism 5, figures were prepared using Prism 5, Microsoft Excel and Adobe Illustrator CS5. Data were tested for a normal distribution and afterwards analyzed using two-tailed, paired t-tests or one-way ANOVA with Tukey's multiple comparison tests.

Drosophila preference for gut microbes

We first performed trap, oviposition and feeding assays (Fig. 1A) to analyze innate preferences of the flies for each of the different gut microbes. We next compared these preferences with those of flies that were either briefly exposed to one of the three species of gut microbes (S. cerevisiae, L. plantarum or A. malorum) or were reared on one of these microbes for several generations.

Flies raised on control diet without microbes were attracted by the headspaces of S. cerevisiae and L. plantarum, but were repelled by A. malorum (Fig. 1B). When we repeated the experiments with Orco−/− flies lacking functional odorant receptors (ORs), the preference for S. cerevisiae was abolished, while the preference for L. plantarum and the avoidance of A. malorum were not affected (Fig. 1C). We conclude that flies can detect the headspace of all tested microbes, and that the preference for yeast is governed by Orco-dependent ORs. We next gave the flies the opportunity to choose between oviposition sites with or without microbes (Fig. 1A). In contrast to the pure attraction assay, both wild-type flies (Fig. 1D) and Orco−/− flies (Fig. 1E) preferred to lay eggs on the plates with any of the three species of microbe. Hence, flies consider the presence of microbes during oviposition, and as this preference is conserved in Orco−/− flies, oviposition preference seems to be governed by ionotropic receptors (IRs) or gustatory receptors (GRs) that do not depend on the co-receptor Orco for the detection of environmental chemical cues.

In addition, we tested the flies’ feeding preference for the same set of microbes by performing a CAFÉ assay. In this assay, flies can choose between a solution with or without the microbe (Fig. 1A). As the liquids are presented in tiny glass capillaries, any preference should be based mainly on cues detected by the labellum and palps of the flies (although we cannot fully exclude the evaporation of volatile compounds from the capillaries and thereby the involvement of antenna in any kind of choice). However, we did not observe any preference for microbes versus the control liquid, and we assert that the labellum and palps do not seem to be involved in the flies' preference or avoidance of S. cerevisiae, L. plantarum or A. malorum (Fig. 1F,G).

We next asked whether the adult preferences are conserved in larvae using a larval attraction assay (Fig. 1A, bottom). Larvae showed the same preference trend as displayed by adult flies in the trap assay, i.e. larvae were attracted to S. cerevisiae and L. plantarum, but repelled by A. malorum, indicating that both larvae and adults share the same olfactory mechanisms involved in these consistent preference behaviors (Fig. 1H).

Flies detect cues of high ecological relevance, like harmful microbes or parasitoids via highly specialized neuronal circuits that are dedicated to detection of signature odors (Stensmyr et al., 2012; Ebrahim et al., 2015). In order to investigate whether the behavior towards any of the gut microbes of this study was governed by such a labeled line, we analyzed the headspaces of the different microbe cultures via gas chromatography-coupled mass spectrometry (GC-MS) (Fig. S1). In our samples, we also identified compounds like 3-methyl-1-butanol and 2-phenylethanol that are described as attractants (Knaden et al., 2012; Becher et al., 2012) and benzaldehyde which has been shown to be aversive (Knaden et al., 2012). However, all of these compounds are detected by rather widely tuned receptors at the concentrations that have been tested (Hallem and Carlson, 2006). Although we cannot exclude that we overlooked novel ligands that might be detected by a dedicated pathway, the presence of a wide range of general odors that are well known to attract flies, makes the involvement of a labeled line unlikely in Drosophila melanogaster response towards these microbes.

The effect of gut microbiome on behavioral preference of flies

After showing that the flies become attracted to two of the microbe types and that all microbes positively affect the flies' oviposition choices, we next asked whether the flies' behavior would change after they have been exposed to one of the microbes for a prolonged time. We hypothesized that flies after exposure to only one microbe should switch their preference to the other microbes in order to keep a diverse and healthy gut microbiome. As an alternative hypothesis, flies could instead prefer those microbes they are familiar with. Drosophila were manipulated by raising them on fly food enriched with one of the microbe species for either 2 days or for several generations. With these manipulated flies, we performed the same behavioral assays as before. Irrespective of their pre-experimental exposure to one of the microbes, the flies still became attracted by the headspaces of S. cerevisiae and L. plantarum and repelled by that of A. malorum (Fig. 2A–C, Fig. S2). However, pre-exposure to S. cerevisiae significantly increased the preference to this microbe and the avoidance of A. malorum, suggesting that exposure to these microbes may generate a learned response that accentuates the behavioral decisions towards these microbes. We therefore conclude that flies do not increase their preference towards gut microbes that they had not been in contact with previously. We furthermore did not find effects of pre-exposure on the oviposition preference of these flies (Fig. 2D–F). Interestingly, exposing flies to S. cerevisiae and A. malorum significantly increased the total egg numbers that the flies laid during the oviposition assay (Fig. 2G–I). It remains unclear why flies are repelled by the headspace of A. malorum, which has a positive effect on the flies' fecundity.

We next tested whether the oviposition behaviors were correlated with the flies' courtship and mating behaviors. The behavioral performance of individual pairs of flies was analyzed in courtship and mating assays. To do so, we paired flies reared on the different diets in all possible combinations. The copulation success rates of L. plantarum-treated flies was lower than that of all other flies (Fig. 3A) and their copulation latency was significantly higher (Fig. 3B). Interestingly, a strong increase in latency was observed only when both sexes were reared on L. plantarum (Fig. 3B). We hypothesized that the decline in courtship and mating performance of L. plantarum-treated flies could be one of the reasons for their subsequently lower number of eggs in the oviposition assays. To answer what affected the courtship behavior, we prepared the bodywash of both male and female flies of all treatments and analyzed the resulting compounds by GC-MS. When testing for effects of the microbes on the amount of sex- and aggregation-related pheromones like methyl laurate (ML), methyl myristate, methyl palmitate (MP) (Dweck et al., 2015b), cis-vaccenyl acetate (cVA) (Bartelt et al., 1985) and the male-specific (Z)-7-tricosene (Lacaille et al., 2007), we found only minor (in most cases non-significant) differences depending on the treatment (Fig. S3A–D). Furthermore, two female-specific cuticular hydrocarbons, 7(Z),11(Z)-heptacosadiene (7,11-HD) and 7(Z),11(Z)-nonacosadiene (7,11-ND), which play important roles in Drosophila courtship (Ferveur, 1997; Toda et al., 2012) were significantly increased in female flies after treatment with S. cerevisiae and A. malorum (Fig. 4). However, as L. plantarum-treated flies did not differ from flies reared on standard diet regarding these compounds, the increased courtship latency found in L. plantarum-treated flies (and specifically associated with females), remains unclear.

Gut microbes affected fly ovary development

To find out how the microbes affect the flies’ egg laying behavior, we tested the effect of the microbes on single fly body weight, body size and ovary size. Consistent with the observed increase in egg numbers for flies treated with S. cerevisiae and A. malorum, females in these treatment groups were heavier than control flies and heavier than L. plantarum-treated flies. For male flies, only S. cerevisiae-treated flies were slightly (but significantly) heavier than the others (Fig. 5A). We next took images of the different treated flies and measured the size of the abdomen. Interestingly, there was no difference in abdomen size in any of the male flies, while females treated with S. cerevisiae exhibited a bigger abdomen than A. malorum-treated flies, and both of these were bigger than those in L. plantarum-treated and control flies (Fig. 5B, Fig. S4). As the difference of egg number fitted well with the female abdomen size, we next dissected and measured female ovaries for each microbial treatment. Again, ovaries of S. cerevisiae-treated females were bigger than those of A. malorum-treated flies, and the ovaries of both of these two groups were significantly bigger than those of control flies and flies kept on L. plantarum (Fig. 5C,D).

The effect of gut microbes on fly fecundity

Having shown that the treatment with S. cerevisiae or A. malorum resulted in more eggs in the oviposition assay and increased abdomen and ovary sizes in female flies, we next asked whether this would also result in an overall increased fecundity of these flies. When we kept the flies for several days on the different diets and counted the number of eggs on a daily basis, all flies started to lay eggs after 2 days of reproductive maturation, with increasing egg numbers per day until the fourth day. Afterwards, the egg number kept steady per day until the end of the experiment. As expected from the previous results of our study, flies treated with S. cerevisiae laid the highest number of eggs (higher during each day and also in total during the full week), while A. malorum-treated flies still laid more eggs than L. plantarum-treated flies and control flies. We next asked whether a temporary exposure to S. cerevisiae would be sufficient to increase a female fly’s fecundity over its entire lifetime. However, when we transferred the flies back to a control diet after 4 days on a diet with S. cerevisiae, the daily egg count decreased dramatically and reached that of flies fed on control diet or L. plantarum after 2 days (Fig. 6A,B). This indicates that increased fecundity needs a constant supply of S. cerevisiae and that the change in fecundity is temporary. Interestingly, although we showed that Orco−/− flies became less attracted to the S. cerevisiae (Fig. 1C), the lack of functional OSNs expressing the co-receptor Orco did not diminish the positive effect of the microbes on the flies' fecundity (Fig. 6C,D). Obviously, although Orco−/− flies become less attracted by the headspace of S. cerevisiae, they still consume this microbe when being reared on them.

Gut microbe mediated larval growth acceleration

Finally, we also tested whether the exposure of flies to the microbes affected the larval development. It became apparent, that when testing 50 larvae per treatment type (e.g. S. cerevisiae), the number of larvae that succeeded in pupation was similar for all diets (Fig. 7A). However, the treatment affected the average timespan until larvae reached the pupal stage, thus the developmental rate was affected by microbe exposure. While most larvae that were reared on S. cerevisiae reached pupation stage after 3.5 days, all other treatments resulted in durations of 4–4.5 days (Fig. 7B), giving flies reared on S. cerevisiae a 30% faster development time.

In this study, we found that D. melanogaster showed different behavioral preferences to gut microbes. It is known that Drosophila are highly attracted to volatiles associated with yeast (Becher et al., 2012) and fermenting fruit (Becher et al., 2010; Keesey et al., 2015). The same attractive compounds, such as 3-methyl-1-butanol and 2-phenylethanol, were also identified in S. cerevisiae culture in our experiments. Previous studies have shown that D. melanogaster flies display positional avoidance towards carboxylic acids (i.e. one major compound produced by lactic and acetic acid bacteria), while the flies show a preference to lay eggs on sites containing these acids (Joseph et al., 2009; Chen and Amrein, 2017). When, however, not presenting the acids alone, but the full headspace of the bacteria, we found that both larvae and adults were attracted by the lactic acid bacteria L. plantarum and repelled by the acetic acid bacteria A. malorum in choice assays. Obviously attraction towards lactic acid bacteria is not driven by the acids themselves but rather by accompanying compounds in the blend. As the preference for S. cerevisiae was absent in Orco−/− flies and the flies did not prefer any microbes in a CAFÉ assay (that tests for gustatory preference while basically excluding the impact of olfactory stimuli), olfaction is at least partly involved in the flies' attraction to gut microbes for feeding. However, as Orco−/− flies still targeted L. plantarum in the trap assay and preferred all microbes in the oviposition assay, our data suggest that ionotropic receptors (IRs) (Benton et al., 2009) and/or gustatory receptors (GRs) are also involved in this behavioral preference. Sensory neurons expressing IRs have been reported to mainly detect acids (Ai et al., 2010; Grosjean et al., 2011; Min et al., 2013; Hussain et al., 2016) and have been shown to mediate Drosophila oviposition preference on acid-containing medium (Chen and Amrein, 2017). Hence, the attraction towards and the oviposition preference for the different microbes might be governed by several different receptor types, or sensory modalities.

Compared with Drosophila raised on standard diet, raising the flies on diets enriched with one of the microbes in some cases resulted in different preferences in the trap assays (Fig. 2A,B), which is in agreement with Wong et al. (2017) who found different foraging preferences in flies that were either axenic or those flies that were mono-associated with L. plantarum or Acetobacter pomorum. The Wong et al. (2017) study used axenic flies, whose guts are basically free of microorganisms or contain only a single microbe species due to a specific treatment. This comes with the benefit that the microbiome of the studied flies is under full control as compared with our treatment where the flies' gut microbiome was manipulated just by exposing them to single microbe types over a specific time. Despite this potential drawback, we assume that our flies had a more conventional gut microbiome like the one expected in natural conditions. However, our data suggest that – even in flies with a ‘normal’ gut microbiome – an exposure to one microbe species can alter the flies' behavioral preferences.

We also found that exposure to the different microbes not only affected the flies' behaviors, but also promoted their growth and development. It is known that yeasts are vital for larval development and survival (Anagnostou et al., 2010; Becher et al., 2012) as they seem to provide proteins as well as most other non-caloric nutritional requirements in Drosophila (Piper et al., 2013). A. pomorum, which is a close relative of the microbe A. malorum that was used in our study, is able to influence the systemic larval development of Drosophila by affecting both growth rate and body size via the insulin signaling pathway (Shin et al., 2011). Furthermore, L. plantarum can promote larval growth and increase the growth rate of the flies on yeast-poor medium, without affecting the size of flies, by regulating hormonal signals through TOR-dependent nutrient sensing (Storelli et al., 2011). Finally, it is shown that deprivation of essential amino acids (eAAs) can induce increased yeast intake and decreased reproduction of Drosophila, but both changes can be rescued by the introduction of healthy gut bacteria, A. pomorum and Lactobacillus sp. (Leitão-Gonçalves et al., 2017).

In agreement with the aforementioned studies of the microbial impact on the flies' growth and development, we found that the gut microbes have a different impact on female Drosophila ovary development and fecundity. More specifically the total egg number of control flies and flies reared on L. plantarum in oviposition assays was similar and significantly lower when compared with flies from the other two microbes (Fig. 2G–I). In addition, there was only a slight impact on total fecundity (Fig. 6A,B) and on larval development (Fig. 7) when flies were treated with L. plantarum. However, we found clear positive effects when flies were reared on S. cerevisiae and A. malorum, such as faster larval development times and larger ovaries that accompanied increased fecundity. Thus, these results demonstrate that S. cerevisiae, L. plantarum and A. malorum can be beneficial partners for D. melanogaster, and our results help to explain the common and natural association of these microbes with this fly. It remains, however, open as to why flies become attracted by the former two microbes but avoid the headspace of A. malorum. In conclusion, our study demonstrates the importance of preference among microbial associations for the ecological advantage of Drosophila in their natural environment, where some microbes promote either fecundity or developmental speed, the latter of which aids these insects in avoiding predation and parasitism during their most vulnerable larval stages.

The authors would like to thank the Chinese Scholarship Council for providing funding for H. Qiao to study at Max Planck Institute for Chemical Ecology. We also express our gratitude to S. Trautheim, K. Weniger and D. Veit for their technical support, guidance and expertise at MPI-CE. We are especially thankful to M. Wang for his help and advice regarding microbe culture. Stocks obtained from the Bloomington Drosophila Stock Center were used in this study (NIH P40od018537).

Author contributions

Conceptualization: H.Q., I.K., B.S.H., M.K.; Methodology: H.Q., I.K., M.K.; Validation: M.K.; Formal analysis: H.Q., I.K.; Investigation: H.Q.; Resources: B.S.H.; Writing - original draft: H.Q.; Writing - review & editing: I.K., B.S.H., M.K.; Supervision: I.K., M.K.; Funding acquisition: H.Q.

Funding

This research was supported through funding by the Max Plank Society and the Chinese Scholarship Council (File No. 201608410353).

Ai
,
M.
,
Min
,
S.
,
Grosjean
,
Y.
,
Leblanc
,
C.
,
Bell
,
R.
,
Benton
,
R.
and
Suh
,
G. S. B.
(
2010
).
Acid sensing by the Drosophila olfactory system
.
Nature
468
,
691
-
695
.
Anagnostou
,
C.
,
Dorsch
,
M.
and
Rohlfs
,
M.
(
2010
).
Influence of dietary yeasts on Drosophila melanogaster life-history traits
.
Entomol. Exp. Appl.
136
,
1
-
11
.
Bartelt
,
R. J.
,
Schaner
,
A. M.
and
Jackson
,
L. L.
(
1985
).
cis-Vaccenyl acetate as an aggregation pheromone in Drosophila melanogaster
.
J. Chem. Ecol.
11
,
1747
-
1756
.
Becher
,
P. G.
,
Bengtsson
,
M.
,
Hansson
,
B. S.
and
Witzgall
,
P.
(
2010
).
Flying the fly: long-range flight behavior of Drosophila melanogaster to attractive odors
.
J. Chem. Ecol.
36
,
599
-
607
.
Becher
,
P. G.
,
Flick
,
G.
,
Rozpędowska
,
E.
,
Schmidt
,
A.
,
Hagman
,
A.
,
Lebreton
,
S.
,
Larsson
,
M. C.
,
Hansson
,
B. S.
,
Piškur
,
J.
,
Witzgall
,
P.
, et al. 
(
2012
).
Yeast, not fruit volatiles mediate Drosophila melanogaster attraction, oviposition and development
.
Funct. Ecol.
26
,
822
-
828
.
Benton
,
R.
,
Vannice
,
K. S.
,
Gomez-Diaz
,
C.
and
Vosshall
,
L. B.
(
2009
).
Variant ionotropic glutamate receptors as chemosensory receptors in Drosophila
.
Cell
136
,
149
-
162
.
Broderick
,
N. A.
and
Lemaitre
,
B.
(
2012
).
Gut-associated microbes of Drosophila melanogaster
.
Gut Microbes
3
,
307
-
321
.
Chandler
,
J. A.
,
Lang
,
J. M.
,
Bhatnagar
,
S.
,
Eisen
,
J. A.
and
Kopp
,
A.
(
2011
).
Bacterial communities of diverse Drosophila species: ecological context of a host-microbe model system
.
PLoS Genet.
7
,
e1002272
.
Chen
,
Y.
and
Amrein
,
H.
(
2017
).
Ionotropic receptors mediate Drosophila oviposition preference through sour gustatory receptor neurons
.
Curr. Biol.
27
,
2741
-
2750
.
Clark
,
R. I.
,
Salazar
,
A.
,
Yamada
,
R.
,
Fitz-Gibbon
,
S.
,
Morselli
,
M.
,
Alcaraz
,
J.
,
Rana
,
A.
,
Rera
,
M.
,
Pellegrini
,
M.
,
Ja
,
W. W.
, et al. 
(
2015
).
Distinct shifts in microbiota composition during Drosophila aging impair intestinal function and drive mortality
.
Cell Rep.
12
,
1656
-
1667
.
Durisko
,
Z.
and
Dukas
,
R.
(
2013
).
Attraction to and learning from social cues in fruitfly larvae
.
Proc. Biol. Sci.
280
,
20131398
.
Durisko
,
Z.
,
Anderson
,
B.
and
Dukas
,
R.
(
2014
).
Adult fruit fly attraction to larvae biases experience and mediates social learning
.
J. Exp. Biol.
217
,
1193
-
1197
.
Dweck
,
H. K.
,
Ebrahim
,
S. A.
,
Farhan
,
A.
,
Hansson
,
B. S.
and
Stensmyr
,
M. C.
(
2015a
).
Olfactory proxy detection of dietary antioxidants in Drosophila
.
Curr. Biol.
25
,
455
-
466
.
Dweck
,
H. K.
,
Ebrahim
,
S. A.
,
Thoma
,
M.
,
Mohamed
,
A. A.
,
Keesey
,
I. W.
,
Trona
,
F.
,
Lavista-Llanos
,
S.
,
Svatoš
,
A.
,
Sachse
,
S.
,
Knaden
,
M.
, et al. 
(
2015b
).
Pheromones mediating copulation and attraction in Drosophila
.
Proc. Natl. Acad. Sci. USA
112
,
E2829
-
E2835
.
Ebrahim
,
S. A. M.
,
Dweck
,
H. K. M.
,
Stökl
,
J.
,
Hofferberth
,
J. E.
,
Trona
,
F.
,
Weniger
,
K.
,
Rybak
,
J.
,
Seki
,
Y.
,
Stensmyr
,
M. C.
,
Sachse
,
S.
, et al. 
(
2015
).
Drosophila avoids parasitoids by sensing their semiochemicals via a dedicated olfactory circuit
.
PLoS Biol.
13
,
e1002318
.
Ferveur
,
J. F.
(
1997
).
The pheromonal role of cuticular hydrocarbons in Drosophila melanogaster
.
Bioassays
19
,
353
-
358
.
Fisher
,
C. N.
,
Tratman
,
E. P.
,
Crawford
,
J. M.
,
Stabb
,
E. V.
,
Handelsman
,
J.
and
Broderick
,
N. A.
(
2017
).
Metabolite exchange between microbiome members produces compounds that influence Drosophila behavior
.
eLife
6
,
e18855
.
Grosjean
,
Y.
,
Rytz
,
R.
,
Farine
,
J.-P.
,
Abuin
,
L.
,
Cortot
,
J.
,
Jefferis
,
G. S. X. E.
and
Benton
,
R.
(
2011
).
An olfactory receptor for food-derived odours promotes male courtship in Drosophila
.
Nature
478
,
236
-
240
.
Guo
,
L.
,
Karpac
,
J.
,
Tran
,
S. L.
and
Jasper
,
H.
(
2014
).
PGRP-SC2 promotes gut immune homeostasis to limit commensal dysbiosis and extend lifespan
.
Cell
156
,
109
-
122
.
Hallem
,
E. A.
and
Carlson
,
J. R.
(
2006
).
Coding of odors by a receptor repertoire
.
Cell
125
,
143
-
160
.
Hussain
,
A.
,
Zhang
,
M.
,
Üçpunar
,
H. K.
,
Svensson
,
T.
,
Quillery
,
E.
,
Gompel
,
N.
,
Ignell
,
R.
and
Grunwald Kadow
,
I. C.
(
2016
).
Ionotropic chemosensory receptors mediate the taste and smell of polyamines
.
PLoS Biol.
14
,
e1002454
.
Joseph
,
R. M.
,
Devineni
,
A. V.
,
King
,
I. F. G.
and
Heberlein
,
U.
(
2009
).
Oviposition preference for and positional avoidance of acetic acid provide a model for competing behavioral drives in Drosophila
.
Proc. Natl. Acad. Sci. USA
106
,
11352
-
11357
.
Keesey
,
I. W.
,
Knaden
,
M.
and
Hansson
,
B. S.
(
2015
).
Olfactory specialization in Drosophila suzukii supports an ecological shift in host preference from rotten to fresh fruit
.
J. Chem. Ecol.
41
,
121
-
128
.
Keesey
,
I. W.
,
Koerte
,
S.
,
Retzke
,
T.
,
Haverkamp
,
A.
,
Hansson
,
B. S.
and
Knaden
,
M.
(
2016
).
Adult frass provides a pheromone signature for Drosophila feeding and aggregation
.
J. Chem. Ecol.
42
,
739
-
747
.
Keesey
,
I. W.
,
Koerte
,
S.
,
Khallaf
,
M. A.
,
Retzke
,
T.
,
Guillou
,
A.
,
Grosse-Wilde
,
E.
,
Buchon
,
N.
,
Knaden
,
M.
and
Hansson
,
B. S.
(
2017
).
Pathogenic bacteria enhance dispersal through alteration of Drosophila social communication
.
Nat. Commun.
8
,
265
.
Knaden
,
M.
,
Strutz
,
A.
,
Ahsan
,
J.
,
Sachse
,
S.
and
Hansson
,
B. S.
(
2012
).
Spatial representation of odorant valence in an insect brain
.
Cell Rep.
1
,
392
-
399
.
Koyle
,
M. L.
,
Veloz
,
M.
,
Judd
,
A. M.
,
Wong
,
A. C.-N.
,
Newell
,
P. D.
,
Douglas
,
A. E.
and
Chaston
,
J. M.
(
2016
).
Rearing the fruit fly Drosophila melanogaster under axenic and gnotobiotic conditions
.
J. Vis. Exp.
113
,
e54219
.
Lacaille
,
F.
,
Hiroi
,
M.
,
Twele
,
R.
,
Inoshita
,
T.
,
Umemoto
,
D.
,
Manière
,
G.
,
Marion-Poll
,
F.
,
Ozaki
,
M.
,
Francke
,
W.
,
Cobb
,
M.
, et al. 
(
2007
).
An inhibitory sex pheromone tastes bitter for Drosophila males
.
PLoS ONE
2
,
e661
.
Lemaitre
,
B.
and
Hoffmann
,
J.
(
2007
).
The host defense of Drosophila melanogaster
.
Annu. Rev. Immunol.
25
,
697
-
743
.
Leitão-Gonçalves
,
R.
,
Carvalho-Santos
,
Z.
,
Francisco
,
A. P.
,
Fioreze
,
G. T.
,
Anjos
,
M.
,
Baltazar
,
C.
,
Elias
,
A. P.
,
Itskov
,
P. M.
,
Piper
,
M. D. W.
and
Ribeiro
,
C.
(
2017
).
Commensal bacteria and essential amino acids control food choice behavior and reproduction
.
PLoS Biol.
15
,
e2000862
.
Min
,
S.
,
Ai
,
M.
,
Shin
,
S. A.
and
Suh
,
G. S. B.
(
2013
).
Dedicated olfactory neurons mediating attraction behavior to ammonia and amines in Drosophila
.
Proc. Natl. Acad. Sci. USA
110
,
E1321
-
E1329
.
Newell
,
P. D.
and
Douglas
,
A. E.
(
2014
).
Interspecies interactions determine the impact of the gut microbiota on nutrient allocation in Drosophila melanogaster
.
Appl. Environ. Microbiol.
80
,
788
-
796
.
Piper
,
M. D. W.
,
Blanc
,
E.
,
Leitão-Gonçalves
,
R.
,
Yang
,
M.
,
He
,
X.
,
Linford
,
N. J.
,
Hoddinott
,
M. P.
,
Hopfen
,
C.
,
Soultoukis
,
G. A.
,
Niemeyer
,
C.
, et al. 
(
2013
).
A holidic medium for Drosophila melanogaster
.
Nat. Methods
11
,
100
-
105
.
Ridley
,
E. V.
,
Wong
,
A. C.-N.
,
Westmiller
,
S.
and
Douglas
,
A. E.
(
2012
).
Impact of the resident microbiota on the nutritional phenotype of Drosophila melanogaster
.
PLoS ONE
7
,
e36765
.
Sabat
,
D. S.
,
Johnson
,
E. M.
,
Abhinay
,
A.
,
Jayabalan
,
R.
and
Mishra
,
M.
(
2015
).
A protocol to generate germ free Drosophila for microbial interaction studies
.
Adv. Tech. Biol. Med.
S1
,
001
.
Sansone
,
C. L.
,
Cohen
,
J.
,
Yasunaga
,
A.
,
Xu
,
J.
,
Osborn
,
G.
,
Subramanian
,
H.
,
Gold
,
B.
,
Buchon
,
N.
and
Cherry
,
S.
(
2015
).
Microbiota-dependent priming of antiviral intestinal immunity in Drosophila
.
Cell Host Microbe
18
,
571
-
581
.
Shin
,
S. C.
,
Kim
,
S. H.
,
You
,
H.
,
Kim
,
B.
,
Kim
,
A. C.
,
Lee
,
K. A.
,
Yoon
,
J. H.
,
Ryu
,
J. H.
and
Lee
,
W. J.
(
2011
).
Drosophila microbiome modulates host developmental and metabolic homeostasis via insulin signaling
.
Science
334
,
670
-
674
.
Staubach
,
F.
,
Baines
,
J. F.
,
Künzel
,
S.
,
Bik
,
E. M.
and
Petrov
,
D. A.
(
2013
).
Host species and environmental effects on bacterial communities associated with Drosophila in the laboratory and in the natural environment
.
PLoS ONE
8
,
e70749
.
Stensmyr
,
M. C.
,
Dweck
,
H. K. M.
,
Farhan
,
A.
,
Ibba
,
I.
,
Strutz
,
A.
,
Mukunda
,
L.
,
Linz
,
J.
,
Grabe
,
V.
,
Steck
,
K.
,
Lavista-Llanos
,
S.
, et al. 
(
2012
).
A conserved dedicated olfactory circuit for detecting harmful microbes in Drosophila
.
Cell
151
,
1345
-
1357
.
Storelli
,
G.
,
Defaye
,
A.
,
Erkosar
,
B.
,
Hols
,
P.
,
Royet
,
J.
and
Leulier
,
F.
(
2011
).
Lactobacillus plantarum promotes Drosophila systemic growth by modulating hormonal signals through TOR-dependent nutrient sensing
.
Cell Metab.
14
,
403
-
414
.
Tefit
,
M. A.
and
Leulier
,
F.
(
2017
).
Lactobacillus plantarum favors the early emergence of fit and fertile adult Drosophila upon chronic undernutrition
.
J. Exp. Biol.
220
,
900
-
907
.
Toda
,
H.
,
Zhao
,
X.
and
Dickson
,
B. J.
(
2012
).
The Drosophila female aphrodisiac pheromone activates ppk23+ sensory neurons to elicit male courtship behavior
.
Cell Rep.
1
,
599
-
607
.
Van Nood
,
E.
,
Vrieze
,
A.
,
Nieuwdorp
,
M.
,
Fuentes
,
S.
,
Zoetendal
,
E. G.
,
de Vos
,
W. M.
,
Visser
,
C. E.
,
Kuijper
,
E. J.
,
Bartelsman
,
J. F. W. M.
,
Tijssen
,
J. G. P.
, et al. 
(
2013
).
Duodenal infusion of donor feces for recurrent Clostridium difficile
.
N. Engl. J. Med.
368
,
407
-
415
.
Venu
,
I.
,
Durisko
,
Z.
,
Xu
,
J.
and
Dukas
,
R.
(
2014
).
Social attraction mediated by fruit flies’ microbiome
.
J. Exp. Biol.
217
,
1346
-
1352
.
Wong
,
C. N. A.
,
Ng
,
P.
and
Douglas
,
A. E.
(
2011
).
Low-diversity bacterial community in the gut of the fruitfly Drosophila melanogaster
.
Environ. Microbiol.
13
,
1889
-
1900
.
Wong
,
A. C.-N.
,
Dobson
,
A. J.
and
Douglas
,
A. E.
(
2014
).
Gut microbiota dictates the metabolic response of Drosophila to diet
.
J. Exp. Biol.
217
,
1894
-
1901
.
Wong
,
A. C.-N.
,
Wang
,
Q.-P.
,
Morimoto
,
J.
,
Senior
,
A. M.
,
Lihoreau
,
M.
,
Neely
,
G. G.
,
Simpson
,
S. J.
and
Ponton
,
F.
(
2017
).
Gut microbiota modifies olfactory-guided microbial preferences and foraging decisions in Drosophila
.
Curr. Biol.
27
,
2397
-
2404.e4
.
Zhang
,
Y.-J.
,
Li
,
S.
,
Gan
,
R.-Y.
,
Zhou
,
T.
,
Xu
,
D.-P.
and
Li
,
H.-B.
(
2015
).
Impacts of gut bacteria on human health and diseases
.
Int. J. Mol. Sci.
16
,
7493
-
7519
.

Competing interests

The authors declare no competing or financial interests.

Supplementary information