3.1 The zebrafish imaging system and automated image analysis
When designing the zebrafish imaging system, we aimed for a system that would be user friendly, readily duplicated for high-throughput studies, and effective in the automated analysis of behavior. To achieve the first two goals, the system was built from widely available components, including a tall cabinet, a high-resolution Canon camera for image acquisition, and a laptop computer to present PowerPoint slides to the larvae (). However, to be effective in the automated analysis of behavior, new protocols for image analysis had to be developed. Acquired images were analyzed in ImageJ, which can be downloaded free of charge from the NIH (http://rsb.info.nih.gov/ij/
). The general approach was based on a previous method that identifies individual larvae using ImageJ’s particle analysis [20
]. However, three issues had to be resolved for the current high-throughput imaging system; (a) the location of the larvae was obscured by the visual stimuli, (b) it was difficult to determine the orientation of larvae when imaging four multiwell plates simultaneously, and (c) large image files could not be opened and analyzed when the size of these files exceeded the computer’s RAM.
- The first issue of interference by visual stimuli was resolved by separating the colors of the full-color images. For example, blue stimuli are visible in the red and green channels, but not in the blue channel of a color image (). Thus, the images were analyzed in the blue channel only, where blue stimuli are invisible. Similarly, when presenting red stimuli, we used the red channel for image analysis. Any remaining shadows were removed by background subtraction and small air bubbles or specks of dust were removed by a size filter in ImageJ’s particle analysis (). With these techniques, 98.3% of the larvae were correctly detected (sem=0.7, n=12 wells, 1 larva per well, imaged for 20 minutes), indicating that this protocol can be used to effectively identify larvae in the presence of visual stimuli.
- To determine the orientation of the larvae, we previously used measurements of the larva’s centroid and center of mass [20, 21]. The centroid is located toward the head and the center of mass is located toward the tail. However, when imaging four multiwell plates with a 15 megapixel camera, the larva’s centroid and center of mass were just one pixel apart (avg=1.07 pixels, sem=0.03 n=237). To obtain a more accurate parameter of larval orientation, we also included measurements of a bounding box, the smallest straight rectangle that encloses a larva (). The midpoint of the bounding box is located in the tail, nearly 7 pixels away from the centroid (avg=6.54 pixels, sem=0.14, n=237). The automated analysis of larval orientation was evaluated using 202 images of larvae, in which we could unambiguously determine the orientation as up, down, left or right by manual scoring. We then measured the orientation of the same larvae by automated image analysis, using the bounding box method. In 98.5% of the cases, the orientation in the automated analysis matched the orientation in the manual analysis, indicating that the bounding box method is an efficient approach for the automated analysis of larval orientation.
- The third issue was that large image files could not be opened and analyzed when these files exceeded the computer’s RAM. This problem was solved by writing an ImageJ macro that analyzes a sequence of images, one image at a time (). Thus, when the analysis of one image is completed, the image is closed, before opening the next image. The macro makes it possible to automatically analyze hundreds or even thousands of high-resolution images in sequence. The developed macro for automated analysis of zebrafish larvae in multiwell plates is included in the supplementary information of this manuscript (supplement 3).
Overall, the imaging system and image analysis techniques make it possible to automatically analyze larval behavior and to project local visual stimuli in multiple multiwell plates.
3.2 Optimization of imaging speed for avoidance behavior
The developed imaging system was tested by measuring avoidance behavior in zebrafish larvae at 7 days post fertilization (dpf). We used 6 well plates to give the larvae ample space to swim away from the visual stimuli. Larvae were exposed to a ‘bouncing ball’, a 1.35 cm disc that moved from the left to the right and back in the top half of the well (see supplement 1
). The response of the larvae to the bouncing ball was examined by recording 15 minute videos at 30 frames per second. These short videos revealed complex patterns of resting, swimming, and turning at various velocities (). The behaviors were often directed away from the bouncing ball towards the bottom edge of the well, although we also observed larvae swimming or resting in the area of the bouncing ball. To quantify these intriguing but variable behaviors, we aimed for longer recording times and a larger number of wells. However, in the 30 fps video mode, such an expansion would quickly result in hundreds of thousands of images, which are difficult to store and analyze due to time and file size constraints (30 fps × 3600 sec/hr = 108,000 images / hr). In an effort to standardize the experiments, minimize file size, and speed up the ImageJ analysis, we analyzed larval behaviors at 6, 12, 18, 24, 30, and 60 second intervals (). We then examined the following parameters: (1) swim speed and file size, (2) the preference for the bottom half of the well, and (3) the preference for the edge of the well. (1) The measured swim speed and file size are both dependent on the rate of image acquisition (). A trend line of the swim speed, fitted by polynomial regression (y = −0.0004x3 + 0.0541x2 − 2.5743x + 53.935, R2
=0.9997), indicates that 75% of the swim speed is measured at a 6 second interval. A 6 second interval corresponds to 600 images per hour or 3.6 GB per hour (one compressed image = 6 MB). A typical one hour recording with 600 images can be analyzed in a few hours by automated image analysis in ImageJ. When switching to a 60 second interval between images, the measured swim speed is approximately 7 times lower that the actual swim speed. However, the storage requirements and analysis time may be reduced 10-fold. (2) The preference of the larvae for the bottom half of the well (away from the bouncing ball) was examined in a one hour recording (). The one hour recordings analyzed at 6 second intervals, showed that the larvae were located in the bottom half of the well 82.1 % of the time (sem= 5.6, n=11 wells with 1 larva per well). The results were nearly identical when analyzing the data using longer intervals between the images (p=0.89, 6 vs. 60 sec interval). (3) The preference for the edge was examined by dividing the well into inner and outer halves (). Both halves were matched for area. The one hour recordings analyzed at 6 second intervals revealed that larvae were located in the outer half of the well 88.4 % of the time (sem= 3.4, n=11 wells). Again, the results were nearly identical when analyzing the data using longer intervals between the images (p=1.00, 6 vs. 60 sec interval). Based on these results, we conclude that the swim speed is most accurately measured when imaging at a 6 second, or shorter, interval. However, the location of the larvae can be accurately measured using a 60 second interval, which saves storage space and speeds up the image analysis. Thus, high-speed imaging may be the preferred approach for measuring larval activity and low-speed imaging may be beneficial for high-throughput analyses of avoidance behavior.
Optimization of the image interval
3.3 The one-fish bouncing ball assay
To obtain quantitative information on larval avoidance behavior, we examined larval swimming patterns in a larger number of wells using a 60 second interval between images (). We found that larvae exposed to the bouncing ball spent more time down in the bottom half of the well away from the bouncing ball (), i.e. the percentage of time spent in the bottom half of the well increased significantly from 56.4% (s.e.m.=2.0, n=119) without visual stimuli to 67.2% (sem=2.4, n=82) in the presence of a blue bouncing ball (p<0.001). Larvae exposed to the bouncing ball also spent significantly more time at the edge of the well (avg=87%, sem=1.0), than larvae without visual stimuli (avg=76%, sem=1.4, p<0.0001), . In addition, larvae exposed to the bouncing ball displayed an increased outward orientation (avg=70.9%, sem=1.4), compared to the larvae without visual stimuli (avg=65.9%, sem=1.0, p<0.01), . We did not observe a statistical difference in swim speed between the control larvae (avg=9.2 mm/min, sem=0.33) and the larvae exposed to the bouncing ball (avg=9.9 mm/min, sem=0.47), . However, larvae exposed to the bouncing ball move significantly faster when they are in the upper half of the well (avg=12.6 mm/min, sem=0.56) than they do down in the lower half of the well (avg=10.0 mm/min, sem=0.40, p<0.0001). Similarly, we did not observe a statistical difference between the percent rest in the control larvae (avg=36%, sem=2.2) and the larvae exposed to a bouncing ball (avg=34%, sem =2.2), . However, larvae exposed to a bouncing ball rest more frequently down in the dish (avg=32%, sem=2.3) than they do up in the dish (avg=23%, sem=2.5, p<0.05). Since larvae are more likely to be immobile in the bottom half of the well, this immobility is likely a resting behavior, rather than a freezing behavior. Overall, the obtained results indicate that avoidance behavior can be accurately measured in multiwell plates. A potential obstacle for high-throughput studies is the number of wells that need to be imaged in order to obtain statistically significant results. For example when studying thousands of genes or small molecules, it would be desirable to image no more than 12 wells per experimental group. However, the avoidance behaviors of individual larvae were highly variable and the 12 wells proved to be insufficient for measuring a significant avoidance response. We conclude that the one-fish bouncing ball assay can be used to accurately measure avoidance behaviors, but that the assay would need to be improved in order to be suitable for high-throughput studies.
Quantification of behavior in the one-fish bouncing ball assay
3.4 The two-fish bouncing ball assay
The two-fish assay was developed in part to examine larval interactions, and in part to improve the statistics of the avoidance response. The experimental setup and visual stimuli are the same as described above for the one-fish assay, but we added two larvae per well, instead of one. Since the two larvae may interact, the analysis was carried out on a per-well basis, rather than a per-larva basis (assuring that the measurements are independent). The larvae were imaged without visual stimuli (n=93 wells) or in the presence of a blue bouncing ball (n=54 wells). We found that larvae exposed to the bouncing ball spent significantly more time down in the dish (avg=65%, sem=1.7), than larvae without visual stimuli (avg=55%, sem=1.5, p<0.0001), . Larvae exposed to the bouncing ball also spent significantly more time at the edge of the well (avg=86%, sem=1.0) than larvae without visual stimuli (avg=78%, sem=1.2, p<0.0001), . In addition, larvae exposed to the bouncing ball were more frequently oriented outward (avg=71%, sem=0.9), than larvae without visual stimuli (avg=67%, sem=0.8, p<0.01), . Thus, the response to the bouncing ball was very similar to the response observed in the one-fish assay. Larvae without visual stimuli were located in the same quadrant only 19.4% (sem=0.9) of the time, vs. 25% expected in a random distribution. Thus, larvae used in the two-fish assay showed no attraction to each other. Larvae exposed to the bouncing ball were together more frequently (avg=24%, sem=1.1, p<0.01), than the control larvae without visual stimuli (). To assure that this behavior was not caused by errors in the automated analysis when two larvae touch or overlap, we manually analyzed a 2-fish assay (12 wells, imaged for one hour, using a 60 sec interval). These manual analyses revealed that larvae were touching or overlapping only 0.8% of the time (sem=0.4%, n=12 wells). Based on these results, we conclude that 7 dpf larvae have no social preference for being near each other. Our results are consistent with previously observed avoidance behaviors of larvae in the smaller wells of a 12 well plate [20
], and with a recent study showing that robust shoaling behaviors in zebrafish develop later, during the juvenile stages [22
]. The additional data points that were obtained by using two fish per well reduced the well-to-well variability and improved the statistics of the assay. Highly significant differences were observed in response to the bouncing ball stimulus. However, these differences were not significant when analyzing 12 wells per experimental group. We conclude that the two-fish assay can be used to measure avoidance of the bouncing ball and study avoidance between larvae, although the number of wells that would need to be imaged is a limiting factor for high-throughput studies.
Quantification of behavior in the two-fish bouncing ball assay
3.5 The five-fish bouncing ball assay
We aimed to further reduce well-to-well variability by imaging groups of 5 zebrafish larvae in a single well (). The selection of 5 fish in the 5-fish assay is a tradeoff between a larger number of larvae, which would reduce well-to-well variability, and a smaller number of larvae, which would be beneficial for medium- and high-throughput applications. We found that, in the absence of visual stimuli, larvae were distributed randomly in the well, i.e. the larvae were down in the bottom half 50.9% of the time (sem=1.6, n=24 wells). When exposed to a blue bouncing ball, the larvae were down in the well 60.3% of the time (sem=1.6, n=36 wells). This difference is significant (p<0.001) when comparing all wells. A red bouncing ball was effective as well, i.e. larvae exposed to a red bouncing ball were 63.3% down in the well (sem=1.8, n=24 wells), which is significantly higher than the 50.9% (sem=1.6, n=24 wells) in the control group without visual stimuli (p<0.0001). In the latter case, the difference was significant when comparing 12 wells without visual stimuli vs. 12 wells with a red bouncing ball (the median p-value <0.05).
Avoidance behavior in the five-fish bouncing ball assay
3.6 Bouncing, blinking, and stationary balls
To determine whether the larvae respond to the color or to the movement of the bouncing ball, we imaged the larval response to a stationary ball in the upper half of the well (). The larvae exhibited a modest response to the stationary balls that was not significantly different from the no-ball controls. Larvae exposed to a stationary blue ball in the upper half of the well spent 54.9% of their time down in the well (sem=2.1, n=12 wells, p>0.05, vs. the no-ball control). Similarly, larvae did not display a significant response to a stationary red ball (avg=56.0% down, sem=2.2, n=12 wells, p>0.05, vs. no-ball control). When the larvae were exposed to a blue bouncing ball in the upper half of the well and a blue stationary ball in the lower half of the dish, larvae were down in the well 62.3% of the time (sem=2.7, n=12 wells, p<0.01, vs. no-ball control. Similarly, when the larvae were exposed to a red bouncing ball in the upper half of the well and a red stationary ball in the lower half of the well, larvae are down in the well 66.7% of the time (sem=3.0, n=12 wells, p<0.001 vs. the no-ball control). The experiments with a bouncing and stationary ball suggest that larvae respond to movement, rather than the color or size of the ball. In addition, these experiments show that it is possible to obtain an accurate measurement of avoidance behavior by imaging 12 wells with 5 larvae per well. The most effective stimulus is a red bouncing ball in the upper half of the well, counter-balanced by a red stationary ball in the lower half of the well (supplement 2
The experiment with the red bouncing ball in the upper half of the dish and the stationary red ball in the bottom half of the dish was analyzed over time in 1 minute intervals. The response of the larvae to the bouncing ball did not diminish during the one-hour recording, indicating that the larvae did not habituate to the stimuli (). We repeated the experiment with the red bouncing ball and red stationary ball, adding an internal control. Larvae were first imaged for 30 minutes without visual stimuli and then for 30 minutes with visual stimuli. Similar to the results described above, larvae exposed to a red bouncing ball and a red stationary ball show a significant avoidance response (avg=63.2% down, sem=2.1 vs. 49.5% down, sem=1.7 in the pre-stimulus control, n=24 wells, p<0.0001), . In contrast, larvae did not show a significant response to simultaneously blinking visual stimuli (avg=52.1% down, sem=1.8 vs. 51.3% down in the pre-stimulus control, n=24 wells, p>0.05) and did not show a significant response to the alternating blinking visual stimuli (avg=52.4% down, sem=2.6 vs. 50.7% down, sem 1.5 in the pre-stimulus control, n=24 wells, p>0.05), . For both the simultaneously and alternating blinking balls, the avoidance response of the larvae was significantly lower than the response to the bouncing ball (p<0.001 and p<0.01 respectively). These results show that the 7-day-old larvae specifically respond to movement, rather than local changes in light intensity.
3.7 Larval interactions in groups of five larvae
To examine more closely how larvae interact with each other in the five-fish bouncing ball assay, we imaged a 6-well plate at video speed (). The videos revealed that larvae will occasionally congregate () and then quickly disperse (). In addition, the larvae frequently swim in the same direction () and respond to the movement of other larvae in close proximity (). For example, in , larva 1 quickly darts away as the bouncing ball approaches. Larva 2 swims away from larva 1 and larva 3 moves away from larva 2, while larvae 4 and 5 rest at the edge of the well away from the activity. Based on the larval interactions in the two-fish and five-fish assays, we propose that the location of the larvae is influenced by two opposing forces: 1) the larvae avoid the bouncing ball, driving the larvae down towards the bottom edge of the well, and 2) the larvae prefer not to be near each other, causing a dispersion away from the bottom edge of the well (). The video recordings also show that there are numerous larval interactions and swimming patterns that remain to be analyzed in more detail and we plan to pursue these more complex analyses in future research.
Video analysis of larval interactions