Temperature is a critical environmental variable that affects the distribution, survival and reproduction of most animals. Although temperature receptors have been identified in many animals, how these receptors respond to temperature is still unclear. Here, we describe an automated tracking method for studying the thermotactic behaviors of Drosophila larvae and adults. We built optimal experimental setups to capture behavioral recordings and analyzed them using free software, Fiji and TrackMate, which do not require programming knowledge. Then, we applied the adult thermotactic two-choice assay to examine the movement and temperature preferences of nine Drosophila species. The ability or inclination to move varied among these species and at different temperatures. Distinct species preferred various ranges of temperatures. Wild-type D. melanogaster flies avoided the warmer temperature in the warm avoidance assay and the cooler temperature in the cool avoidance assay. Conversely, D. bipectinata and D. yakuba did not avoid warm or cool temperatures in the respective assays, and D. biarmipes and D. mojavensis did not avoid the warm temperature in the warm avoidance assay. These results demonstrate that Drosophila species have different mobilities and temperature preferences, which will benefit further research in exploring molecular mechanisms of temperature responsiveness.

Temperature affects all aspects of physiology, from the rate of chemical reactions and the activity of biomolecules to the distribution of living organisms (Dell et al., 2011; Sengupta and Garrity, 2013; Franks and Hoffmann, 2012). Temperature variation is particularly influential for small animals, such as insects, which depend on ambient temperatures to set their body temperatures (Garrity et al., 2010; Dillon et al., 2010). Many insect vectors of disease, including mosquitoes, respond to the temperature of their warm-blooded hosts and use it to guide blood-feeding behaviors (Brown, 1951; Howlett, 1910; Corfas and Vosshall, 2015; Greppi et al., 2015, 2020).

Fruit flies are an excellent insect model system for studying thermosensation. In many Drosophila melanogaster thermosensory systems, a small number of thermosensory neurons control robust behaviors (Ni et al., 2013; Hamada et al., 2008; Klein et al., 2015; Budelli et al., 2019; Gallio et al., 2011). These sensory neurons contain evolutionarily conserved thermal molecules across Drosophila species and insect vectors of disease, including mosquitoes (Corfas and Vosshall, 2015; Greppi et al., 2020). Adult D. melanogaster flies possess several thermosensory systems to control innocuous thermotactic behaviors (Barbagallo and Garrity, 2015). TRPA1, a transient receptor potential cation channel, acts as an internal warm sensor in the brain, guiding flies to slowly avoid warm temperatures when they are exposed to a shallow temperature gradient (Hamada et al., 2008). Aristal heating and cooling neurons guide rapid warm and cool avoidance on steep temperature gradients. A gustatory receptor GR28B(D) is the warm receptor in aristal heating cells (HCs), and three members of the ionotropic receptor (IR) family (IR25a, IR93a and IR21a) form the cool receptor in aristal cooling cells (CCs) (Ni et al., 2013; Budelli et al., 2019). However, the molecular mechanisms underlying how these thermoreceptors respond to temperature are still unclear.

The genomes of more than 20 Drosophila species, besides D. melanogaster, have been sequenced (Celniker et al., 2002; Hoskins et al., 2007; Hu et al., 2013; Clark et al., 2007; Stark et al., 2007; Chen et al., 2014). These sequenced species span a wide range of global distributions with diverse temperatures (Powell, 1997). To adapt to their specific ecosystems, they may possess thermoreceptors that have evolved distinct temperature responsiveness through amino acid changes at a few residues. Thus, we expect that these Drosophila species offer opportunities to understand how thermoreceptors respond to temperature changes.

This study used thermotactic behaviors to understand the thermal preference of various Drosophila species. Drosophila thermotactic behaviors depend on locomotion – the ability of an animal to move. Therefore, we first describe an automated tracking method that utilizes an open-source Fiji plugin, TrackMate, to track the movement of larvae and adult flies. We built optimal experimental setups that allow for easy processing and reproducible analysis of the behavioral recordings. We also provide examples of how to analyze non-optimal recordings. TrackMate extracts the X and Y positions of an animal on each frame. This information allows the generation of animal trajectories, calculation of moving speeds and distances, and determination of preference indices in two-choice assays. This method can be used to analyze free-motion behaviors, two-choice thermotaxis and optogenetic assays in larvae and adult flies. Then, we used the adult thermotactic two-choice assay to examine the temperature preferences of different Drosophila species. We tested 801 flies, including four genotypes of D. melanogaster and eight other Drosophila species. We find that starting temperature and sex affect preference indices, and several species exhibit preferences similar to those of D. melanogaster thermoreceptor mutants. In summary, this study provides an automated tracking method to analyze Drosophila larval and adult movement. Results from various species can benefit the research pertaining to molecular mechanisms of temperature responsiveness.

Drosophila strains

y1,w* was used as the wild-type control for the larval behavioral assays in Fig. 1D–G. w1118 was used as the wild-type control for the adult behavioral assays in Figs 25. Canton-S (CS) and D. mojavensis were kind gifts from Dr Michael Dickinson. Other fly species were obtained from the National Drosophila Species Stock Center: D. ananassae (14024-0371.11), D. biarmipes (14023-0361.03), D. bipectinata (14024-0381.21), D. erecta (14021-0224.05), D. ficusphila (14025-0441.01), D. simulans (14021-0251.011) and D. yakuba (14021-0261.48). The following flies were previously described: UAS-CsChrimson (Klapoetke et al., 2014), Ir93aMI (Knecht et al., 2016), Ir93a-Gal4 (Sánchez-Alcañiz et al., 2018), Gr28bMB (Ni et al., 2013) and HC-Gal4 (Gallio et al., 2011).

Fig. 1.

Using TrackMate to analyze larval behaviors. (A,B) Setup for the single-larva two-choice thermotactic (A) and optogenetic assay (B). The setup for the free-motion assay is similar to that for the optogenetic assay but performed in ambient light. (C) Preprocessing of images of the single-larva behavioral assay. Top: the image sequence was imported into Fiji and cropped. Middle: the background was subtracted. Bottom: brightness and threshold were adjusted. White circles show the larva. (D) wt (y1,w*) and Ir93aMI trajectories in the free-motion assay. (E) wt (y1,w*) and Ir93aMI moving speed in the free-motion assay. n=15; data represent means (black) ±s.e.m. (light gray). (F) Moving distances of indicated genotypes and conditions. n=15–30; data represent means±s.e.m; **P<0.01, ****P<0.0001, Welch's test for the free-motion assay and Mann–Whitney test for the two-choice assay. (G) wt (y1,w*) and Ir93aMI trajectories in the two-choice assay. (H) Preference indices (PI) of the indicated genotypes. n=30; data represent means±s.e.m; *P<0.05, Mann–Whitney test. (I) The locomotion of an Ir21a-Gal4;UAS-CsChrimson (Ir21a>CsChrimson) larva with all-trans retinal (ATR, dietary retinal) in the optogenetic assay. Top: the video was converted to grayscale and cropped by Fiji. Bottom: the recording was preprocessed by Fiji and analyzed by TrackMate. White circles show the larva. (J) The relative speed of Ir21a>CsChrimson larvae with or without ATR. Relative speed is defined as the moving speed during red light on divided by the moving speed during red light off. n=15; data represent means±s.e.m; **P<0.01, Mann–Whitney test. (K–M) Using TrackMate to analyze non-optimal recordings. (K) A previous setup of the single-larva optogenetic assay, in which light glare and other background noise signals are detected. (L) Locomotion of an Ir21a>CsChrimson larva with ATR. Top: the video was converted to grayscale and cropped by Fiji. Bottom: the recording was preprocessed by Fiji and analyzed by TrackMate. White circles show the larva. Yellow circles show an unavoidable background noise signal. The trajectory is shown in rainbow colors. (M) The relative speed of Ir21a>CsChrimson larvae with or without ATR. n=3; data represent means±s.e.m; *P<0.05, Welch's test.

Fig. 1.

Using TrackMate to analyze larval behaviors. (A,B) Setup for the single-larva two-choice thermotactic (A) and optogenetic assay (B). The setup for the free-motion assay is similar to that for the optogenetic assay but performed in ambient light. (C) Preprocessing of images of the single-larva behavioral assay. Top: the image sequence was imported into Fiji and cropped. Middle: the background was subtracted. Bottom: brightness and threshold were adjusted. White circles show the larva. (D) wt (y1,w*) and Ir93aMI trajectories in the free-motion assay. (E) wt (y1,w*) and Ir93aMI moving speed in the free-motion assay. n=15; data represent means (black) ±s.e.m. (light gray). (F) Moving distances of indicated genotypes and conditions. n=15–30; data represent means±s.e.m; **P<0.01, ****P<0.0001, Welch's test for the free-motion assay and Mann–Whitney test for the two-choice assay. (G) wt (y1,w*) and Ir93aMI trajectories in the two-choice assay. (H) Preference indices (PI) of the indicated genotypes. n=30; data represent means±s.e.m; *P<0.05, Mann–Whitney test. (I) The locomotion of an Ir21a-Gal4;UAS-CsChrimson (Ir21a>CsChrimson) larva with all-trans retinal (ATR, dietary retinal) in the optogenetic assay. Top: the video was converted to grayscale and cropped by Fiji. Bottom: the recording was preprocessed by Fiji and analyzed by TrackMate. White circles show the larva. (J) The relative speed of Ir21a>CsChrimson larvae with or without ATR. Relative speed is defined as the moving speed during red light on divided by the moving speed during red light off. n=15; data represent means±s.e.m; **P<0.01, Mann–Whitney test. (K–M) Using TrackMate to analyze non-optimal recordings. (K) A previous setup of the single-larva optogenetic assay, in which light glare and other background noise signals are detected. (L) Locomotion of an Ir21a>CsChrimson larva with ATR. Top: the video was converted to grayscale and cropped by Fiji. Bottom: the recording was preprocessed by Fiji and analyzed by TrackMate. White circles show the larva. Yellow circles show an unavoidable background noise signal. The trajectory is shown in rainbow colors. (M) The relative speed of Ir21a>CsChrimson larvae with or without ATR. n=3; data represent means±s.e.m; *P<0.05, Welch's test.

Fig. 2.

Using TrackMate to analyze adult behaviors. (A,B) Setup for the single-fly two-choice thermotactic (A) and optogenetic assay (B). The setup for the free-motion assay is similar to that for the two-choice assay but is performed on a single plate with a unique temperature (25°C). (C) Preprocessing of images of the single-fly behavioral assay. Left: the image sequence was imported into Fiji and cropped. Right: the background was subtracted, and brightness and threshold were adjusted. (D) wt (w1118) and Gr28bMB trajectories in the free-motion assay. (E) wt (w1118) and Gr28bMB moving speed in the free-motion assay. n=15; data represent means (black) ±s.e.m (light gray). (F) Moving distances of the indicated genotypes and conditions. n=15; data represent means±s.e.m; *P<0.05, **P<0.01, Welch's test for the free-motion assay and Mann–Whitney test for the two-choice assay. (G) wt (w1118) and Gr28bMB trajectories in the two-choice assay. (H) PI of the indicated genotypes. n=7–11; data represent means±s.e.m; **P<0.01, Mann–Whitney test. (I) Trajectories of HC-Gal4;UAS-CsChrimson (HC>CsChrimson) flies with or without dietary retinal (ATR) in the optogenetic assay. (J) Avoidance indices (AI) of HC>CsChrimson flies with or without ATR. n=15; data represent means±s.e.m; ****P<0.0001, Mann–Whitney test.

Fig. 2.

Using TrackMate to analyze adult behaviors. (A,B) Setup for the single-fly two-choice thermotactic (A) and optogenetic assay (B). The setup for the free-motion assay is similar to that for the two-choice assay but is performed on a single plate with a unique temperature (25°C). (C) Preprocessing of images of the single-fly behavioral assay. Left: the image sequence was imported into Fiji and cropped. Right: the background was subtracted, and brightness and threshold were adjusted. (D) wt (w1118) and Gr28bMB trajectories in the free-motion assay. (E) wt (w1118) and Gr28bMB moving speed in the free-motion assay. n=15; data represent means (black) ±s.e.m (light gray). (F) Moving distances of the indicated genotypes and conditions. n=15; data represent means±s.e.m; *P<0.05, **P<0.01, Welch's test for the free-motion assay and Mann–Whitney test for the two-choice assay. (G) wt (w1118) and Gr28bMB trajectories in the two-choice assay. (H) PI of the indicated genotypes. n=7–11; data represent means±s.e.m; **P<0.01, Mann–Whitney test. (I) Trajectories of HC-Gal4;UAS-CsChrimson (HC>CsChrimson) flies with or without dietary retinal (ATR) in the optogenetic assay. (J) Avoidance indices (AI) of HC>CsChrimson flies with or without ATR. n=15; data represent means±s.e.m; ****P<0.0001, Mann–Whitney test.

Fig. 3.

Drosophila species have diverse mobilities. Four genotypes (w1118, CS, Ir93aMI and Gr28bMB) of D. melanogaster, as well as D. ananassae, D. biarmipes, D. bipectinata, D. erecta, D. ficusphila, D. mojavensis, D. simulans and D. yakuba were tested. The dashed line shows the threshold moving distance, 47.95 mm. Data represent means±s.e.m. **P<0.01, ***P<0.001 and ****P<0.0001, comparing moving distances of the corresponding genotype/species in the warm avoidance assay, Mann–Whitney test, except Welch's test for Gr28bMB. P<0.05, ‡‡‡P<0.001 and ‡‡‡‡P<0.0001, comparing moving distances of w1118 in the warm avoidance assay, Mann–Whitney test. §P<0.05, §§P<0.01, §§§P<0.001 and §§§§P<0.0001, comparing moving distances of w1118 in the cool avoidance assay, Mann–Whitney test.

Fig. 3.

Drosophila species have diverse mobilities. Four genotypes (w1118, CS, Ir93aMI and Gr28bMB) of D. melanogaster, as well as D. ananassae, D. biarmipes, D. bipectinata, D. erecta, D. ficusphila, D. mojavensis, D. simulans and D. yakuba were tested. The dashed line shows the threshold moving distance, 47.95 mm. Data represent means±s.e.m. **P<0.01, ***P<0.001 and ****P<0.0001, comparing moving distances of the corresponding genotype/species in the warm avoidance assay, Mann–Whitney test, except Welch's test for Gr28bMB. P<0.05, ‡‡‡P<0.001 and ‡‡‡‡P<0.0001, comparing moving distances of w1118 in the warm avoidance assay, Mann–Whitney test. §P<0.05, §§P<0.01, §§§P<0.001 and §§§§P<0.0001, comparing moving distances of w1118 in the cool avoidance assay, Mann–Whitney test.

Fig. 4.

Both starting temperature and sex affect w1118 PI. PIs of indicated groups in warm (A) and cool (B) avoidance assays. Data represent means±s.e.m. *P<0.05, **P<0.01 and ****P<0.0001, Mann–Whitney test, except Welch's test for the comparison of males starting at 31°C and females starting at 31°C in A and the comparison of females starting at 25°C and females starting at 11°C in B.

Fig. 4.

Both starting temperature and sex affect w1118 PI. PIs of indicated groups in warm (A) and cool (B) avoidance assays. Data represent means±s.e.m. *P<0.05, **P<0.01 and ****P<0.0001, Mann–Whitney test, except Welch's test for the comparison of males starting at 31°C and females starting at 31°C in A and the comparison of females starting at 25°C and females starting at 11°C in B.

Fig. 5.

Drosophila species have distinct temperature preferences. (A,B) PI of males (A) and females (B) of the indicated D. melanogaster genotypes and Drosophila species in the warm avoidance assay. (C,D) PI of males (C) and females (D) of the indicated D. melanogaster genotypes and Drosophila species in the cool avoidance assay. Data represent means±s.e.m. *P<0.05, **P<0.01, ***P<0.01 and ****P<0.0001, comparing PI with the corresponding w1118, Mann–Whitney test, except Welch's test for the comparison of w1118 and Gr28bMB and w1118 and D. yakuba in B.

Fig. 5.

Drosophila species have distinct temperature preferences. (A,B) PI of males (A) and females (B) of the indicated D. melanogaster genotypes and Drosophila species in the warm avoidance assay. (C,D) PI of males (C) and females (D) of the indicated D. melanogaster genotypes and Drosophila species in the cool avoidance assay. Data represent means±s.e.m. *P<0.05, **P<0.01, ***P<0.01 and ****P<0.0001, comparing PI with the corresponding w1118, Mann–Whitney test, except Welch's test for the comparison of w1118 and Gr28bMB and w1118 and D. yakuba in B.

Larval behavioral assays

Flies were maintained at 25°C under a 12 h:12 h light:dark cycle. All larval experiments were performed between 15:00 h and 18:00 h. Larvae were collected as described previously, with some modifications (Tyrrell et al., 2021). Vials containing 20–45 males and females were allowed 4–8 h to lay eggs and larvae were collected on day 4 using 10 ml of a 20% w/v sucrose solution. Male and female larvae were not separated. Larvae were thoroughly washed 3 times with distilled water, plated on a 60 mm tissue culture dish (Corning) with about 13 ml of 3% room temperature (about 20°C) agar gel, and given 5–10 min to recover from the washing process and acclimate to the agar.

For the free-motion assay, a steel plate was placed on a hot plate and its surface temperature was adjusted to 18±1°C. A sheet of matte black poster paper was placed on top of the steel plates. A plastic sheet protector was placed on the poster paper to prevent warping from moisture. A 3% agar gel (∼254×241 mm) was placed on the plastic sheet and evenly positioned in the release zone. For the two-choice assay, two steel plates on different hot plates were separated by ∼1.6 mm (the release zone). The surface temperature was 18±1°C on one side of the gel and 25±1°C on the other. The release zone was labeled at the top and bottom of the gel. The temperature was monitored before each trial using a surface temperature probe (80PK-3A, Fluke) and a thermometer (Fisherbrand Traceable Big-Digit Type K Thermometer). A wild-type control was run at the beginning of the daily experiments. Water was gently sprayed between trials to moisten the agar surface. A larva was placed at the release zone and given 2 min to wander. The experiment was conducted in dim ambient light (<10 lx) and a HERO8 GoPro camera was hung above the gel (∼267 mm) to record the motion of the larva for each trial.

Larval optogenetic assays were recorded by a Sony HDR-CX405 camcorder with the internal infrared filter removed and an 830 nm long-pass filter (FSQ-RG830, Newport) installed. A 3% agar gel was cut to a ∼76×127 mm size and a sheet of matte black poster paper was placed under the gel to reduce background noise signals. An infrared light (4331910725, Univivi) was used to visualize the larvae. Two red-light sources (Tyrrell et al., 2021) were attached 254 mm above the gel at a 45 deg angle on both sides of the gel such that the light intensity was even throughout the gel (∼3 klx) and no glare was created. A third red-light source was placed in a box outside the experimental setup but within view of the camera to serve as an indicator to record when red lights were on or off. Larvae were collected and prepared for the assay as detailed above except that they were kept on food containing 40 µmol l−1 all-trans retinal (ATR, Sigma-Aldrich) in the dark for 72 h before testing. An individual larva was placed on the agar gel and given 30 s to acclimate. For the recording, the larva was given 30 s to wander followed by three cycles of 5 s red light on and 15 s red light off.

Adult behavioral assays

Flies were raised at 25°C under a 12 h:12 h light:dark cycle and were 2–7 days old when tested. All experiments were performed between 08:00 h and 12:00 h. Fly species for which sex was difficult to distinguish via the naked eye were placed on a cold plate and viewed under a microscope to observe and assign their sex 24 h before the experiments. The two-choice thermotactic assays included the warm avoidance assay and the cool avoidance assay. For the warm avoidance assay, two steel plates on different hot plates were aligned so that the steel plate boundaries were brought together. Hot plate temperatures were adjusted allowing the surface of the steel plates to be 25±1 and 31±1°C, respectively. For the cool avoidance assay, the right-side hot plate was replaced with a glass dish filled with ice. To hold the temperature, more ice was placed on top of the steel plate. The left plate temperature was set to 25±1°C and the right plate to 11±1°C. For the free-motion assay, a steel plate was placed on a hot plate, and its surface temperature was adjusted to 25±1°C. The plates were sprayed with distilled water, and a plastic sheet protector was placed on top. Excess moisture was removed via a Kimwipe. A piece of white paper was placed on top of the plastic sheet protector to reduce background noise signals. A clear plastic cover was coated with SigmaCote to prevent the fly from walking on the plastic cover; it was placed on top of the white paper. The cover was positioned so that it was divided evenly by the steel plate boundary, creating the experimental chamber. Temperature was monitored before each trial using a surface temperature probe (80PK-3A, Fluke) and a thermometer (Fisherbrand Traceable Big-Digit Type K Thermometer). A wild-type control test was run at the beginning of every data collection session. For the experiment, a fly of known sex was placed under the plastic cover and a Styrofoam box was placed above the plastic cover to shield the experimental area and allow the experiment to be conducted in dim ambient light (<10 lx). The flies were given 2 min to acclimate on the 25±1°C side under the clear plastic cover. The cover was then moved towards the 31±1 or 11±1°C side so that the experimental area was divided evenly by the steel plate boundary. If the fly remained on the 25±1°C side during this process, the starting temperature was 25°C; if the fly moved to the 31±1°C or 11±1°C side, the starting temperature was 31 or 11°C, respectively. A HERO8 GoPro was positioned at the top of the box (∼203 mm in height). The motion of the fly was recorded by taking a time-lapse photo every second for 120 s.

For the adult optogenetic assays, half of the clear plastic cover was covered with an infrared filter (LEE Filters 100×100 mm Infra Red #87 Infrared Polyester Filter). A sheet of matte black poster paper was put under the cover to reduce noise from the background. An infrared light (4331910725, Univivi) was used to visualize the flies. A red-light source (Tyrrell et al., 2021) was attached ∼457 mm above the experimental surface with a light intensity of about 2.5 klx. Assays were recorded by a Sony HDR-CX405 camcorder with the internal infrared filter removed and an 830 nm long-pass filter (FSQ-RG830, Newport) installed. Flies of 1–3 days old were collected and kept in the dark for 40–48 h on food supplemented with 40 µmol l−1 ATR (Sigma-Aldrich). A single fly of known sex was pipetted under the plastic cover and given 30 s to acclimate. The light source was turned on and the motion of the fly was recorded for 60 s.

Preprocessing photos for adult behavioral assays

The individual photos for each trial were combined into a single file using Fiji and converted to 8-bit grayscale images (File>Import>Image Sequence function; boxes of Convert to 8-bit Grayscale and Sort names were numerically selected) (Schindelin et al., 2012). For the two-choice and optogenetic assays, the Rotate feature (Image>Transform>Rotate) was used to rotate images until the steel plate dividing line was vertical. A black line was drawn along the steel plate boundary using the draw function (Edit>Draw) and applied to all images. Then, for all assays (including free-motion behaviors and two-choice thermotaxis), the Crop feature (Image>Crop) was used to cut away all areas except the experimental area. Next, backgrounds were subtracted from all images (Process>Subtract Background; set rolling ball radius to 20.0 pixels; the light background box was selected). The brightness/contrast was adjusted to enhance the difference between the dark fly and the white background (Image>Adjust>Brightness/Contrast). Finally, the threshold was set to the automatically suggested setting (Image>Adjust>Threshold; Default and B&W settings were chosen, and the Don't reset range box was selected). In the Convert Stack to Binary box, the method was set to default, background was set to light, and the box corresponding to calculate threshold for each image was selected. The preprocessed image was then saved as a TIFF file (File>Save as>TIFF) for analysis.

Preprocessing videos for larval behavioral assays

Videos were converted to .avi and the resolution was decreased to 760×480 pixels by Any Video Converter 9 (AnvSoft). They were then uncompressed by Adobe Media Encoder or FFmpeg (ffmpeg -i input_file_name.avi -an -vcodec rawvideo -y output_file_name.avi).

Videos were imported to Fiji and converted to 8-bit grayscale (File>Import>AVI; the Convert to Grayscale box was selected). For the two-choice assays, the Rotate feature (Image>Transform>Rotate) was used to rotate images to make the marker line (release zone) vertical. Along the release zone, white lines were drawn at the top and bottom of the larval motion zone; these lines must not pass the larval moving path and should be applied to the first image only (Edit>Draw). Then, an area that was slightly larger than the larval motion zone that included the top and bottom white lines was selected and the Crop feature (Image>Crop) was applied for all images. Next, the background was subtracted from all images (Process>Subtract Background; rolling ball radius of 50.0 pixels). Finally, the brightness/contrast was adjusted to enhance the difference between the white larva and the black background (Image>Adjust>Brightness/Contrast; set Maximum to the left and applied; then set Contrast to the right and applied). The preprocessed image was saved as an .avi file (File>Save as>AVI) for analysis.

TrackMate analysis

TrackMate, in Fiji, was used to analyze the speed, distance and preference/avoidance indices (Tinevez et al., 2017). Preprocessed .tif files or .avi files were opened using Fiji and TrackMate was run. In the LoG Detector box, we suggested adjusting the Estimated blob diameter, Threshold, and Median filter. For adult flies, we set the Estimated blob diameter to 27.0–40.0 pixels, Threshold to 1.0–2.5, and selected Median filter. For larvae, we set the Estimated blob diameter to about 10.0 pixels, Threshold to 1.0, and deselected the Median filter. In the Set filters on spots box, filters could be used to remove aberrant regions of interest (ROI) by choosing the X and Y region for ROI as well as the Quality of the ROI found. Alternatively, aberrant ROI can be removed manually from the All Spots statistics file. In the Simple LAP tracker box, we suggested adjusting the Linking max distance, the Gap-closing distance, and the Gap-closing max frame gap. For adult flies, we set the Linking max distance and the Gap-closing distance to the maximum X and Y pixel length of the image and the Gap-closing max frame gap to 2. For larvae, we set the Linking max distance and the Gap-closing distance to 25 pixels and the Gap-closing max frame gap to 2. In the Select an action box, Export all spots statistics was selected and then Execute was clicked. The All Spots statistics file was cross-referenced with the spot detection file in Fiji, which was used to ensure that only one spot was marked for each frame, and that erroneous duplicates and/or aberrant ROIs were deleted. Then, the All Spots statistics file was saved as a .csv file.

The moving distance from frame n to the next frame was calculated through the following formula:
(1)
In the larval free-motion and two-choice assays, one pixel equaled about 0.493 mm. In the adult free-motion and two-choice assays, one pixel equaled about 0.060 mm.
The moving speed from frame n to the next frame was calculated through the following formula:
(2)
The preference index (PI) or avoidance index (AI) was calculated by using the X position. The PI for the two-choice assay was calculated based on the time the animal spent in each temperature zone using the following formulas. For adults:
(3)
For larvae:
(4)
The AI for the adult optogenetic assay was calculated based on the time a fly spent under the infrared filter (in the ‘dark’) or in red light using the following formula:
(5)
Speed, distance and PI could be calculated using Excel. A Python script was developed to accelerate this process.

Statistical analysis

Statistical details of experiments are detailed in the figure legends. The normality of distributions was assessed by the Shapiro–Wilk W test (P≤0.05 rejected normal distribution) and statistical comparisons of normally distributed data were performed by Welch's t-test. For data that did not conform to a normal distribution, statistical comparisons were performed by the Mann–Whitney test. Data analysis was performed using GraphPad Prism 9 and the pseudo-F analysis was performed in R.

Using TrackMate to analyze larval behaviors

We first used TrackMate to track larval movement and analyzed the larval two-choice thermotactic assay. Larvae were allowed to move on a 3% agar gel. As TrackMate recognizes particles (ROI) based on their intensity, background noise signals may be recognized and mistakenly tracked as ROI. To diminish the background noise signals and increase contrast, a sheet of black matte poster paper was placed under the gel, and the ambient light was dimmed to under 10 lx. A GoPro camera was placed above the gel to record larval movement for 2 min. For the two-choice assay, a larva was released between plates held at two temperatures and recorded (Fig. 1A). The 2 min video was imported into Fiji and preprocessed, including cropping, subtracting the background, and adjusting brightness and threshold (Fig. 1C). For the two-choice assay, a line was drawn to separate different temperatures. This line must be white and must not pass through the moving path of the larva (Fig. 1G). TrackMate was then used to track larval movement and generate its trajectory (Fig. 1D,G). TrackMate also extracted X and Y positions of the larva on each frame to calculate its moving speed and distance (Fig. 1E,F). In the two-choice assay, we analyzed the X position of the line and the X position of the larva on each frame. This information allowed us to calculate the time the larva spent in each temperature zone and the PI (Fig. 1H).

We validated this method using y1,w* (wt) and Ir93aMI larvae. IR93a is a subunit of the cool and warm receptors in dorsal organ temperature-responsive cells (Knecht et al., 2016; Hernandez-Nunez et al., 2021). Ir93aMI larvae moved significantly more than wt larvae (Fig. 1D,F,G; Movie 1). Regarding the PI, wt larvae preferred 18°C, consistent with previous reports (Fig. 1G,H; Movie 1) (Kwon et al., 2008, 2010; Shen et al., 2011). The Ir93aMI larvae had no preference between 18 and 25°C, suggesting that IR93a is required for choosing the optimal temperature between these two (Fig. 1G,H; Movie 1).

An optogenetic assay was also analyzed by TrackMate. The optogenetic tool used in this study was the red light-shifted channel rhodopsin CsChrimson. When bound to all-trans retinal (ATR), CsChrimson is activated by red light to depolarize cells (Klapoetke et al., 2014). The larval optogenetic assay must be performed under infrared conditions while avoiding light glare. Red-light intensity should be even across the region over which the larva travels (Fig. 1B). The recording procedure and analysis method were similar to the free-motion assay. Larvae expressing CsChrimson in dorsal organ cool cells (DOCCs) showed aversive behaviors under red light with dietary ATR, such as pausing during the run, which led to a decrease in moving speed (Fig. 1I,J) (Tyrrell et al., 2021). These aversive behaviors reflected the cool avoidance driven by DOCCs and were not observed in the group without ATR (Fig. 1I,J).

The TrackMate-based automated tracking method provides an option if behavioral recordings are available and computer-based analysis is required. The analysis process may take longer when the recordings contain strong background noise signals. Fig. 1K shows an optogenetic setup that was previously used in the lab (Tyrrell et al., 2021). The light source was placed under an agar plate so that the light source and light glare were recorded (Fig. 1K). After the recordings had been converted to grayscale, the larva was detected, but a significant amount of background noise was also shown (the upper panel of Fig. 1L; the new setup had a cleaner background, as shown in the upper panel of Fig. 1I). We proposed cropping the video and using the smallest possible region for analysis. Fiji parameters, such as background, brightness and contrast, must be adjusted to diminish background noise signals. In most cases, not all background noise signals could be avoided (yellow circles in Fig. 1L). TrackMate parameters, including LoG detector, filters on spots, simple LAP tracker and filters on tracks, also had to be optimized to detect the larva in most frames (>99%) and maximally decrease noise signals. Finally, the All Spots statistics.csv file was carefully checked to ensure that all ROI were related to the larva and were not noise signals. On some frames, the larva was not detected or was counted more than once, so multiple tracks were generated. A colorful track means it is composed of multiple tracks (Fig. 1L). Although taking longer to process and analyze, these non-optimal recordings showed similar results to the optimal recordings, i.e. that DOCC expression of CsChrimson drove aversive behaviors (Fig. 1M).

Using TrackMate to analyze adult behaviors

We next used TrackMate to analyze adult behaviors. We maximally diminished the background noise signals by performing the assay on a piece of white paper (Fig. 2A). In our setup, the fly was covered by a transparent cover that only allowed it to walk, not fly. A Styrofoam box was placed over that to cover the experimental region and create a featureless environment with dim ambient light of under 10 lx. A GoPro camera was installed on the ceiling of the Styrofoam box to take time-lapse pictures (1 picture per second) for 2 min. These pictures were then imported into Fiji as an image sequence and preprocessed, including cropping, subtracting the background, and adjusting brightness and threshold (Fig. 2C). Next, TrackMate was run to track the fly's movement, extract its X and Y positions, and generate its trajectory (Fig. 2D,G). Moving speed and distance were then calculated (Fig. 2E,F). We found that the warm receptor mutant, Gr28bMB, moved significantly more than w1118 (wt) flies (Fig. 2D,F; Movie 1).

When TrackMate was used to analyze an adult two-choice assay, a black line was drawn to separate the two temperatures and used as a reference to calculate the PI (Fig. 2G). While wt flies avoided 31°C and preferred 25°C, Gr28bMB did not show a preference between 25 and 31°C (Fig. 2G,H). This result is consistent with previous reports (Ni et al., 2013; Simões et al., 2021; Budelli et al., 2019). Moreover, Gr28bMB also moved more than wt flies in this condition (Fig. 2F,G; Movie 1).

We also used this method to analyze the two-choice optogenetic assay. In this assay, a red-light source was placed ∼457 mm above the experimental surface. Half of the transparent cover was covered by an infrared filter to create the ‘dark’ environment (Fig. 2B). Of note, the red light could not be directly above the cover because it caused light glares. The recording procedure and analysis method were similar to those for the larval optogenetic assay. HCs in aristae drive warm avoidance (Gallio et al., 2011; Budelli et al., 2019; Ni et al., 2013). Flies expressing CsChrimson in HCs avoided red light with dietary ATR (Fig. 2I,J; Movie 1). Without ATR, HCs were not activated and did not guide flies to avoid the red light. This hypothesis was validated by the observation that flies raised without ATR often traveled from the ‘dark’ zone to the red-light zone (Fig. 2I, left; Movie 1).

Drosophila species have diverse mobilities in adults

Next, we used the adult thermotactic two-choice assay to examine the temperature responses of different Drosophila species. We used two setups: the warm avoidance assay required flies to choose between 25 and 31°C, while the cool avoidance assay required flies to choose between 25 and 11°C. We tested 801 flies, including four genotypes of D. melanogaster (as controls), D. ananassae, D. biarmipes, D. bipectinata, D. erecta, D. ficusphila, D. mojavensis, D. simulans and D. yakuba. To determine their temperature preferences using thermotactic behaviors, we first excluded species that did not move or moved minimally. The behavioral recordings for each fly were analyzed using Fiji, their positions were extracted by TrackMate, and moving distances were calculated. We grouped moving distances by pseudo-F statistics and identified 10 clusters. Flies in the cluster with the shortest moving distances moved from 6.45 mm (107.584 pixels) to 47.90 mm (799.243 pixels). Independent visual analysis by four researchers agreed that flies in this cluster had limited mobility. Flies in other clusters explored both temperature zones adequately (Movie 2). Thereby, we set 47.95 mm (800 pixels) as the threshold (the dashed line in Fig. 3). Flies were omitted from PI analysis if their moving distances were shorter than 47.95 mm.

Most fly species moved significantly more in the warm avoidance assay than in the cool avoidance assay, including w1118 D. melanogaster, D. ananassae, D. biarmipes, D. bipectinata, D. erecta, D. mojavensis, D. simulans and D. yakuba (Fig. 3). These data suggest that flies are more active in warm environments.

Moreover, fly species had diverse mobilities. In the warm avoidance assay, D. erecta moved the least and D. mojavensis moved the most. The average moving distance of D. erecta was about 1/15 that of D. mojavensis. In the cool avoidance assay, D. erecta still moved the least, but the most active flies were D. melanogaster Ir93aMI, whose average moving distance was over 31 times that of D. erecta (Fig. 3). Of note, in the warm avoidance assay, moving distances from more than half of the D. ananassae and D. erecta flies did not reach the threshold (Fig. 3) and were not further analyzed. Similarly, in the cool avoidance assay, less than half of the D. ananassae, D. erecta and D. simulans flies reached the threshold (Fig. 3); thus, their PIs were also not calculated.

Starting temperature and sex affect PI

To understand the effects of starting temperature and sex on PI, we examined the temperature preference of male and female wild-type w1118 D. melanogaster under different conditions. A positive PI shows a preference for 25°C, while a negative PI indicates a preference for 31 or 11°C; a PI near zero suggests no preference.

We divided w1118 data obtained from the warm avoidance assay into four groups: males starting at 25°C, females starting at 25°C, males starting at 31°C and females starting at 31°C. As shown in Fig. 4A, males and females had similar PIs when they started at the same temperature. When flies started at different temperatures, the PIs showed a significant difference. Flies starting at 25°C preferred 25°C, while flies starting at 31°C had no preference. These data suggest that starting temperature, but not sex, affects PI in the warm avoidance assay.

In the cool avoidance assay, we also divided w1118 data into four groups: males starting at 25°C, females starting at 25°C, males starting at 11°C and females starting at 11°C (Fig. 4B). When flies started at 25°C, males had a stronger preference for 25°C than female flies did. This difference was not observed if they started at 11°C. Moreover, males starting at 25°C strongly preferred 25°C, and males starting at 11°C had no preference between 25 and 11°C. For females, flies starting at 25°C had a higher PI than those starting at 11°C, but these two groups were not significantly different. Therefore, in the cool avoidance assay, both starting temperature and sex affected PI. To understand the temperature preference of each fly species, males and females were separated and only flies starting at 25°C were analyzed.

Drosophila biarmipes, D. bipectinata, D. mojavensis and D. yakuba do not avoid warm temperatures

Finally, we calculated PIs of different fly species. As mentioned above, only flies starting at 25°C were used. We tested four D. melanogaster genotypes: two wild-types, w1118 and CS; a cool receptor mutant, Ir93aMI; and a warm receptor mutant, Gr28bMB (Knecht et al., 2016; Budelli et al., 2019; Ni et al., 2013). In the warm avoidance assay, both male and female w1118 and CS strongly preferred 25°C (Fig. 5A,B). The PI of Gr28bMB was significantly lower than that of w1118, consistent with previous reports (Ni et al., 2013; Simões et al., 2021; Budelli et al., 2019) (Fig. 5A,B). Drosophila biarmipes, D. bipectinata and D. yakuba had similar PIs to Gr28bMB, suggesting that they do not have a preference between 25 and 31°C (Fig. 5A,B). Drosophila mojavensis flies had negative PIs, indicating they prefer 31°C (Fig. 5A,B).

Drosophila bipectinata and D. yakuba do not avoid cool temperatures

In the cool avoidance assay, male w1118 and CS strongly preferred 25°C (Fig. 5C). As reported previously (Enjin et al., 2016; Budelli et al., 2019), cool receptor mutant Ir93aMI males had a lower PI than w1118 males (Fig. 5C). The PIs of D. ficusphila and D. yakuba males were close to 0, indicating they have no preference between 25 and 11°C (Fig. 5C). Drosophila bipectinata males had a negative PI, suggesting they prefer 11°C (Fig. 5C).

Regarding female flies, w1118 and CS also preferred 25°C (Fig. 5D). Unexpectedly, Ir93aMI females had a similar PI to w1118 females. Drosophila bipectinata and D. yakuba females, like their male counterparts, had PIs close to 0, indicating they have no preference between 25 and 11°C (Fig. 5D). In contrast, D. ficusphila females behaved differently from their males: Drosophila ficusphila males had no preference between 25 and 11°C, but the females had a strong preference for 25°C. These data further suggest that sex affects PI, at least in the cool avoidance assay.

In this paper, we first described an automated tracking method to analyze various Drosophila larval and adult behaviors, including free-motion behaviors, two-choice thermotaxis and optogenetic assays. Then, we used adult thermotactic two-choice assays to examine thermal preferences of different Drosophila species. We tested 801 flies, including four genotypes of D. melanogaster and eight other Drosophila species. Distinct fly species showed different temperature preferences from wild-type D. melanogaster. Wild-type D. melanogaster flies avoided the higher temperature of 31°C in the warm avoidance assay and the cooler temperature of 11°C in the cool avoidance assay. However, D. bipectinata and D. yakuba did not avoid either warm or cool temperatures in the respective assays, and D. biarmipes and D. mojavensis did not avoid the warm temperature in the warm avoidance assay. Our results also indicate that starting temperature and sex affect PI.

Drosophila melanogaster exhibit sophisticated behaviors that are widely used in studies of development, synaptic transmission, sensory physiology, and learning and memory. Many of these behaviors depend on locomotion. Locomotion analysis of larvae and adult flies is essential to gather insight into how modification of genetic components affects animal behaviors and changes their responses to stimuli. Thus, examination of their movement has become an integral part of such studies, leading to the development of tracking systems to provide a quantitative description of their behaviors (Bellen et al., 2010). Several tracking systems have been developed to track the locomotion of larvae and adult flies (Werkhoven et al., 2019; Branson et al., 2009; Valente et al., 2007; Straw and Dickinson, 2009; Colomb et al., 2012). However, many methods require programming skills and/or commercial software to set up or run the tracking systems, which often are obstacles for the researchers adopting these methods. Other methods only track larvae or adult movement, require specific experimental setups for data collection, or are challenging to analyze non-optimal recordings. Therefore, an automated tracking tool is required to analyze the locomotion of both larvae and adult flies. This tracking tool must be compatible with various file formats and non-optimal recordings. Ideally, this tool employs free software that does not require programming knowledge so that most laboratories can readily adopt it. We describe such a tool in this study. The Fiji plugin TrackMate is a free and open-source software. It accepts different file formats. Moreover, TrackMate can assess behavioral recordings from larvae and adult flies, even if the recordings include a lot of background noise. TrackMate extracts the X and Y positions of an animal on each frame. This position information is used to generate trajectories, calculate moving distances and speeds, and determine PIs in two-choice assays.

Clean backgrounds facilitate the analysis. TrackMate detects ROI – flies or larvae – based on their intensity. It cannot distinguish ROI from background noise signals if they have similar sizes and/or intensities. Thereby, noise signals cause aberrant trajectories and require researchers to adjust TrackMate parameters to avoid these signals and check the All Spots statistics.csv file to delete information relating to noise signals in the file. We provide easy ways to obtain clean backgrounds – a piece of white paper or matte black poster paper can significantly decrease background noise signals.

TrackMate can analyze data recorded in image sequences and videos. In this study, we used time-lapse images to record adult free-motion and two-choice behaviors and videos to record larval behaviors and adult optogenetic assays. Thereby, analysis approaches for both recording methods are presented. Most videos contained 24–30 frames s−1; their high temporal resolution resolved more behavioral details. When calculating moving distance and PI, high temporal resolution may not be necessary. In this case, time-lapse images become a better choice because they contain fewer data and take a shorter time to analyze. However, the time-lapse image resolution of the GoPro cannot distinguish the larva from the background; thus, videos were used for larval assays instead. When performing the larval optogenetic assay, we found it easier to track the larva under infrared conditions. Of note, regular cameras do not work under infrared conditions; the internal infrared filter needs to be removed and replaced by an 830 nm long-pass filter.

Based on trajectories, researchers can observe whether an animal runs or turns. Unfortunately, TrackMate cannot be used to analyze more complex behaviors, such as larval head sweeping or wing and leg movements in adult flies. We set a relatively large blob diameter to make TrackMate recognize the adult fly or larva as a single ROI. If using a smaller blob diameter, TrackMate often detects the animal as multiple ROI. However, the localization of each ROI is not defined; in other words, TrackMate cannot be used to recognize different parts of an animal, such as the head or tail. Therefore, it is challenging to use TrackMate to analyze more complex behaviors.

Two-choice assays are widely used to evaluate animal responses to environmental stimuli, such as light, odor, tastant, humidity and temperature. Many labs apply T-mazes to perform two-choice assays in adult flies, where researchers depend on the final position of animals to determine their preference (Sayeed and Benzer, 1996). However, it is challenging for T-maze-based two-choice assays to simultaneously assess the animals' ability to move, which is crucial for many behaviors. This issue can be solved by performing two-choice assays in a Petri dish, or a similar surface, as in our system (Figs 1A and 2A). By using this type of setup, researchers can constantly track animal responses to ensure that the differences in preference are not due to defects in locomotion. This study describes an automated tracking approach that allows researchers to quantify animal locomotion without programming knowledge. Moreover, we provide easy ways to obtain clean backgrounds for tracking and analysis. Finally, we adapted commercial equipment for thermotactic two-choice assays to increase reproducibility.

When using the adult thermotactic two-choice assay to examine the thermal preferences of different Drosophila species, we found that most fly species moved significantly more in warm environments than in cool environments. But this is not true for the cool receptor mutant Ir93aMI and the warm receptor mutant Gr28bMB (Knecht et al., 2016; Budelli et al., 2019; Ni et al., 2013). In these two mutants, moving distances were similar in the two assays. Moreover, these two mutants moved significantly more than wild-type D. melanogaster w1118 (Fig. 3). The reasons for these phenomena are unknown. One possibility is that these mutants per se move more. This possibility can be tested by measuring their moving distances in environments with unique temperatures. Gr28bMB supports this possibility as it moved more than w1118 at 25°C (Fig. 2F). Interestingly, Gr28bMB moving speed did not show an obvious decrease over time, while w1118 speed did (Fig. 2E). An alternative possibility is that Ir93aMI and Gr28bMB moved more only when they were allowed to explore different temperature zones. In this case, temperature receptors help animals to not only choose an optimal temperature but also save energy. Further studies are needed to test these possibilities.

According to the w1118 data, starting temperature affects PI. The only pair that was not significantly different was females starting at 25 and 11°C in the cool avoidance assay. Even in this case, the PI of the former group was higher than that of the latter group (Fig. 4B). The PI is determined by the amount of time an animal spends in each temperature zone. If an animal starts at 25°C, it may know where the 25°C zone is and, thus, can quickly return to it, even if it travels to the opposite side. However, if a fly starts at 31 or 11°C, it may not realize there is a 25°C zone or where the zone is. As a result, as time spent in unfavorable temperatures increases, the PI decreases. Moreover, sex also affects PI. For example, in the cool avoidance assay, w1118 males had a stronger preference for 25°C than their female counterparts when they started at 25°C (Fig. 4B). In addition, D. ficusphila males had no preference between 25 and 11°C, but females had a strong preference for 25°C (Fig. 5C,D).

GR28BD is the warm receptor that guides animals to rapidly avoid the high temperature in the two-choice warm avoidance assay (Ni et al., 2013; Simões et al., 2021; Budelli et al., 2019). As expected, Gr28bMB had defects in the warm avoidance assay but not in the cool avoidance assay (Fig. 5). IR93a is a component of the cool receptor, and its mutant has been reported to be deficient in avoiding both warm and cool temperatures in the respective assays (Enjin et al., 2016; Budelli et al., 2019; Knecht et al., 2016). In the warm avoidance assay, Ir93aMI flies had a lower, but not significantly different, PI than that of w1118 (Fig. 5A,B). The difference may be because we only analyzed flies starting at 25°C. In the cool avoidance assay, the PI of Ir93aMI males was significantly lower than that of w1118 males (Fig. 5C), which is consistent with previous studies. However, Ir93aMI females had a similar PI to that of w1118 females (Fig. 5D). We suspect that this is due to the lower PI of w1118 females (Fig. 4B) or the lower temperature in our cool zone than in the previous study (Budelli et al., 2019). IR25a is another cool receptor component, and its mutant does not have defects in avoiding 10°C zones (Enjin et al., 2016). Further studies on the functions of the cool receptor are needed.

Compared with D. melanogaster, D. biarmipes, D. bipectinata, D. mojavensis and D. yakuba showed different temperature preferences in the warm avoidance assay, and D. bipectinata and D. yakuba showed different preferences in the cool avoidance assay. To our knowledge, this is the first study to compare aristal thermoreceptor-controlled thermotaxis among different Drosophila species. Warm and/or cool receptors from these species may offer opportunities for understanding mechanisms enabling thermoreceptors to respond to different temperatures.

In summary, in this study we developed an automated tracking method to analyze various Drosophila larval and adult behaviors and identified the species exhibiting different temperature preferences from those of D. melanogaster. In the future, the temperature preferences of other fly species should be analyzed, and thermosensory organs, neurons and molecular receptors should be compared among different fly species to understand the mechanisms underlying temperature preference.

We acknowledge Dr Jianhong Ou for the R script of the pseudo-F statistics and Dr Michael Dickinson for CS and D. mojavensis flies.

Author contributions

Conceptualization: A.H., A.A.O., L.N.; Methodology: A.H., A.A.O., A.N.C., L.N.; Software: A.A.O.; Validation: A.H., A.A.O., T.J.V., A.N.C.; Formal analysis: A.H., A.A.O., T.J.V., L.N.; Investigation: A.H., A.A.O., T.J.V., A.N.C.; Resources: L.N.; Data curation: A.H., A.A.O., T.J.V., A.N.C.; Writing - original draft: A.A.O., T.J.V., L.N.; Writing - review & editing: A.H., A.A.O., T.J.V., A.N.C., L.N.; Visualization: A.H., A.A.O., T.J.V., A.N.C.; Supervision: L.N.; Project administration: A.H., A.A.O., L.N.; Funding acquisition: L.N.

Funding

This work was supported by the National Institutes of Health (R21MH122987 to L.N. and R01GM140130 to L.N.). Deposited in PMC for release after 12 months.

Data availability

The Python script has been deposited in GitHub and can be accessed at: https://github.com/niflylab/SingleFlyAnalysis.git. Original statistics and raw data are available from Dataverse: https://doi.org/10.7910/DVN/SNBQC2 and https://doi.org/10.7910/DVN/DNFWKI.

Barbagallo
,
B.
and
Garrity
,
P. A.
(
2015
).
Temperature sensation in Drosophila
.
Curr. Opin. Neurobiol.
34
,
8
-
13
.
Bellen
,
H. J.
,
Tong
,
C.
and
Tsuda
,
H.
(
2010
).
100 years of Drosophila research and its impact on vertebrate neuroscience: a history lesson for the future
.
Nat. Rev. Neurosci.
11
,
514
-
522
.
Branson
,
K.
,
Robie
,
A. A.
,
Bender
,
J.
,
Perona
,
P.
and
Dickinson
,
M. H.
(
2009
).
High-throughput ethomics in large groups of Drosophila
.
Nat. Methods
6
,
451
-
457
.
Brown
,
A. W. A.
(
1951
).
Factors in the attractiveness of bodies for mosquitoes
.
Nature
167
,
202
.
Budelli
,
G.
,
Ni
,
L.
,
Berciu
,
C.
,
Van Giesen
,
L.
,
Knecht
,
Z. A.
,
Chang
,
E. C.
,
Kaminski
,
B.
,
Silbering
,
A. F.
,
Samuel
,
A.
,
Klein
,
M.
et al. 
(
2019
).
Ionotropic receptors specify the morphogenesis of phasic sensors controlling rapid thermal preference in Drosophila
.
Neuron
101
,
738
-
747.e3
.
Celniker
,
S. E.
,
Wheeler
,
D. A.
,
Kronmiller
,
B.
,
Carlson
,
J. W.
,
Halpern
,
A.
,
Patel
,
S.
,
Adams
,
M.
,
Champe
,
M.
,
Dugan
,
S. P.
,
Frise
,
E.
et al. 
(
2002
).
Finishing a whole-genome shotgun: release 3 of the Drosophila melanogaster euchromatic genome sequence
.
Genome Biol.
3
,
research0079.1
.
Chen
,
Z. X.
,
Sturgill
,
D.
,
Qu
,
J.
,
Jiang
,
H.
,
Park
,
S.
,
Boley
,
N.
,
Suzuki
,
A. M.
,
Fletcher
,
A. R.
,
Plachetzki
,
D. C.
,
Fitzgerald
,
P. C.
et al. 
(
2014
).
Comparative validation of the D. melanogaster modENCODE transcriptome annotation
.
Genome Res.
24
,
1209
-
1223
.
Clark
,
A. G.
,
Eisen
,
M. B.
,
Smith
,
D. R.
,
Bergman
,
C. M.
,
Oliver
,
B.
,
Markow
,
T. A.
,
Kaufman
,
T. C.
,
Kellis
,
M.
,
Gelbart
,
W.
,
Iyer
,
V. N.
et al. 
(
2007
).
Evolution of genes and genomes on the Drosophila phylogeny
.
Nature
450
,
203
-
218
.
Colomb
,
J.
,
Reiter
,
L.
,
Blaszkiewicz
,
J.
,
Wessnitzer
,
J.
and
Brembs
,
B.
(
2012
).
Open source tracking and analysis of adult Drosophila locomotion in Buridan's paradigm with and without visual targets
.
PLoS ONE
7
,
e42247
.
Corfas
,
R. A.
and
Vosshall
,
L. B.
(
2015
).
The cation channel TRPA1 tunes mosquito thermotaxis to host temperatures
.
eLife
4
,
e11750
.
Dell
,
A. I.
,
Pawar
,
S.
and
Savage
,
V. M.
(
2011
).
Systematic variation in the temperature dependence of physiological and ecological traits
.
Proc. Natl. Acad. Sci. USA.
108
,
10591
-
10596
.
Dillon
,
M. E.
,
Wang
,
G.
and
Huey
,
R. B.
(
2010
).
Global metabolic impacts of recent climate warming
.
Nature
467
,
704
-
706
.
Enjin
,
A.
,
Zaharieva
,
E. E.
,
Frank
,
D. D.
,
Mansourian
,
S.
,
Suh
,
G. S.
,
Gallio
,
M.
and
Stensmyr
,
M. C.
(
2016
).
Humidity sensing in drosophila
.
Curr. Biol.
26
,
1352
-
1358
.
Franks
,
S. J.
and
Hoffmann
,
A. A.
(
2012
).
Genetics of climate change adaptation
.
Annu. Rev. Genet.
46
,
185
-
208
.
Gallio
,
M.
,
Ofstad
,
T. A.
,
Macpherson
,
L. J.
,
Wang
,
J. W.
and
Zuker
,
C. S.
(
2011
).
The coding of temperature in the Drosophila brain
.
Cell
144
,
614
-
624
.
Garrity
,
P. A.
,
Goodman
,
M. B.
,
Samuel
,
A. D.
and
Sengupta
,
P.
(
2010
).
Running hot and cold: behavioral strategies, neural circuits, and the molecular machinery for thermotaxis in C. elegans and Drosophila
.
Genes Dev.
24
,
2365
-
2382
.
Greppi
,
C.
,
Budelli
,
G.
and
Garrity
,
P. A.
(
2015
).
Some like it hot, but not too hot
.
Elife
4
,
e12838
.
Greppi
,
C.
,
Laursen
,
W. J.
,
Budelli
,
G.
,
Chang
,
E. C.
,
Daniels
,
A. M.
,
Van Giesen
,
L.
,
Smidler
,
A. L.
,
Catteruccia
,
F.
and
Garrity
,
P. A.
(
2020
).
Mosquito heat seeking is driven by an ancestral cooling receptor
.
Science
367
,
681
-
684
.
Hamada
,
F. N.
,
Rosenzweig
,
M.
,
Kang
,
K.
,
Pulver
,
S. R.
,
Ghezzi
,
A.
,
Jegla
,
T. J.
and
Garrity
,
P. A.
(
2008
).
An internal thermal sensor controlling temperature preference in Drosophila
.
Nature
454
,
217
-
220
.
Hernandez-Nunez
,
L.
,
Chen
,
A.
,
Budelli
,
G.
,
Berck
,
M. E.
,
Richter
,
V.
,
Rist
,
A.
,
Thum
,
A. S.
,
Cardona
,
A.
,
Klein
,
M.
,
Garrity
,
P.
et al. 
(
2021
).
Synchronous and opponent thermosensors use flexible cross-inhibition to orchestrate thermal homeostasis
.
Sci. Adv.
7
,
eabg6707
.
Hoskins
,
R. A.
,
Carlson
,
J. W.
,
Kennedy
,
C.
,
Acevedo
,
D.
,
Evans-Holm
,
M.
,
Frise
,
E.
,
Wan
,
K. H.
,
Park
,
S.
,
Mendez-Lago
,
M.
,
Rossi
,
F.
et al. 
(
2007
).
Sequence finishing and mapping of Drosophila melanogaster heterochromatin
.
Science
316
,
1625
-
1628
.
Howlett
,
F. M.
(
1910
).
The influence of temperature upon the biting of mosquitoes
.
Parasitology
3
,
479
-
484
.
Hu
,
T. T.
,
Eisen
,
M. B.
,
Thornton
,
K. R.
and
Andolfatto
,
P.
(
2013
).
A second-generation assembly of the Drosophila simulans genome provides new insights into patterns of lineage-specific divergence
.
Genome Res.
23
,
89
-
98
.
Klapoetke
,
N. C.
,
Murata
,
Y.
,
Kim
,
S. S.
,
Pulver
,
S. R.
,
Birdsey-Benson
,
A.
,
Cho
,
Y. K.
,
Morimoto
,
T. K.
,
Chuong
,
A. S.
,
Carpenter
,
E. J.
,
Tian
,
Z.
et al. 
(
2014
).
Independent optical excitation of distinct neural populations
.
Nat. Methods
11
,
338
-
346
.
Klein
,
M.
,
Afonso
,
B.
,
Vonner
,
A. J.
,
Hernandez-Nunez
,
L.
,
Berck
,
M.
,
Tabone
,
C. J.
,
Kane
,
E. A.
,
Pieribone
,
V. A.
,
Nitabach
,
M. N.
,
Cardona
,
A.
et al. 
(
2015
).
Sensory determinants of behavioral dynamics in Drosophila thermotaxis
.
Proc. Natl. Acad. Sci. USA.
112
,
E220
-
E229
.
Knecht
,
Z. A.
,
Silbering
,
A. F.
,
Ni
,
L.
,
Klein
,
M.
,
Budelli
,
G.
,
Bell
,
R.
,
Abuin
,
L.
,
Ferrer
,
A. J.
,
Samuel
,
A. D.
,
Benton
,
R.
et al. 
(
2016
).
Distinct combinations of variant ionotropic glutamate receptors mediate thermosensation and hygrosensation in Drosophila
.
eLife
5
,
e17879
.
Kwon
,
Y.
,
Shim
,
H. S.
,
Wang
,
X.
and
Montell
,
C.
(
2008
).
Control of thermotactic behavior via coupling of a TRP channel to a phospholipase C signaling cascade
.
Nat. Neurosci.
11
,
871
-
873
.
Kwon
,
Y.
,
Shen
,
W. L.
,
Shim
,
H. S.
and
Montell
,
C.
(
2010
).
Fine thermotactic discrimination between the optimal and slightly cooler temperatures via a TRPV channel in chordotonal neurons
.
J. Neurosci.
30
,
10465
-
10471
.
Ni
,
L.
,
Bronk
,
P.
,
Chang
,
E. C.
,
Lowell
,
A. M.
,
Flam
,
J. O.
,
Panzano
,
V. C.
,
Theobald
,
D. L.
,
Griffith
,
L. C.
and
Garrity
,
P. A.
(
2013
).
A gustatory receptor paralogue controls rapid warmth avoidance in Drosophila
.
Nature.
500
,
580
-
584
.
Powell
,
J. R.
(
1997
).
Progress and Prospects in Evolutionary Biology: The Drosophila Model
.
Oxford University Press, Incorporated
.
Sánchez-Alcañiz
,
J. A.
,
Silbering
,
A. F.
,
Croset
,
V.
,
Zappia
,
G.
,
Sivasubramaniam
,
A. K.
,
Abuin
,
L.
,
Sahai
,
S. Y.
,
Münch
,
D.
,
Steck
,
K.
,
Auer
,
T. O.
et al. 
(
2018
).
An expression atlas of variant ionotropic glutamate receptors identifies a molecular basis of carbonation sensing
.
Nat. Commun.
9
,
4252
.
Sayeed
,
O.
and
Benzer
,
S.
(
1996
).
Behavioral genetics of thermosensation and hygrosensation in Drosophila
.
Proc. Natl. Acad. Sci. USA.
93
,
6079
-
6084
.
Schindelin
,
J.
,
Arganda-Carreras
,
I.
,
Frise
,
E.
,
Kaynig
,
V.
,
Longair
,
M.
,
Pietzsch
,
T.
,
Preibisch
,
S.
,
Rueden
,
C.
,
Saalfeld
,
S.
,
Schmid
,
B.
et al. 
(
2012
).
Fiji: an open-source platform for biological-image analysis
.
Nat. Methods
9
,
676
-
682
.
Sengupta
,
P.
and
Garrity
,
P.
(
2013
).
Sensing temperature
.
Curr. Biol.
23
,
R304
-
R307
.
Shen
,
W. L.
,
Kwon
,
Y.
,
Adegbola
,
A. A.
,
Luo
,
J.
,
Chess
,
A.
and
Montell
,
C.
(
2011
).
Function of rhodopsin in temperature discrimination in Drosophila
.
Science
331
,
1333
-
1336
.
Simões
,
J. M.
,
Levy
,
J. I.
,
Zaharieva
,
E. E.
,
Vinson
,
L. T.
,
Zhao
,
P.
,
Alpert
,
M. H.
,
Kath
,
W. L.
,
Para
,
A.
and
Gallio
,
M.
(
2021
).
Robustness and plasticity in Drosophila heat avoidance
.
Nat. Commun.
12
,
2044
.
Stark
,
A.
,
Lin
,
M. F.
,
Kheradpour
,
P.
,
Pedersen
,
J. S.
,
Parts
,
L.
,
Carlson
,
J. W.
,
Crosby
,
M. A.
,
Rasmussen
,
M. D.
,
Roy
,
S.
,
Deoras
,
A. N.
et al. 
(
2007
).
Discovery of functional elements in 12 Drosophila genomes using evolutionary signatures
.
Nature
450
,
219
-
232
.
Straw
,
A. D.
and
Dickinson
,
M. H.
(
2009
).
Motmot, an open-source toolkit for realtime video acquisition and analysis
.
Source Code Biol. Med.
4
,
5
.
Tinevez
,
J.-Y.
,
Perry
,
N.
,
Schindelin
,
J.
,
Hoopes
,
G. M.
,
Reynolds
,
G. D.
,
Laplantine
,
E.
,
Bednarek
,
S. Y.
,
Shorte
,
S. L.
and
Eliceiri
,
K. W.
(
2017
).
TrackMate: an open and extensible platform for single-particle tracking
.
Methods
115
,
80
-
90
.
Tyrrell
,
J. J.
,
Wilbourne
,
J. T.
,
Omelchenko
,
A. A.
,
Yoon
,
J.
and
Ni
,
L.
(
2021
).
Ionotropic Receptor-dependent cool cells control the transition of temperature preference in Drosophila larvae
.
PLoS Genet.
17
,
e1009499
.
Valente
,
D.
,
Golani
,
I.
and
Mitra
,
P. P.
(
2007
).
Analysis of the trajectory of Drosophila melanogaster in a circular open field arena
.
PLoS ONE
2
,
e1083
.
Werkhoven
,
Z.
,
Rohrsen
,
C.
,
Qin
,
C.
,
Brembs
,
B.
and
De Bivort
,
B.
(
2019
).
MARGO (Massively Automated Real-time GUI for Object-tracking), a platform for high-throughput ethology
.
PLoS One
14
,
e0224243
.

Competing interests

The authors declare no competing or financial interests.

Supplementary information