Login processing...

Trial ends in Request Full Access Tell Your Colleague About Jove


Conditions Affecting Social Space in Drosophila melanogaster

Published: November 5, 2015 doi: 10.3791/53242


The effect of genes and environment on social space of Drosophila melanogaster can be quantified through a powerful but straightforward analytical paradigm. We show here different factors that can affect this social space, and thus need to be taken into consideration when designing experiments in this paradigm.


The social space assay described here can be used to quantify social interactions of Drosophila melanogaster — or other small insects — in a straightforward manner. As we previously demonstrated 1, in a two-dimensional chamber, we first force the flies to form a tight group, subsequently allowing them to take their preferred distance from each other. After the flies have settled, we measure the distance to the closest neighbor (or social space), processing a static picture with free online software (ImageJ). The analysis of the distance to the closest neighbor allows researchers to determine the effects of genetic and environmental factors on social interaction, while controlling for potential confounding factors. Diverse factors such as climbing ability, time of day, sex, and number of flies, can modify social spacing of flies. We thus propose a series of experimental controls to mitigate these confounding effects. This assay can be used for at least two purposes. First, researchers can determine how their favorite environmental shift (such as isolation, temperature, stress or toxins) will impact social spacing 1,2. Second, researchers can dissect the genetic and neural underpinnings of this basic form of social behavior 1,3. Specifically, we used it as a diagnostic tool to study the role of orthologous genes thought to be involved in social behavior in other organisms, such as candidate genes for autism in humans 4.


Social interactions are crucial to the proper development and health of individuals within a group as a whole, and can be observed across numerous species, from humans (Homo sapiens) to simpler organisms such as fruit flies (Drosophila melanogaster) 5,6. An individual fruit fly or human share common means to process sensory information during these interactions, whether it be: auditory, visual, olfactory, tactile, or gustation. We and others hypothesize that there is a potentially shared neurocircuitry underlying behavioral responses to social interactions and that the neuronal cells and genes involved might be evolutionary conserved 7. Once the initial interaction has occurred, social space between the interacting individuals will either increase (social avoidance 8) or decrease (group formation/aggregation 5). More complicated interactions, like aggression or courtship, can then take place.

Neither sophisticated tools and methods, nor large investments in time and training are required to quantify this simple form of social behavior, making it a powerful analytical tool. Here, we explain a straightforward protocol that quantifies inter-fly distance, or social space, to assess social interaction in stable groups of Drosophila melanogaster, as used in the following studies 1-4,9. Social space refers to a measure of the distance between a fly and its closest neighbor 10. Social space is consistent for a given population of D. melanogaster when experimental conditions are preserved (averaging approximately within 1-2 body lengths), and varies with respect to the social experience of the flies, increasing if the individual has been kept in isolation 1. Proper vision is necessary to maintain normal social distance, but not classical odorants or cVA perception 1. Measure of social space can thus be used as a diagnostic tool to analyze social interactions and quantify social behavior in D. melanogaster 1. We describe here in details how to perform this quantification, and to what extent common experimental variables affect this behavior.

We show that the orientation of the chamber in which the assay is performed, as well as the number of flies — to an extent — do affects social space. It was previously shown that chamber geometry affects spontaneous exploratory movement of flies 11,12, and this phenomena may ultimately impact where they decide to settle. However, as long as the fly density (fly / cm2) and chamber orientation is kept the same, the social space of the flies also remains constant. The robustness of this assay is illustrated by the fact that independent laboratories using different chamber sizes, shape, and orientation can replicate the result displayed by mutants of the white gene (affecting eye pigmentation), which is an increase social space (vertical triangle or horizontal circle in 1, horizontal square with airflow in 3).

Our results also indicate that maintaining the time at which the social space experiment is performed is crucial to the consistency of the results, as we show that males, but not females, are further apart in the evenings. However, the differences seen between daytime and evening hours are not due to activity differences of the flies, and we discuss arguments indicating that activity levels are not correlated with social space.

Finally, there are genetic underpinnings to the determination of social space, as indicated by the white mutant already described 1,3, and the differences between various inbred and wild-caught strains of flies that we present here.

Therefore, this assay makes an excellent tool for studying the effects of genetic as well as environmental factors.

Subscription Required. Please recommend JoVE to your librarian.


1. Equipment and Reagents Created In-house (See List of Materials for Others)

  1. Prepare a Drosophila cold anesthesia apparatus as previously described 8.
  2. Prepare a fly aspirator as previously described 13.
  3. Prepare social space chambers and holders.
    1. Order or make glass panes and acrylic spacers to create the social space chambers. Each social space chamber consists of two square glass panes (17.6 cm by 17.6 cm, with a thickness of 0.3 cm), two right triangle acrylic spacers (with a height of 16.5 cm, a base of 8.9 cm, with a thickness of 0.3 cm), and two rectangular spaces (9 cm by 1.5 cm with a thickness of 0.3 cm) (Figure 1A).
    2. Assemble the glass and acrylic social space chamber such that it is identical to the chamber in Figure 1B. To do so, start by placing one triangular spacer flat on top of one square pane of glass such that the right angle of the triangular spacer is aligned with one of the corners of the square pane. Next, place the second triangular spacer flat on top of the square pane, mirroring the first triangular spacer.
      NOTE: Make sure to wear gloves so as not to contaminate the pieces with oils and scents from your hands.
    3. Place two small rectangular spacers flat on top of the square pane, along the side of the pane that is not covered. The acrylic spacers on top of the square plane should now form a triangular arena.
    4. Place a second square pane of glass on top of the acrylic spacers such that it is aligned above the original pane of glass below.
    5. Use four binder clips to secure the panes and spacers together to form the social space chamber. Place one clip near the corner, over the long side of each of the triangular spacers, securing them inside the glass panes. On these same sides, place a clip in the adjacent corner, over each of the rectangular spacers, securing them inside the glass panes.
    6. Assemble a support stand and a flask clamp such that the clamp will maintain the social space chamber in an upright position, as the social space chamber rests on its edge on top of the work surface.
    7. For each repeat in the experiment, assemble a social space chamber and support stand.
  4. Prepare a climbing assay response apparatus to check the climbing ability of the flies tested.
    1. Use a countercurrent apparatus, as previously described 14,15.
  5. Ensure homogeneous lighting conditions by performing the experiment on a work surface covered with a white bench cover and in front of a white background.

2. Preparing the Flies before the Experiment

  1. Maintain flies in bottles containing standard Drosophila fly food. Keep them in an incubation chamber at 25 °C on a 12 hr light/dark cycle.
  2. One to two days prior to the experiment, collect and sex flies under cold anesthesia, as previously described 8.
    1. Chill the cold anesthesia apparatus at -4 °C. Place flies into 50 ml plastic tubes. Fully submerge the plastic tubes containing flies into ice in an insulated ice bucket, wait at least 5 min for flies to become immobile.
    2. Place the flies on the polyethylene sheet of the cold anesthesia apparatus. At RT, use a stereomicroscope to separate males from females. Maintain flies, in groups, in vials containing standard Drosophila fly food, not exceeding 40 flies per vial.
  3. Two hours before the beginning of the experiment, ensure that the temperature of the room where the experiment will be performed is between 24–25 °C and the humidity is approximately 50%.
  4. Transfer the flies into new vials containing food, and place them for 2 hr on the work surface where the experiment will be performed.
    NOTE: For these experiments, the fly strains used were Drosophila melanogaster strains: Canton-Special or Canton-S (CS), w1118Cs10 (or W - w1118 outcrossed 10 times to Canton-S), Oregon and Samarkand flies were all from our laboratory stocks 16; Elwood flies were collected in Fall 2011 in the Elwood neighborhood of Huntington, on Long Island, New York, USA 8. Apart when specified otherwise, the results presented were obtained with Canton-S flies (in shades of red).

3. Performing the Experiment

  1. Perform the experiment between 12 p.m. and 3 p.m. (Zeitgeber time — the time in hours after the onset of light — of ZT 4 to 7).
  2. Prepare the social space chamber for the transfer of flies.
    1. Place a social space chamber flat on a work surface, with the side containing rectangular spacers closest to your body.
    2. Remove one clip nearest your body and slide one rectangular spacer outwards, creating a gap of approximately 1 cm between the rectangular spacers.
    3. Using tape and a marker, label the social space chamber in an upper corner with sex, strain, and repeat number. Take care to ensure the tape does not cover part of the inner triangular arena.
  3. Transfer the flies into the social space chamber.
    1. Transfer flies from their vial containing food into a new, empty vial. Aspirate flies from the empty vial and transfer them into the social space chamber.
      1. Inhale to draw the flies into the tip of the aspirator. Place the tip into the 1 cm gap between the rectangular spacers of the social space chamber and exhale at a consistent rate to force the flies into the inner triangular arena.
      2. Immediately slide the rectangular spacer back into place, closing the base of the inner triangular arena, and place the binder clip back on.
  4. On a pounding pad, which is located on different bench than where the experimental work takes place, hold the social space chamber upright such that the rectangular spacers are on the bottom side. Pound three times to ensure all flies have fallen to the bottom of the arena.
    NOTE: Due to the acrylic spacer sticking out of the smallest chamber size (Figure 1D), bang elbows on work surface while maintaining a secure hold on apparatus to ensure the flies have fallen to the bottom.
  5. Start a timer.
  6. Place the social space chamber on the work surface and use the support stand and flask clamp to keep it upright. Place a ruler or a sticker of known length flat against the social space chamber, but not covering any part of the inner triangular arena.
    1. For horizontally positioned experiments, do not place the social space chamber in the support stand; instead lay the social space chamber flat on the work surface.
  7. When the flies have settled, usually after around 30 min, take a picture of the social space chamber. Ensure that the frame contains the entire inner triangular arena, the ruler, and the label.
  8. Repeat the experiment for each genotype and condition (ideally 3 internal replicates and 3 independent repeats).

4. Analyzing the Social Space Data

  1. Import the following Macros in ImageJ 17
    1. ImageJ is available here: http://rsbweb.nih.gov/ij/.
    2. You can create a 'Measure Distances' command in the Plugins menu by saving the macros below in a file named 'Measure_Distances.txt' in the ImageJ/plugins folder, in the macro subfolder, and using the Help>Update Menus command.'
    3. Copy in a .txt file the macros that are provided in supplementary data and were originally published in 3.
  2. Upload the pictures to a computer, and open one picture using ImageJ.
    1. Create a scale by drawing a line from the 0 cm to 1 cm marks on the ruler in the picture, and under the Analyze tab, choose the Set Scale feature to set a scale of 1 cm for that distance (same approach for the sticker of known length). Choose the Global option before applying the scale to the picture.
    2. Crop the picture using the Crop feature under the Image tab such that it includes all of the flies, while removing as much of the rest of the picture as possible.
    3. Make the picture black and white by choosing 8-bit from the Type option under the Image tab.
    4. Remove all background noise from the picture by going to the Threshold feature under the Adjust option of the Image tab. Drag the sliders to enhance or remove the contrast so that the body of each fly can be clearly seen without any other markings in the image. If there are markings that are not flies, capture them with the rectangular tool and delete them.
    5. Set the measurements by using the Set Measurements tool under the Analyze tab. Select Area, Center of Mass, Centroid, and Display Label. Next, choose the Analyze Particles feature under the Analyze tab to create a numbered list of all the black spots representing flies.
      1. When using Analyze particles; set size 0.01-0.1 (do NOT choose pixel unit); circularity 0.00-1.00; show outlines; display results, and add to manager.
      2. Ensure that each black spot (each particle) is an accurate representation of the flies that are in the original picture, by comparing the numbered list to the original picture.
        NOTE: If some flies that are very close together being counted as one particle, manually draw a white line to separate the two flies on the binary image.
    6. While the list is selected, use the Nearest Neighbor — List Distances macro under the second Macros option in the Plugins tab to create a new list containing the distances, in cm, from each fly to their nearest neighbor.
  3. Copy the nearest neighbor distances from ImageJ and paste into a column of a spreadsheet program.
    1. Compile all of the data from each repeat onto the same spreadsheet and organize by genotype and condition.
  4. Perform data analysis using statistical software. In this experiment, Graph Pad Prism (version 6 for MacOSX, GraphPad Software, San Diego California USA, www.graphpad.com) was used to conduct one-way ANOVA, and Kruskal-Wallis Tests, Tukey’s and Dunnet’s Post-Hoc Tests.
  5. The distribution of the distances follows a non parametric distribution 1, and data are represented as box and Tukey’s whiskers (to eliminate outliers).

5. Climbing Assay (Control Behavior)

  1. Use a climbing assay as a control to test flies climbing ability 14,15,18.
    1. Use the countercurrent apparatus such that three trials can be run in parallel.
  2. Transfer 50 to 100 naïve flies (flies that have not been tested before) in three different test vials, and snap them into the 1st, 3rd and last slots at the bottom of countercurrent apparatus, with fresh empty vials in the opposite locations.
  3. Place fresh, empty vials in the empty slots at the bottom of the apparatus.
  4. Tap down the apparatus three times, such that all the flies are at the bottom of each tube, to initiate the experiment.
  5. Start the timer for 15 sec (time sufficient for ~100% of 3–7 days old Canton-S to reach the top vial — see Figure 3F).
  6. Slide the upper portion of the counter-current apparatus, to displace the top vials by one slot.
  7. Collect flies by tapping the apparatus down, to bring all flies in the bottom vials.
    1. 1st and 2nd tubes (or 3rd and 4th, 5th and 6th) correspond respectively to the flies that did not reach to top and the flies that reached the top vial.
  8. Calculate the Performance Index (PI).
    1. Count the number of flies in each vial.
    2. The PI is the percentage of flies able to climb on the upper tube.
    3. The means of the PI follow a normal distribution1, and data are represented as column graphs of mean plus or minus standard error to the mean (SEM).
      NOTE: Alternatively, the PI can be calculated as the percentage of flies able to reach the upper part of the lower vial (for older flies, 5 sec is the time sufficient to quantify a difference in climbing ability between infected and non infected 12 days old Canton-S quantified from a still picture: see results). Others have used different measures of performance in startle-induced negative geotaxis, that are also appropriate to quantify climbing ability 19-22.

Subscription Required. Please recommend JoVE to your librarian.

Representative Results

The social space chamber can be used as a tool to quantify the social behavior of Drosophila melanogaster. Acrylic spacers and glass panes are clipped together to form an inner triangular arena that provides a two-dimensional area in which flies can form stable groups without the presence of many potentially confounding cues. When flies are transferred to the vertical arena, they are startled by being tapped down, and they respond by an escape behavior: negative geotaxis. They climb to the vertex of the upright triangle, forced into a tight group, and then are provided time to move further form each other, and to explore the arena. After 20 to 40 min, they stop moving, and a stable group is formed. The distance between each fly and its nearest neighbor can be measured from a picture, to provide a quantification of their preferred social space. Flies are considered to be more social the closer they are to their neighbors.

Fly density does not play a role in social space in the chamber until the point of under-capacity. For a large group of 20 to 70 flies in the bigger vertically-oriented chamber, social space is independent of the group density (Figure 2A,B). With only 10 or 15 flies in the social space chamber, there is most likely not enough individuals to form a stable social group, leading to an increase in social space (Figure 2A,B). However, testing a large number of flies is not always convenient — in certain circumstances where the number of mutant individuals is limited, researchers may not be able to collect groups of flies large enough for the standard size of the social space chamber. To facilitate quantifying social space using small groups of flies, researchers can manipulate the social space chamber such that the area of the two-dimensional arena is smaller but area per fly remains constant. Shown in Figure 1C,D are two types of social space chambers modified for smaller groups but maintain the same density as the larger chamber. In this manner, keeping the fly density, and reducing the chamber size allows obtaining a similar social spacing (Figure 2C).

The same overall trends hold true for social space chambers placed in a horizontal position (Figure 2D). However, we can observe that the flies tend to be further apart in such a horizontal setting, and they do not settle easily 1. Groups that have only 15 and 20 flies exhibit greater social space than groups with 40 flies (Figure 2D).

To confirm that overcrowding was not responsible for the lesser distances to the nearest neighbor seen in larger groups of flies, the distance from each fly to all other flies was measured, as in 9. Quantifying the distance to all flies, versus distance to closest neighbor, allows assessing a group behavior, instead of the behavior of individuals within a group. As expected, the distance to all flies increased as the amount of flies in the group was greater, a reflection of the group itself, not of the individual flies. This trend was observed for both vertically and horizontally positioned social space chambers (Figure 2E,F). Therefore, the flies from larger groups were not forced to keep a closer distance to their neighbor due to space restrictions. Instead, flies form tighter social groups when there are more than 15 flies in the chamber.

As for other behavioral tests, one limitation to using the social space chamber vertically is that it requires flies with no geotaxis or climbing impairments. For example, Canton-S flies infected for one week with the Gram-negative bacterium Providencia rettgeri 23 possess a climbing defect and exhibit different social spacing results depending on the orientation of the social spacing chambers. When the test was performed vertically, the social space of the infected flies was greater than the social space of the controls, probably because the infected flies were not able to form a stable group at the top of the chamber (Figure 3A). When the flies under the same conditions were then tested in the horizontally oriented social space chambers, there were no significant differences, indicating that locomotion ability is probably less of a factor for social space in the horizontally positioned social space chambers (Figure 3B). While the infected flies are visually less able to climb than controls, this can be quantified using the climbing assay (Figure 3C). After 5 sec, approximately 44% of control flies climbed up to the top half of the lower vial and only 32% of infected flies. It is worth noting that all flies in this assay climb poorly (they rarely reach to top vial, only the upper part of the lower vial), which can be explained by the fact that they are 12 days post-eclosion, which is when flies start to exhibit a defect in climbing due to aging 22.

However, for strains that have no climbing defect, both orientations of the chambers led to the same results, as we have previously shown 1. In this experiment, the same increase in social space was seen for Canton-S and w1118Cs10 in the vertical triangle or the horizontal circular chambers (Figure 3D,E — reanalysis in box and whisker of the data published in 1). There was no difference in climbing ability between Canton-S and w1118Cs10 indicating it was not a factor for the difference in social space between strains in either chamber orientation (15 sec choice — Figure 3F). If given 5 sec choice 17% ± 3.3 of CS and 14% ± 2.5 of w1118Cs10 reached to upper vial (statistically not different, data not shown).

Researchers using the social space chamber must also ensure they repeat their experiments at the same time of the day. For both Canton-S and w1118Cs10 male flies, the time of the day affected social interactions. When compared to daytime hours (Zeitgeber time — the time in hours after the onset of light — ZT4 to ZT7), the flies tested in the evening (ZT11 to ZT12 — just before lights off) showed a much greater social space for both genotypes, although their relative space difference was preserved — i.e., w1118Cs10 flies are still less social than Canton-S flies in the evening (Figure 4A). Interestingly, only the social space of Canton-S males, but not that of females increases in the evening, although there was a trend toward larger variation of social space for female flies in the evening (Figure 4B). We have previously independently made the same observations 24.

As we previously reported using an Oregon-R line to study the effect of Bisphenol A (BPA) 2, the social space chamber is also sensitive to the genetic background of Drosophila. Here, we show that Elwood, a recently caught wild-type line, had increased social space compared to Canton-S and Samarkand but not Oregon (Figure 5). The social spaces of Samarkand and Oregon were not significantly different from each other but both greater than the social space of Canton-S (Figure 5). These data show that in a given environment, different inbred and wild-type strains have a different social space, indicating a genetic component to the behavior. It also indicates that the sensitivity of this test thus requires that flies be outcrossed into appropriate genetic backgrounds prior to experimenting. This will help to ensure the differences, or conversely the similarities, seen in social space are due to the factor being tested.

Figure 1
Figure 1. Social space chamber components and arrangement. (A) Social space chambers of various dimensions can be constructed using the same glass panes (17.6 cm by 17.6 cm by 0.3 cm) and acrylic spacers in the shape of right triangles (with a height of 16.5 cm, a base of 8.9 cm, and a thickness of 0.3 cm — indicated by a small letter a) and rectangles (9 cm by 1.5 cm by 0.3 cm — indicated by a small letter b). (B) The largest social space chamber, as described in 1 is suitable for 30-40 flies. It has inner dimensions of 16.5 cm by 16.5 cm by 14.5 cm, giving an area of 86.45 cm2, and leading to an area of 2.16 cm2 per fly for 40 flies. (C) A chamber size optimal for 20 flies. It has inner dimensions of 16.5 cm by 14.5 cm by 5.96 cm, giving an area of 43.25 cm2, and leading to an area of 2.16 cm2per fly. (D) Smaller chamber, optimal for 15 flies. It has inner dimensions of 10.2 cm by 8.9 cm by 8.9 cm, giving an area of 32.45 cm2, and leading to an area of 2.16 cm2 per fly. Please click here to view a larger version of this figure.

Figure 2
Figure 2. Orientation of the chamber and group size, but not density, affect social space. The data are represented in a box and whisker plot of the distance to the closest neighbor in the chamber, with the box representing the 1st quartile (25th percent) and the 3rd quartile (75th percent), the line in the box representing the median, and Tukey’s whiskers. (A-B) Representative data shows that increasing the number of flies within a chamber of the same size leads to stable social space measurements. Groups of 10 to 70 Canton-S male flies were put in the bigger vertical social space chamber and allowed to settle for 30 min; the distance to the nearest neighbor of each fly was recorded. Groups having less than 15 flies had significantly more social space than groups having more than 20 flies in the big chamber. (A) Groups of 10 n=9, 20 n=9, 30 n=8, 40, n=8, Kruskal-Wallis test p<0.0001, Dunn’s multiple comparison test: each letter indicate groups statistically different a#b p<0.0001. (B) Groups of 15 n=6, 40 n=8, 50 n=5, 60 n=6, 70 n=5, Kruskal-Wallis test p<0.0001, a#b p<0.001. (C) When the size of the chamber is adjusted to maintain the fly density (respectively 15 in the small, 20 in medium or 40 in large chamber, each time at a density of 2.16 cm2 per fly, no significant difference is observed when tested vertically. (D) But when these social space chambers are placed horizontally groups which had 15 or 20 flies had a greater distance to the nearest neighbor compared to groups with 40 flies (Groups of 15 n=3, 20 n=4, 40 n=4, Kruskal-Wallis test p<0.0001, Dunn’s multiple comparison test a#b p<0.01). (E–F) The distance to all flies was measured for groups of 15, 20, and 40 male Canton-S flies placed in both vertically and horizontally orientated chambers. The greater the amount of flies in the chamber, the greater the distance to all flies ((E): groups of 15 n=6, 20 n=6, 40 n=3, Kruskal-Wallis test p<0.0001, Dunn’s multiple comparison test a#b p<0.01; (F): groups of 15 n=6, 20 n=6, 40 n=3, Kruskal-Wallis test p<0.0001, Dunn’s multiple comparison test a#b#c p<0.0001). Note: (A, B and C-F) show data obtained in in 3 different geographical regions and thus different laboratory settings. (A) Region 1: UCLA, Los Angeles, CA; (B) Region 2: York College, NY, NY; (C-F) Region 3: Western University, London, ON. Please click here to view a larger version of this figure.

Figure 3
Figure 3. Orientation of the social space chamber can be used to control for confounding geotaxis problems. (AC): Groups of 40 male Canton-S flies that were either infected with P. rettgeri for seven days or injected with media as a control were put in a social space chamber either vertically (A) or horizontally (B) positioned and allowed to settle for 30 min. The distance to the nearest neighbor of each fly was recorded. The data are represented in a box and whisker plot of the distance to the closest neighbor in the chamber, with the box representing the 1st quartile (25th percent) and the 3rd quartile (75th percent), the line in the box representing the median, and Tukey whiskers. (A) Representative data shows an increase in social space for flies that are infected with P. rettgeri and placed in a vertically positioned social space chamber, compared to injection with media (Wilcoxon-Rank test: each letter indicate groups statistically different p<0.0001, n=6). (B) Representative data shows social space is not affected by P. rettgeri infection when flies are placed in a horizontally positioned social space chamber (Wilcoxon-Rank test: p>0.1, n= 5). (C) A countercurrent apparatus was used to assess climbing behavior of both infected and media control flies. Infected flies climb more poorly than their media controls (flies ~12 days old, graph represent mean performance index ± SEM: % of flies in top half of the vial at 5 sec choice; two tailed t-test with Welch’s Correction; n=6 of ~60 flies, each letter indicate groups statistically different p=0.08). (DF): Vertically and horizontally positioned chambers, either triangular or circular, were used to compare the social space of Canton-S (CS) with that of w1118Cs10(W). The data are represented in a box and whisker plot of the distance to the closest neighbor in the chamber, with the box representing the 1st quartile (25th percent) and the 3rd quartile (75th percent), the line in the box representing the median, and Tukey’s whiskers. In both social space chamber orientations and shapes, w1118Cs10 had a greater social space than Canton-S ((D), vertical triangle: Kruskal-Wallis test, each letter indicate groups statistically different p<0.0001, (E), horizontal circle: Kruskal-Wallis test, each letter indicate groups statistically different p<0.01). (F)) A countercurrent apparatus was used to assess climbing behavior of both Canton-S and w1118Cs10 strains (flies 3-5 days old, graph represent mean performance index ± SEM: % of flies in top vial at 15 sec choice). There was no difference in ability between either Canton-S or w1118Cs10. Please click here to view a larger version of this figure.

Figure 4
Figure 4. Social space of males is increased during the evening. (A) Representative data shows an increased social space between male flies during the evening hours (“evening” ZT 11-12, prior to lights off) compared to mid-day hours (“day” ZT 4-7). Groups of 40 Canton-S flies and w1118Cs10 flies were put in a social space chamber during either daytime hours or evening hours and allowed to settle for 30 min. The distance to the nearest neighbor of each fly was recorded. For both genotypes, flies increased social space in the evening and differences between strains were kept regardless of time of day (n=6-7, Kruskal-Wallis test p<0.0001, Dunn’s multiple comparison test: each letter indicate groups statistically different p<0.01). (B) When Canton-S flies were separated by sex only males have shown an increase in social space in the evening (t p<0.01), although a non-significant trend for larger internal variation is seen in females (Kruskal-Wallis test, each letter indicate groups statistically different p<0.0002). The data are represented in a box and whisker plot of the distance to the closest neighbor in the chamber, with the box representing the 1st quartile (25th percent) and the 3rd quartile (75th percent), the line in the box representing the median, and Tukey’s whiskers. Please click here to view a larger version of this figure.

Figure 5
Figure 5. Genetic background of flies affects social space. Groups of 40 Canton-S, Samarkand, Oregon, and Elwood flies were put in a social space chamber and allowed to settle for 30 min. The distance to the nearest neighbor of each fly was recorded. Distributions of the groups are different (Kruskal-Wallis test, p<0.0001), groups not sharing a common letter are significantly different. The data are represented in a box and whisker plot of the distance to the closest neighbor in the chamber, with the box representing the 1st quartile (25th percent) and the 3rd quartile (75th percent), the line in the box representing the median, and Tukey’s whiskers (Dunnet’s multiple comparison test, p<0.05 [d], p<0.001 [a,b,c], 3 independent repeats with 1-2 internal replicates, such that for Elwood and Samarkand n=3, Oregon and Canton-S n=4). Please click here to view a larger version of this figure.

Supplementary Data. Please click here to download this file.

Subscription Required. Please recommend JoVE to your librarian.


In this protocol, a detailed procedure for the quantification of social space was described. Some crucial steps to ensure the experiment is successful are: 1) always use gloves when cleaning and setting up the apparatus, to keep your own oils and scents off the inner chamber of the apparatus, 2) ensure flies are collected at least one day before the experiment to reduce any potential effects of cold anesthesia, 3) 2 hr before the experiment provide new vials containing fresh food to ensure the flies are not starved, and have cleaned themselves, 4) During these 2 hr, let the flies acclimatize to their new environment, 5) note the temperature and humidity conditions when performing experiments; try to keep them consistent between 24–25 °C and 50% humidity, 6) make sure to not disturb the social space chambers while running the experiment, and 7) perform the experiment at the same time of day, preferably between Zeitgeber time ZT4 and ZGT7.

When the overall stamina, and climbing ability of the flies allow, we show that a vertical chamber is optimal, as it forces the flies into an extremely tight group, and forces them to separate and find their ideal social space. The control flies tend to be closer, allowing for better discrimination of variation in space. Also, flies tend to settle much more rapidly in a vertical setting, probably because this is a condition with which they are familiar, at least in a laboratory setting. Indeed, flies are commonly kept in vertical vials and bottles, and can be found undisturbed, forming groups on the sides of these food containers. However, the chamber can also be used horizontally, to account for flies that have locomotor/climbing defects, because of aging, genetics, or physiology.

Social space is only dependent on the density of flies within the chamber, and not dependent on the size of the group, as long as there is a minimal group size met. Flies will maintain the same social spacing between themselves regardless of the amount of members of the group. However, distance to all flies in the chamber, as expected, is affected by group size, as well as the chamber orientation. It is important to note that despite the horizontal orientation being challenging to use (flies do not settle as easily), and leading to reduced separation between genotypes in our hands (Figure 3D compared to 3E), Burg et al. 3 successfully used a horizontal, square chamber. In their experiments, the distance to closest the neighbor was most similar to our vertically oriented social space results. However, in their chamber, there was a continuous airflow that may have contributed to the flies’ social group spacing being most similar to our vertical chamber instead of our horizontal chamber. A limitation to using vertical chambers is the ability to test Drosophila that have mobility impairments. The social space chamber requires the flies to be mobile so they can chose at what distance from their neighbor they wish to be. If flies were immobile or had deficits in some way, they may not be able to form stable groups properly in the chamber. A potential remedy for poor locomotion would be to then use horizontal chambers, or to allow more time for the flies to settle before taking the picture. Researchers must also assess climbing ability and possible geotactic impairments of flies to see if the vertical social space chamber is appropriate. If there are deficits in either of these, horizontally positioned chambers can be used to avoid them.

Of note, if climbing activity or overall stamina and health of the fly will affect the measurement of social space, we show that activity or locomotion levels are not correlated with social space. In another study, we show that a treatment that decreases locomotion, (feeding BPA) also decrease social space 2. But mutants of rugose (a Drosophila ortholog of the autism candidate gene neurobeachin) display hyperactivity and increased social space 4. Finally, white mutant flies display an increase in social space 1,3, without any increase in locomotion or geotaxis 18. In short, several combinations of activity level and social spacing have been observed so far, indicating no correlation between the two behaviors. In fact, social space does not necessarily correlate to other social behaviors either, such as social avoidance 8,25, suggesting different underlying neural circuitry. For example, mutants of rugose/neurobeachin display increased social space and reduced social avoidance 4; but white has both increased social space, and very strong social avoidance 4.

As time of day affects social space, at least in males, it is critical that researchers are cognizant of the time of day when their experiments are performed and effort is made to maintain a constant time for all experiments. Other considerations that should be accounted for include age, sex, and mating status of the flies. We know that social distance is increased in virgin compared to mated individual, both for both males and females 1, and we now show that males are less close than females in the evening (Figure 4B). Strain specific sex differences in activity levels of single flies during the day has previously been described, proposing that males higher locomotor activity in the morning and evening compared to day time might be related to their courtship behavior 26,27. However in our case, the sexes are separated, but the flies are grouped, and by the time we measure their social space, the flies have settled. Fujii et al. 27 report that circadian rhythm in pairs of male kept together have an erratic daily rhythm, without clear peaks, when the rhythm of female pairs resemble that of single flies. So, the increased spacing in males in the evening is probably not related to an increase in courtship behavior or specific increase in locomotor activity, and the reason underlying the sexual dimorphism of this behavior needs to be further investigated.

With this in consideration, flies should always be separated by sex for the experiment so differences in social interaction between males and females can be seen. Finally, we currently do not know yet how age affects the social interactions of flies. Therefore, we recommend that social space experiments are performed with flies no older than seven days, as various behavior performances, including climbing activity are known to be affected in flies more than one week old 22.

A final consideration for social space is the variations observed in median social distance. Social space measurements were taken from various locations including (Los Angeles, CA: Figure 2A; New-York, NY: Figure 2B, Figure 3D, Figure 4, Figure 5; London, ON: Figure 2C–F, Ithaca, NY: Figure 3A,B; all in the same Canton-S background). Unknown variables that were not constant between geographical locations, or laboratory settings, affected the median social distance. Possible factors include different foods, elevation, atmospheric pressure in itself, and change in atmospheric pressure 28. Although the medians were not constant between locations, within a location the medians are highly constant and reproducible; and the trends and patterns seen in the social space measurements remained the same among locations. Therefore, as long as researchers maintain internally constant conditions, they will be able to detect differences in social space.

Subscription Required. Please recommend JoVE to your librarian.


The authors declare that they have no competing financial interests.


The authors want to thank Dr. Tadmiri Venkatesh for his encouragement to prepare this manuscript, Dova Brenman and Selwyn Chui for their constructive comments, Elyssa Burg and Wayne Rasband for designing the macro in ImageJ for all interfly distances and for nearest neighbor distances. The authors also want to thank the reviewers for their constructive comments.

A.A.A, M.C.C. and A.F.S were responsible for research design; S.N.J., A.A.A, M.N., Z.R., and A.J.M. performed the experiments. A.A.A, M.N., A.J.M. and M.C.C and A.F.S. analyzed the data; A.R.M. and A.F.S. wrote the manuscript.

This work was supported by PSC-CUNY research awards, jointly funded by The Professional Staff Congress and The City University of New York to A.F.S.; by internal funding from Western University to A.F.S.; by a Mathematics, Biology, Chemistry, and Geology majors scholarship for teachers-in-training and by a Louis Stokes Alliance for Minority Participation scholarship to A.A.A.


Name Company Catalog Number Comments
Stereo Zoom Microscope  Nikon   SMZ-645 Any other standard scope for fly handling would work
Small paint brushes  for pushing flies
Jazz-mix Fisher 33545 any other standard drosophila food would work
Mini-Alarm Timer/Stopwatch
 Sharpie pens
Adhesive Tape
Medium size binder clips Staples to hold the chambers together: 1-1/4" (32mm) medium clips with 5/8" capacity
small SupportStands Carolina  707161 to hold the chambers in a vertical orientation
Buret clamps Carolina 707362
Digital Camera Nikon  Coolpix S8000  to take the still pictures
small ruler to be able to scale the picture
trifold board and white bench cover to provide a white background, and a homogeneous light.
pounding pad any mouse pad works.
Prism 6 GraphPad Software Inc. Prism 6 for Mac OS X Any statistical analysis software with t-test, one-way and two ANOVA would work



  1. Simon, A. F., et al. A simple assay to study social behavior in Drosophila.: measurement of social space within a group. Genes Brain Behav. 11, 243-252 (2012).
  2. Kaur, K., Simon, A. F., Chauhan, V., Chauhan, A. Effect of bisphenol A on the behavior of Drosophila melanogaster. - Potential use of Drosophila as a model in the study of neurodevelopmental disorders. Behavioural Brain Research. , (2015).
  3. Burg, E. D., Langan, S. T., Nash, H. A. Drosophila social clustering is disrupted by anesthetics and in narrow abdomen ion channel mutants. Genes Brain Behav. 12, 338-347 (2013).
  4. Wise, A., et al. The autism candidate gene Neurobeachin (Rugose) mutants in Drosophila exhibit neuro-developmental disorders, aberrant synaptic properties, altered locomotion, impaired adult social behavior and activity patterns. J Neurosci. , 1-9 (2015).
  5. Parrish, J. K., Edelstein-Keshet, L. Complexity, pattern, and evolutionary trade-offs in animal aggregation. Science. 284, 99-101 (1999).
  6. Sokolowski, M. B. Social interactions in ‘‘simple’’ model systems. Neuron. 65, 780-794 (2010).
  7. Rittschof, C. C., Robinson, G. E. Genomics: moving behavioural ecology beyond the phenotypic gambit. Animal Behaviour. 92, 263-270 (2014).
  8. Fernandez, R. W., et al. Straightforward assay for quantification of social avoidance in Drosophila melanogaster. JoVE. (94), e52011 (2014).
  9. Hahn, N., et al. Monogenic heritable autism gene neuroligin impacts Drosophila. social behaviour. Behav Brain Res. 252, 450-457 (2013).
  10. Mogilner, A., Edelstein-Keshet, L., Bent, L., Spiros, A. Mutual interactions, potentials, and individual distance in a social aggregation. J Math Biol. 47, 353-389 (2003).
  11. Liu, L., Davis, R. L., Roman, G. Exploratory activity in Drosophila requires the kurtz nonvisual arrestin. Genetics. 175, 1197-1212 (2007).
  12. Soibam, B., et al. Open-field arena boundary is a primary object of exploration for Drosophila. Brain Behav. 2, 97-108 (2012).
  13. Ejima, A., Griffith, L. C. Ch. 30. Drosophila Neurobiology - A laboratory Manual., Ch. , Cold Spring Harbor Press. 475-481 (2010).
  14. Benzer, S. Behavioral mutants of Drosophila melanogaster. isolated by countercurrent distribution. PNAS. 58, 1112-1119 (1967).
  15. Connolly, J. B., Tully, T. Drosophila: A practical approach. Roberts, D. B. 1, 2nd, IRL Press. 265-317 (1998).
  16. Simon, A. F., Shih, C., Mack, A., Benzer, S. Steroid control of longevity in Drosophila melanogaster. Science. 299, 1407-1410 (2003).
  17. Rasband, W. S. ImageJ. , US National Institutes of Health. Maryland, U.S.A. (1997).
  18. Simon, A. F., et al. Drosophila, vesicular monoamine transporter mutants can adapt to reduced or eliminated vesicular stores of dopamine and serotonin. Genetics. 181, 525-541 (2009).
  19. Barone, M. C., Bohmann, D. Assessing neurodegenerative phenotypes in Drosophila .dopaminergic neurons by climbing assays and whole brain immunostaining. JoVE. (74), e50339 (2013).
  20. Ali, Y. O., Escala, W., Ruan, K., Zhai, R. G. Assaying locomotor, learning, and memory deficits in Drosophila. models of neurodegeneration. JoVE. , e2504 (2011).
  21. Gargano, J. W., Martin, I., Bhandari, P., Grotewiel, M. S. Rapid iterative negative geotaxis (RING): a new method for assessing age-related locomotor decline in Drosophila. Exp Gerontol. 40, 386-395 (2005).
  22. Simon, A. F., Liang, D. T., Krantz, D. E. Differential decline in behavioral performance of Drosophila melanogaster. with age. Mech Ageing Dev. 127, 647-650 (2006).
  23. Khalil, S., Jacobson, E., Chambers, M. C., Lazzaro, B. P. Systemic bacterial infection and immune defense phenotypes in Drosophila melanogaster. JoVE. , (2015).
  24. Fernandez, R. W., Akinleye, A. A., Nurilov, M., Rouzyi, Z., Simon, A. F. 54th Annual Drosophila Research Conference, Washinton D.C., , (2013).
  25. Suh, G. S. B., et al. A single population of olfactory sensory neurons mediates an innate avoidance behaviour in Drosophila. Nature. 431, 854-859 (2004).
  26. Helfrich-Förster, C. Differential control of morning and evening components in the activity rhythm of Drosophila melanogaster.--Sex-specific differences suggest a different quality of activity. J. Biol. Rhythms. 15, 135-154 (2000).
  27. Fujii, S., Krishnan, P., Hardin, P. E., Amrein, H. Nocturnal male sex drive in Drosophila. Curr Biol. 17, 244-251 (2007).
  28. Pellegrino, A. C., et al. Weather forecasting by insects: modified sexual behaviour in response to atmospheric pressure changes. PLoS One. 8, e75004 (2013).


Drosophila Melanogaster Social Space Assay Social Interactions Small Insects Two-dimensional Chamber Tight Group Formation Preferred Distance Closest Neighbor Distance Genetic Factors Environmental Factors Confounding Factors Climbing Ability Time Of Day Sex Number Of Flies Experimental Controls Environmental Shift Isolation Temperature Stress Toxins Genetic Underpinnings Neural Underpinnings Social Behavior Orthologous Genes Autism
Conditions Affecting Social Space in <em>Drosophila melanogaster</em>
Play Video

Cite this Article

McNeil, A. R., Jolley, S. N.,More

McNeil, A. R., Jolley, S. N., Akinleye, A. A., Nurilov, M., Rouzyi, Z., Milunovich, A. J., Chambers, M. C., Simon, A. F. Conditions Affecting Social Space in Drosophila melanogaster. J. Vis. Exp. (105), e53242, doi:10.3791/53242 (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