Original research article

The authors used this protocol in:
Aug 2019

Navigate this Article


Phototactic T-maze Behavioral Assay for Comparing the Functionality of Color-sensitive Photoreceptor Subtypes in the Drosophila Visual System    

How to cite Favorites Q&A Share your feedback Cited by


The Drosophila retina contains light-sensitive photoreceptors (R cells) with distinct spectral sensitivities that allow them to distinguish light by its spectral composition. R7 and R8 photoreceptors are important for color vision, and can be further classified into pale (p) or yellow (y) subtypes depending on the rhodopsin expressed. While both R7y and R7p are sensitive to UV light, R8y and R8p detect light in the green and blue spectrum, respectively. The ability of R7 and R8 photoreceptors to distinguish different spectral sensitivities and the natural preference for Drosophila towards light sources (phototaxis), allow for the development of a phototactic T-maze assay that compares the functionality of different R7 and R8 subtypes. A “UV vs. blue” choice can compare the functionalities of R7p and R8p photoreceptors, while a “UV vs. green” choice can compare the functionalities of R7y and R8y photoreceptors. Additionally, a “blue vs. green” choice could be used to compare R8p and R8y photoreceptors, while a “dark vs. light" choice could be used to determine overall vision functionality. Although electrophysiological recordings and calcium imaging have been used to examine functionality of R7 and R8 photoreceptors, these approaches require expensive equipment and are technically challenging. The phototactic T-maze assay we present here is a robust, straight-forward and an inexpensive method to study genetic and developmental factors that contribute to the individual functionality of R7 and R8 photoreceptors, and is especially useful when performing large-scale genetic screens.

Keywords: Drosophila, Visual System, Photoreceptors, Behavior, Synapse


The Drosophila visual system provides an excellent model to understand the mechanisms controlling neuronal circuit development and function. Each adult Drosophila compound eye is made up of roughly 800 single eye units called ommatidia. The ommatidia reside in the most distal portion of the visual system, called the retina. Each ommatidium is composed of 8 light-sensitive photoreceptors (R cells), with the motion-sensitive outer R1-R6 cells forming a stereotypical horseshoe shape around the color-sensitive inner R7 and R8 cells. The R7 cell body lies in the distal retina, directly above the more proximal R8 cell body. The R1-R6 cells are responsible for motion detection and express rhodopsin(Rh)-1 which detects light in a broad spectrum (Montell, 2012; Behnia and Desplan, 2015). R7 and R8 photoreceptors are responsible for color vision and express Rh3 or Rh4 and Rh5 or Rh6, respectively (Rister and Heisenberg, 2006; Morante and Desplan, 2008).

R7 and R8 photoreceptors can be further classified into either short-wavelength pale (p) or long-wavelength yellow (y) subtypes depending on the rhodopsin they express. R7p and R7y express Rh-3 and Rh-4 respectively, and detect light in the UV-spectrum, while R8p and R8y express Rh-5 and Rh-6 respectively, and detect blue and green light, respectively (Morante and Desplan, 2008). This specification of the ommatidia to either a yellow or pale fate is not evenly distributed, with ~70% of the ommatidia containing the yellow (long-wave UV and green) and ~30% containing the pale (short-wave UV and blue) (Yamaguchi et al., 2010; Montell, 2012). All R cells have their cell bodies within the retina, and project the axons into the optic lobe where they form synaptic connections with their respective targets (Fischbach and Dittrich, 1989).

The difference in spectral sensitivity among R7 (UV light) and R8 (blue or green light) subtypes, and that flies demonstrate phototactic behavior (the preference to move towards a light source) (Yamaguchi et al., 2010), allow us to test the differential functionality of R7 and R8 photoreceptors by developing a behavioral choice paradigm with “UV vs. blue” or “UV vs. green” light sources. This is an example of “differential phototaxis”, where flies will choose between two light sources. Conversely, “fast phototaxis” can be observed when flies in a “light vs. dark” paradigm rush quickly towards the light source (Benzer, 1967), believing it to be an escape. The development of a rapid phototactic T-maze assay to assess the difference in color preference is very useful for understanding the differential requirements of genes for the development and function of R7 and R8 photoreceptors, which form synaptic contacts with different post-synaptic partners (Rister et al., 2015; Millard and Pecot, 2018; Shaw et al., 2019).

Electrophysiological recordings and calcium imaging have been able to elegantly demonstrate photoreceptor subtype functionality (Harris et al., 1976; Dolph et al., 2011; Weir et al., 2016; Schnaitmann et al., 2018). However, these approaches require expensive equipment and are technically challenging. By comparison, the phototactic T-maze paradigm behavioral assay is an affordable, simple, and high throughput method, which can be readily used in large-scale genetic screens for genes controlling color vision. The behavioral T-maze choice assay we describe here is modified from the phototactic choice paradigm described previously by Yamaguchi et al. (2010), whose design in turn was based off of the original odor paradigm generated by Tully and Quinn (1985). In this protocol, we describe in detail the schematics for building the T-maze apparatus and the use of this system for the analysis of color vision. In our recent study (Shaw et al., 2019), we used this T-maze system to examine the role of the transmembrane protein Borderless (Bdl) in the regulation of color vision. Our apparatus has a horizontal design, as oppose to the traditional vertical design, for increased stability and convenience. Additionally, our data analysis takes into account the animals that do not make a choice (neutral flies that remain at the choice point), which would significantly affect the results in certain experimental paradigms.

Materials and Reagents

  1. Carbon dioxide gas (for anesthetizing flies)
  2. Ethanol 70% (for cleaning equipment and disinfecting surfaces)
  3. 7-10 days old fruit flies (Drosophila melanogaster)


  1. Carbon dioxide pad and needle
  2. Dark behavior room that is temperature and humidity controlled
  3. White or Red Lamp for working in the behavior room (flies do not detect light in the Red spectrum)
    Note: The supplier and wattage of these light sources are not critical.
  4. LED lights sources
    1. White (broad spectrum)
    2. Ultraviolet (UltraFire WF-501B 375NM UV Ultra Violet LED flashlight)
    3. Blue (Ultrafire WF-501B Philips Luxeon K2 Blue LED flashlight)
    4. Green (Ultrafire WF-501B CREE XR-E G2 150lm Green LED flashlight)
  5. Flipping (Mouse) pad
    Note: Any mouse pad or soft flipping pad can be used.
  6. Fruit fly vials (Fisher ScientificTM, FisherbrandTM Narrow Drosophila Vials AS-516)
  7. Timer
  8. Custom-made T-maze components:
    1. Body
    2. Lift
    3. Plug
    4. Loading Holder
    5. Pins
    6. Elastic Bands


  1. T-maze construction and set-up. The maze described here is custom-built based on the descriptions below:
    1. Figure 1 describes a detailed schematic of the dimensions.
    2. The T-maze is constructed completely of Delrin plastic.
    3. 6 bolts hold the body together, and allow the T-maze to be disassembled and cleaned.
    4. Screw the vial holders and lift stop into place.
    5. Place elastic holding screws at locations on the vial holders, the body, and the lift as required to hold elastics in place (Figures 4A-4B).
    6. Place the aligning screw in the body, so it contacts the loading pin and can be adjusted allowing the fly holding chamber to perfectly align with the loading mouth.
    7. The pins are made from small metal rods that have been filed down and smoothed.

      Figure 1. Detailed schematic for building the T-maze apparatus

  2. Detailed description of the T-maze body, lift, and accessories
    1. The body of the T-maze contains three holes and is hollowed out for the lift to be inserted (Figure 2C).

      Figure 2. Overhead and side views of T-maze. Overhead and side views of T-maze. A. Overhead view of fully assembled T-maze with vials attached. LS, Lift Stop. B. Overhead view of fully assembled T-maze without vials attached (bottom) and holder (top). LPH, Loading Pin Hole; HPH, Holding Pin Hole; VH, Vial Holder. C. Side view of T-maze mounted on holder. The lift is overextended from the body to show the fly holding chamber. VH, Vial Holder; CP, Choice Point; IZ, Intermediate Zone; LM, Loading Mouth; FHC, Fly Holding Chamber.

      1. The first hole is the loading mouth (Figure 1). When the lift has both pins in, the holding chamber in the lift will be lined up with the loading mouth (Figure 3A).
      2. The other two holes in the body are the choice point holes and are perfectly in line with one another. When both pins are removed, the choice point holes will line up with the holding chamber in the lift (at the choice point) (Figure 3C).

        Figure 3. The three states of the T-maze. A. T-maze in “Loading State”. Both pins inserted in the lift keep the fly holding chamber of the lift in perfect alignment with loading mouth of the body. LP, Loading Pin; HP, Holding Pin; FHC @ LM, Fly Holding Chamber at the Loading State. B. T-maze in “Holding State”. Removing the loading pin will cause the T-maze to shift the lift midway between the loading mouth and the choice point. HP, Holding Pin; FHC @ IZ, Fly Holding Chamber at the Holding State. C. T-maze in “Open State”. Removing the final pin will cause the fly holding chamber to shift to the choice point and become perfectly aligned with the choice point holes. FHC @ OS, Fly Holding Chamber at the Open State. D. Overhead view of T-maze in the “Holding State”. HP, Holding Pin.

      3. Each of the choice point holes has a base with two screws, allowing for an elastic band to be wrapped around and held in place (Figures 4A-4B). The vial holder will align the vial with the open holes and the elastic band will hold the vial in place (Figure 4B).

        Figure 4. Specifics of the T-maze. Specifics of the T-maze. A. View through the choice point holes when the T-maze is in the Open State without vials. EHS, Elastic Holding Screws. B. Angled view of vial in vial holder. Note the elastic band holding into place. The elastic band is held in place by the elastic hold screws mounted onto the vial holders. C. Diagonal view of T-maze in the Holding State with vials attached. The three elastic holding screws (2 on the body and 1 on the lift) secure the elastic band. Tension generated within these elastics creates the force needed to shift the lift between states. LMAS, Loading Mouth Adjustment Screw; EHS, Elastic Holding Screw. D. Demonstration of how to insert carbon dioxide gun needle into the vial after the completion of experiment.

    2. The lift is a much simpler piece than the body and has a single hole where the flies will be stored called the fly holding chamber (Figures 1 and 2C).
      1. There are two pin holes on top that are important for aligning the fly holding chamber between the three possible positions of Loading, Holding, and Open (Figures 1 and 3).
      2. The lift is inserted into the body so that the pin holes are on the top and the single elastic holding screw is facing out (Figure 4C).
    3. Insert elastic holding screws into the body and lift, which allow elastics to wrap around and connect the body to the lift (Figure 4C). This will cause pressure on the lift in the direction of the body, so when the first pin is removed the fly holding chamber moves quickly from Loading to Holding states, and when the second pin is removed it moves from Holding to Open states.
      1. There are two elastic holding screws on top of the body at the lift insertion end.
      2. A single elastic holding screw is on the lift at the end opposite the insertion point.
      3. Multiple elastics can be wrapped around (or folded over on themselves) to increase the tension that will allow shifting to occur at the desired speed.
    4. The single adjustment screw on the body near the lift insertion makes direct contact with the pins. It can be adjusted allowing the loading mouth of the body and the holding chamber of the lift to be perfectly aligned when in the Loading state (Figures 1, 2C and 3D).
    5. On the opposite side of the body, where the choice point is, are the vial holders (Figures 4A, 4B, and 4D).
      1. There are two elastic holding screws on each holder for elastic bands to be wrapped around. These elastics will hold the vial securely in place.
      2. The holders have a vial lip notch that have been made specifically to the specifications of the vial so that the lip should sit securely in the holder.
      3. Wrap an elastic band around the vial to insure a secure fit during testing, ensuring that the flies cannot escape.
    6. When the final pin is removed and the tension in the elastic pulls the holding chamber to the choice point, the lift stop is important for quickly stopping the lift (Figures 2A-2B, 3C-3D). When the lift is in contact with the lift stop, the holding chamber and choice point are perfectly aligned, thereby aligning all three holes perfectly (the two choice point holes of the body and the flu holding chamber of the lift).
    7. The holder’s main purpose is to stabilize the body and lift in the loading position as you put the flies into the loading mouth of the T-maze (Figure 1A).
    8. The plug is important for collecting neutral flies and is used to block one side of choice point holes, forcing the neutral flies into a fresh empty vial on the opposing side for counting.
    9. The entire T-maze body and lift can be fully dismantled (by carefully removing the six bolts) and cleaned with detergent and/or alcohol. Be careful not lose any of the bolts in disassembly and do not remove any of the elastic holding screws. Allow to thoroughly dry before reassembly and use.

  3. Light Sources optimization for controls
    1. You should have a large table or work bench in the behavior room with a set point in the middle for the T-maze to be placed (Figure 5).
    2. Perpendicular to the set point, place a long piece of tape that extends 100 cm in either direction (2 metres in total) (Figure 5A). With the set point marked as zero, use a ruler and label the tape every 5 cm with its corresponding distance away from the set point, moving outward until you reach the end of the tape (i.e., the end of the tape should be 100 cm at both ends). Use these marks as the reference points when you place your light sources away from the set point.
    3. Optimize the distance that the light sources are placed away from the choice point for your control group(s). You will have to perform several trials with the light sources at varying distance from the choice point.
    4. Once your control flies consistently distribute evenly between the two light sources and show a preference index of 0, record the distances the light sources are at and use those for the remainder of the experiments that you are comparing with that controls. Perform this individually with “UV vs. blue” (Figure 5B), “UV vs. green” (Figure 5C), and “blue vs. green” paradigms.
    5. If the light sources are too intense (i.e., flies move towards a light source regardless of distance), placing a kimwipe supported by an elastic is a crude method that can be used to decrease the intensity of the light source (Figure 5A).
      Note: A more elaborate approach by Yamaguchi et al., 2010 using a spectroradiometer and resistor to manually adjust the intensity of the LED light sources can also be employed to normalize the light source intensities so that the wild type flies have a preference index of 0. Instead of moving the light sources, the LEDs can be placed at the end of the vials and their intensities can be manually adjusted until the flies are consistently evenly distributed between the two light sources after each trial. For further details on this method, refer to Yamaguchi et al., 2010 for a description of their rationale and how they accomplished this.

      Figure 5. Light set-up during experiment. A. UV vs. Green experimental setup without T-maze in place. The set-point to place the T-maze is located at the intersection between the Tape on work bench. Tape extending between light sources is marked at distance away from the set-point. Both light sources have been moved to distances to optimize the setup so that wild-type controls have a preference index of 0. B. UV vs. Blue experimental setup with T-maze at the set-point. Light sources are pointed towards the choice point in the maze.

  4. Pre-experiment fly collection
    1. Raise flies in a temperature and humidity controlled environment with a 12 h light-dark cycle to ensure natural circadian rhythms.
    2. Anesthetize flies no more than 24 h before behavioral experiments, and place flies into the behavior room 24 h before the experiments to allow the flies to habituate to the environment.
    3. The behavior room itself should be temperature and humidity controlled similar to that of the incubator they are reared in, and experiments should be performed during the 12 h light-period of the flies natural circadian rhythms experienced in the incubator during rearing.
    4. To minimize the effects of variations in experimental conditions in each experiment, generate and collect control and experimental flies at the same time period for behavioural comparison, and perform phototactic assays on the same day, if possible.

  5. T-maze experimental procedure
    1. Anesthetize and collect ~30-50 adult flies of the same genotype and at similar age (i.e., 7-10 days after enclosion) and place into a single vial with food. Need to have enough vials for 5-10 trials, but make sure that the number of flies per vial is consistent through out the experiments you will compare statistically.
    2. Move flies into behavior room the day before performing experiment.
    3. When ready to perform experiment, ensure that the T-maze is clean, the lift slides smoothly in the body, and that all 3 elastics are attached (two for supporting vials, one for pulling the lift).
    4. Pull back and insert both pins into the lift, then mount the T-maze on the holder so that the loading mouth is facing upwards. The holding chamber for the lift should be exposed and perfectly in line with the loading mouth.
    5. Put down a flipping pad and flip the flies into the T-maze by tapping down the vial with the flies, remove the cap, and quickly invert the vial upside down into the loading mouth so that the flies will fall into it. Hold the vial of flies to the T-maze with one hand and the holder to the T-maze with the other hand and aggressively tap the T-maze repeatedly against the flipping pad so that all the flies in the vials fall into the loading mouth.
    6. Once all flies are in the fly holding chamber quickly pull the first pin so that the T-maze is in the holding state and the flies are within the fly holding chamber at the intermediate zone.
    7. Orientate the T-maze so that it is in line with your light sources (make sure that they are off at the is point) and place two empty vials on either side of the choice point holes and secure with elastic bands.
    8. Keep flies in the intermediate zone for 90 s in the dark and when ready, quickly turn on the light sources and pull the final pin. The elastic will pull the lift from the holding to the open state (Videos 1 and 2).
    9. Leave flies in the open state for 20 seconds. The flies should be exposed to both light sources and should move from the choice point into the two vials (Videos 1 and 2).
    10. After the experimental time is finished, gently pull back the lift to the first pinhole and insert the pin. This will put the maze into the holding state and separate the flies into 3 groups (light source A, light source B, and neutral).
    11. Using the CO2, gently insert the needle in the top of the vial by pulling back on the vial slightly so that it makes a small space to put the needle in.
    12. Knock out the flies in each individual vial, invert the T-maze and tap them into the empty vial and label with the light source it represents.
    13. To remove the neutral flies (that did not choose between either light source), insert the plug into one of the choice point holes and place a vial in the opposing choice point hole. Then remove the pin and gently move the lift back to the open state. As done with the previous two vials, anesthetize, invert, and tap the neutral flies into a labeled empty vial.
    14. Empty the labeled vials individually onto a CO2 pad and count the number of flies separately, corresponding to the light sources they preferred.
    15. Record data and determine the preference index.
    16. 5-10 trials should be performed per genotype. Increasing the number of trials may be necessary.

      Video 1. Video clips showing UV vs. Green preference of wild-type flies. Wild-type flies recognize both UV and green light, and thus are evenly distributed in two vials.

      Video 2. Video clips showing UV vs. Green preference of bdl mutant flies. bdl mutations specifically disrupted R8 but not R7 synaptic function (Shaw et al., 2019), bdl mutant flies were only attracted towards UV light source.

Data analysis

  1. To calculate the light preference index (PI), use the following formula:

  2. For experiments involving the comparison of two groups, statistical analysis is performed using two-tailed t-tests. For experiments involving the comparison of more than two groups, statistical analysis is performed using one-way ANOVA followed by post hoc Tukey’s test. The difference is considered as significant when a P-value is < 0.05.


Genotypes: Be weary of eye colour as it may affect your results. You may need to cantonize flies to ensure eye colour between all groups is comparable.


This T-maze phototactic behavioural assay is modified from the phototactic choice paradigm described previously by Yamaguchi et al. (2010). We would like to thank Dr. Claude Desplan at New York University for input on the behavioral assay and providing stocks to test and optimize the set-up.

Competing interests

The authors declare no competing financial interests.


  1. Behnia, R. and Desplan, C. (2015). Visual circuits in flies: beginning to see the whole picture. Curr Opin Neurobiol 34: 125-132.
  2. Benzer, S. (1967). Behavioral mutants of Drosophila isolated by countercurrent distribution. Proc Natl Acad Sci U S A 58(3): 1112-1119.
  3. Dolph, P., Nair, A. and Raghu, P. (2011). Electroretinogram recordings of Drosophila. Cold Spring Harb Protoc 2011(1): pdb prot5549.
  4. Fischbach, K. F. and Dittrich, A. P. M. (1989). The optic lobe of Drosophila melanogaster. I. A Golgi analysis of wild-type structure. Cell Tissue Res 258: 441-475.
  5. Harris, W. A., Stark, W. S. and Walker, J. A. (1976). Genetic dissection of the photoreceptor system in the compound eye of Drosophila melanogaster. J Physiol 256(2): 415-439.
  6. Millard, S. S. and Pecot, M. Y. (2018). Strategies for assembling columns and layers in the Drosophila visual system. Neural Dev 13(1): 11.
  7. Montell, C. (2012). Drosophila visual transduction. Trends Neurosci 35(6): 356-363.
  8. Morante, J. and Desplan, C. (2008). The color-vision circuit in the medulla of Drosophila. Curr Biol 18(8): 553-565.
  9. Rister, J. and Heisenberg, M. (2006). Distinct functions of neuronal synaptobrevin in developing and mature fly photoreceptors. J Neurobiol 66(12): 1271-1284.
  10. Rister, J., Razzaq, A., Boodram, P., Desai, N., Tsanis, C., Chen, H., Jukam, D. and Desplan, C. (2015). Single-base pair differences in a shared motif determine differential Rhodopsin expression. Science 350(6265): 1258-1261.
  11. Schnaitmann, C., Haikala, V., Abraham, E., Oberhauser, V., Thestrup, T., Griesbeck, O. and Reiff, D. F. (2018). Color processing in the early visual system of Drosophila. Cell 172(1-2): 318-330 e318.
  12. Shaw, H. S., Cameron, S. A., Chang, W. T. and Rao, Y. (2019). The conserved igsf9 protein borderless regulates axonal transport of presynaptic components and color vision in Drosophila. J Neurosci 39(35): 6817-6828.
  13. Tully, T. and Quinn, W. G. (1985). Classical conditioning and retention in normal and mutant Drosophila melanogaster. J Comp Physiol A 157(2): 263-277.
  14. Weir, P. T., Henze, M. J., Bleul, C., Baumann-Klausener, F., Labhart, T. and Dickinson, M. H. (2016). Anatomical reconstruction and functional imaging reveal an ordered array of skylight polarization detectors in Drosophila. J Neurosci 36(19): 5397-5404.
  15. Yamaguchi, S., Desplan, C. and Heisenberg, M. (2010). Contribution of photoreceptor subtypes to spectral wavelength preference in Drosophila. Proc Natl Acad Sci U S A 107(12): 5634-5639.
Please login or register for free to view full text
Copyright: © 2020 The Authors; exclusive licensee Bio-protocol LLC.
How to cite:  Readers should cite both the Bio-protocol article and the original research article where this protocol was used:
  1. Shaw, H. S., Larkin, J. and Rao, Y. (2020). Phototactic T-maze Behavioral Assay for Comparing the Functionality of Color-sensitive Photoreceptor Subtypes in the Drosophila Visual System. Bio-protocol 10(6): e3558. DOI: 10.21769/BioProtoc.3558.
  2. Shaw, H. S., Cameron, S. A., Chang, W. T. and Rao, Y. (2019). The conserved igsf9 protein borderless regulates axonal transport of presynaptic components and color vision in Drosophila. J Neurosci 39(35): 6817-6828.
By submitting a question/comment you agree to abide by our Terms of Service. If you find something abusive or that does not comply with our terms please contact us at eb@bio-protocol.org.

If you have any questions/comments about this protocol, you are highly recommended to post here. We will invite the authors of this protocol as well as some of its users to address your questions/comments. To make it easier for them to help you, you are encouraged to post your data including images for the troubleshooting.

If you have any questions/comments about this protocol, you are highly recommended to post here. We will invite the authors of this protocol as well as some of its users to address your questions/comments. To make it easier for them to help you, you are encouraged to post your data including images for the troubleshooting.

We use cookies on this site to enhance your user experience. By using our website, you are agreeing to allow the storage of cookies on your computer.