Introduction

Changes in temperature have critical effects on living organisms (Cossins and Bowler 1987; Deeming and Ferguson 1991; Pörtner et al. 2005), causing long-term variations in their reproduction rates (Torricelli et al. 1985; Visser et al. 2009; Schaper et al. 2012), growth rates (Gillooly et al. 2001), and geographical distribution (Beitinger and Fitzpatrick 1979; Mora and Ospina 2001). In particular, reproduction rates are affected due to the fact that temperature is perceived as an important seasonal cue, which modulates the duration of parental care of unhatched fish eggs (Torricelli et al. 1985) and possibly triggers an onset of egg laying in birds (Visser et al. 2009; Schaper et al. 2012). Growth rates are influenced by temperature due to physiological changes, such as increased metabolic rates in ectotherms (Zuo et al. 2012) and stomach evacuation rates in Atlantic Salmon (Austreng et al. 1987). Changes in geographical distributions as a function of temperature variations have been related to the species’ thermal tolerance (Beitinger and Fitzpatrick 1979; Mora and Ospina 2001), which defines their natural habitat.

Among poikilothermic fish, temperature is considered as the most important abiotic factor, with fish being capable of detecting changes as low as 0.03 °C (Beitinger and Fitzpatrick 1979; Krause et al. 1998). Like other organisms, fish also have a preferred temperature range (Beitinger and Fitzpatrick 1979; Coutant 1987; Mora and Ospina 2001), which determines their geographical distribution (Beitinger and Fitzpatrick 1979; Caissie 2006) and influences the biodiversity of their ecosystem (Caissie 2006). Temperature varies on the basis of several factors all of which occur naturally in freshwater fish habitats (Bunn and Arthington 2002; Liao 2007), such as altitude, time of day, season (Arscott et al. 2001; Gardner et al. 2003), water depth (Sinokrot and Gulliver 2000), anthropogenic activities (Caissie 2006), and changes in water flow (Sinokrot and Gulliver 2000; Caissie 2006; Olden and Naiman 2010), with higher temperatures occurring at low flow rates.

The majority of studies that investigate the effect of temperature on fish are performed either in the presence of shoal mates (Weetman et al. 1999; Pritchard et al. 2001) or water flow (Keenleyside 1955); little is known on how fish respond collectively to temperature variations as they swim in a water flow. The presence of flow is central to fish life as it elicits a propensity to swim against the current (rheotaxis) (Montgomery et al. 1997; Suli et al. 2012; Kalueff et al. 2013), and enables prey detection (Kanter and Coombs 2003) and stream-finding for reproduction (Johnson et al. 2012). For social fish, the presence of water flow has been shown to be a determinant of schooling, whereby the coordinated swimming of a fish school has been associated to a reduced energy expenditure by group members (Herskin and Steffensen 1998; Killen et al. 2012; Marras and Porfiri 2012; Polverino et al. 2013).

Here, the objective is to integrate the presence of social enrichment with water flow to study the effect of temperature on shoals of giant danio (Devario aequipinnatus), a freshwater fish that is extensively used in biological studies (Wong et al. 2005; Biga and Meyer 2009). Full-body orientation and shape tracking is developed to quantify social behavior and individual activity of multiple fish in the water tunnel. Social behavior is measured in terms of average nearest neighbor distance and group alignment (polarization), while individual activity is quantified in terms of tail-beat frequency and rheotaxis. Based on prior studies on the influence of temperature on cohesion in guppies and zebrafish (Weetman et al. 1998; Pritchard et al. 2001), we predict that an increase in temperature will lead to more cohesive groups in danios. Similarly, in agreement with prior studies on teleost fish that show a significant change in metabolic rate with variation in temperature (Clarke and Johnston 1999), we predict that giant danios will be more active at higher temperatures. We hypothesize that at higher temperatures, as oxygen levels drop, fish will rheotact more to increase their oxygen intake; this increase in individual rheotaxis, in turn, will likely produce an increase in group polarization. Ultimately, we expect to find a relationship between activity and social behavior, whereby fish swimming in cohesive schools will display lower tail-beat frequencies due to reduced energy costs (Svendsen et al. 2003; Killen et al. 2012).

Materials and methods

The experimental procedure described in this work was approved by the Animal Welfare Oversight Committee at New York University Polytechnic School of Engineering (previously called Polytechnic Institute of New York University), protocol number AWOC-2013-103. Both the housing and the experimental procedure were designed to minimize stress to the animals.

Animals

Giant danios were selected in this study for their relatively large size that ease behavioral observations and strong schooling tendency (Viscido et al. 2004; Biga and Meyer 2009). Giant danios, a member of the cyprinids family, are a social species whose striped color pattern aids in their schooling behavior (Rosenthal and Ryan 2005). Juvenile fish were acquired from an online aquarium source (LiveAquaria.com, Rhinelander, Wisconsin, USA).

At the time of the experiments, individuals were approximately 5 cm in body length and were housed in three separate holding tanks, approximately 100 L each, with a maximum stocking density of 0.3 fish per liter. Each holding tank had a re-circulating filtration system that maintained water quality (pH, ammonia, nitrate, and nitrite levels). Although the sex of the subjects was not determined, none of the fish displayed a swollen belly at the time of the experiments, indicating that the females were homogeneous with respect to reproductive state.

The temperatures of the holding tanks were maintained at three different test values (22, 25, and 28 °C), continuously monitored through a submersible thermometer in each tank. An IceProbe IPAC-50W chiller (Nova Tec, San Rafael, California, USA) was used to maintain the 22 °C temperature, while an Aqueon Submersible Aquarium heater (Aqueon, Franklin, Wisconsin, USA) was utilized for 25 and 28 °C. Lighting was maintained in a 12 h light and 12 h dark photoperiod. Animals were fed daily at 7 pm with commercial flake food (Aqueon, Franklin, Wisconsin, USA).

A total of 90 experimentally naïve fish were tested for the study. All fish were acclimatized for at least 15 days prior to testing.

Experimental setup

Experiments were conducted in a Blazka-type water tunnel (Visser et al. 2009) to reproduce a natural stream environment. The dimensions of the experimental section of the tunnel were 90 cm × 15 cm × 15 cm in length, width, and height, respectively, as shown in Fig. 1. The experimental region was sectioned between plastic honeycomb grids. A Logitech Webcam Pro 9000 webcam (Logitech, California, USA) was placed 75 cm above the experimental section filming at 15 frames s−1. To assist in tracking, the bottom of the tank was covered with a white contact paper that enhanced the contrast of the fish with the background. A black curtain was used to isolate the apparatus during the experimental session. The tunnel was instrumented with a heater or a chiller, analogous to those used in the holding tanks, for 2 days prior to the experiment to obtain the corresponding temperature.

Fig. 1
figure 1

Experimental setup. The experimental apparatus consisted of a Blazka-type water tunnel with two plastic honeycomb grids to delineate the experimental region. An overhead web camera was used to film the fish as they swam in the flow

Procedure

Three experimental conditions corresponding to water temperatures of 22, 25, and 28 °C were considered in this study. These values were selected on the basis of the naturally occurring temperature range of this species in their geographical distribution (McClure et al. 2006; Prasad et al. 2009; Arunachalam et al. 2013). The flow rate was maintained constant, independent of the temperature, at 0.025 m/s, corresponding to approximately half-body length per second. This value allowed the experiment to continue for 15 min without any visible sign of fatigue in the subjects. Ten trials were conducted per condition, with each trial consisting of a 10-min habituation period followed by a 5-min experimental time. At the beginning of a trial, experimentally naïve fish in groups of three were transferred from the holding tank with the analogous water temperature to the water tunnel. Tests were performed between 1 and 7 pm from August to September 2013.

Multi-shape tracking

Overhead videos were processed offline using a multi-target tracking algorithm developed in MATLAB R2011a (Mathworks, Natick, Massachusetts, USA). The tracking algorithm processed the video frames to compute the two-dimensional position, velocity, orientation, and shape of each fish. The position and velocity were estimated using a linear filtering method described in (Butail et al. 2013). Briefly, a fixed background was subtracted from an image to isolate individual blobs corresponding to each fish. Fish position was measured as the center of each blob and fish velocity was estimated as the value that minimized the error between two successive frames of the same fish (Butail et al. 2013). Fish identities between frames were maintained using a global nearest-neighbor optimization method (Cox 1993) that minimized the combined distance between blob-fish pairs on an image. The resolution of occlusions, the estimation of the orientation and shape of each fish were carried out as follows.

Post background-subtraction, image blobs were filtered based on pixel size. The average fish size was estimated from 500 such blob appearances. Occluded blobs were identified as those whose size was more than two standard deviations above the average value. Once detected, a large blob was split into individual fish by fitting Gaussian mixture model with an optimization routine (Dempster et al. 1977).

If un-occluded, an ellipse was fit on the blob whose center marked the fish position, selected as the origin of the fish body frame. Fish orientation was estimated based on the observation that if the blob within the ellipse were partitioned along the minor axis, the side with more foreground pixels would be the head. The major axis of the ellipse, aligned along the fish body and positively directed towards the head, was selected as the fish orientation h. The body frame was completed by an axis normal to the orientation n in the counter-clockwise direction.

Blob pixels were transformed to the body frame (Butail and Paley 2012) using a frame transformation. Specifically, the fish centroid c was initially subtracted from each two-dimensional pixel location p on the blob to give a new pixel location \( \widehat{\boldsymbol{p}}=\boldsymbol{p}-\boldsymbol{c} \). Then, the new pixel location was projected onto the fish body frame as follows where (·)T denotes vector transposition. A quadratic curve of the form y = s 1 x + s 2 x 2 was fit to the pixel positions in the body frame using the least-squares method (Strang and Aarikka 1986), with x and y being pixel locations in the body frame. Fish shape was represented in the form of the two coefficients (s 1, s 2) of the quadratic curve in the body frame (Fig. 2). Although a quadratic curve representation sufficed for our purposes, higher dimensional representations of the fish shape may be used at the expense of computational effort (Butail and Paley 2012).

The estimates of fish position, orientation, and shape were propagated to the next frame and updated on the basis of new measurements. For an occluded blob, the same procedure of quadratic curve fitting was applied to each split portion.

Fig. 2
figure 2

Shape tracking. Two sample images with the estimated midline (white) and orientation (red arrow) of three fish are shown

Behavioral parameters and analysis

Fish behavior was measured using the trajectory data output from the tracking system. In particular, position, velocity, orientation, and shape were used to quantify social behavior and individual activity of each fish as a function of time.

Social behavior was quantified in terms of the average nearest neighbor distance (ANND) and polarization. ANND, a measure of group cohesion, was defined as the average of the planar distances between each fish and its closest neighbor (Parrish et al. 2002). Polarization, a measure of group coordination, was defined as the magnitude of the average orientation at each time step. This value ranges from 0 to 1, with 1 implying that all fish are oriented in the same direction (Pitcher 1986; Miller and Gerlai 2012). Polarization values close to zero indicate a low degree of coordination; for three fish, for example, zero polarization would imply orientations spaced 120° apart.

Fish tail-beat frequency was used to quantify individual activity. Successive frames where the fish was at least 2 cm away from the tank walls for more than 2 s were used to compute tail-beat frequency. The time series of the tail tip trajectory from the selected frame sequences was input to a Fast Fourier transform (FFT) algorithm to extract frequency information (Bracewell 1989; Duhamel and Vetterli 1990). The dominant frequency, defined as the frequency corresponding to the maximum magnitude was selected as the tail-beat frequency for that frame sequence (Supplementary information). The tail-beat frequency for a given trial was computed as the average tail-beat frequency of all fish in that trial. Finally, to measure positive rheotaxis, defined as the tendency of fish to swim against the flow, the average of the cosine of the angles between individual orientation and the flow direction was recorded. A value of 1 implied that all the fish were swimming against the flow where as a −1 implied that the fish were swimming downstream.

First, one-way multivariate ANOVA was performed to check if the combined group of four behavioral measures could be used to demonstrate a change in temperature. Then, all behavioral parameters were compared separately using a one-way analysis of variance (ANOVA) with the temperature as the independent variable and the behavioral parameter as the dependent variable. Post-hoc comparisons, wherever significance was found, were conducted using Tukey-HSD test. Linear correlations between tail-beat frequency and ANND and polarization were computed to investigate dependence between individual activity and social behaviors. The significance level was set at p < 0.05.

Results

Multivariate analysis shows that, as a group, the behavioral measures failed to differ significantly from each other at different temperatures (p  =  0.089). Group cohesion, measured by the ANND, varied significantly as a function of temperature (Table 1). Post-hoc comparisons indicate that fish were significantly less cohesive (ANND = 9.34 cm), at 28 °C than at 25 °C (ANND = 4.04 cm). Group coordination, measured by the polarization, also varied significantly as a function of the temperature, with post-hoc comparisons revealing that fish were significantly more polarized at the lowest temperature of 22 °C than at 25 °C, although the average polarization was always greater than 0.7.

Table 1 Average ± standard deviation of behavioral measures for three different temperatures (see figures in Supplementary information)

ANOVA comparisons of individual fish activity show that fish tail-beat frequency varied significantly as a function of the temperature. Post-hoc comparisons reveal that the tail-beat frequency was significantly lower from 3.4 Hz at 28 °C to 2.4 Hz at 25 °C. Positive rheotaxis was also found to be significantly affected by the temperature with post-hoc comparisons indicating that fish are significantly more aligned with the flow at 22 °C than at 25 °C. Correlation between behavioral measures indicates that only ANND was positively correlated with tail-beat frequency (r 2 = 0.23, p < 0.01; Supplementary information).

Discussion

Our results show that variations in water temperature produced a significant change in social behavioral measures, namely ANND and polarization; however, the direction of change for ANND was opposite to our predictions. In particular, fish were less cohesive at the highest testing temperature and were more polarized at the lowest testing temperature. In agreement with prior studies, temperature also significantly affected individual activity, whereby fish tail-beat frequency was the highest at the maximum testing temperature. Finally, we found that fish orientation with the flow was a function of the water temperature.

Differently from previous studies on zebrafish and guppies (Weetman et al. 1998; Pritchard et al. 2001), where it was found that fish swam closer to each other as the temperature was raised by 4 °C from 22 to 26 °C, in our experiments we found that giant danios were almost twice as far from their closest neighbor at 28 °C than at 25 °C. A contrasting aspect in our experiment is the presence of the water flow, which compared to placid water, demands a high energy expenditure from schooling behavior (Johansen et al. 2010), and was likely a determinant of the observed social response. Specifically, this response may be related to variations in oxygen concentration, similar to experiments in (Domenici et al. 2002, 2013), where a decrease in cohesion was associated with hypoxia. Therein, it was suggested that a decrease in the available oxygen, particularly for fish swimming in trailing and middle positions, could force them to swim far from each other in order to increase their oxygen intake. In this context, it is possible that fish swimming in a flow at higher temperature experience a similar shortage of available oxygen due to (a) a high energy expenditure from an increased metabolic rate (Gillooly et al. 2001) and (b) an associated decrease in oxygen levels (Kramer 1987; Ficke et al. 2007), driving the shoal members far apart (Domenici et al. 2002, 2013). With respect to ecological considerations, fish cohesion is related to the efficiency of fish to forage and detect threats (Webster et al. 2007), that is, fish forage and are able to detect predators better when they swim close to each other. Consequently, a decrease in shoal cohesion enforced by environmental changes could adversely affect feeding rates and increase predation risk.

The remarkable change in fish polarization and rheotaxis from the nominal temperature of 25 °C to either direction is possibly related to different reasons. At 22 °C, social interaction is likely to contribute to the group coordination since the fish were relatively close to each other. High polarization offers anti-predatorial advantages (Weetman et al. 1998; Miller and Gerlai 2012), and, while there was no such stimulus present in our study, we cannot discount the association with increased oxygen levels, when the fish would likely avoid the water surface, with a threat perception in our experiments (Kramer 1987). Another possible hypothesis is that mutual alignment between fish pairs is a contributing factor in the reduction of energy expenditures through hydrodynamic cues (Herskin and Steffensen 1998; Svendsen et al. 2003; Killen et al. 2012; Marras and Domenici 2013). In particular, it is possible that at the lower temperature of 22 °C, an accompanied decrease in the metabolic rate (Gillooly et al. 2001) causes the fish to swim closer to each other and align their bodies to reduce their swimming cost. Conversely, at 28 °C, when the fish are not as close to each other, rheotaxis (Keenleyside and Hoar 1954; Montgomery et al. 1997; Suli et al. 2012) is probably the main reason for the observed high polarization. The low rheotaxis values at 25 °C are in agreement with another study where flow speeds of 3 cm/s were used to investigate the effect of sensory deprivation on rheotactic behavior (Bak-Coleman et al. 2013). At higher temperatures, fish may rheotact more so that they can increase their oxygen intake to spend less energy by aligning themselves against the water flow.

Fish activity measured in terms of tail-beat frequency varied with the temperature, with a significantly higher tail-beat frequency at the highest testing temperature of 28 °C. The observed change in activity as a function of temperature is in agreement with previous studies on groups of fish (Weetman et al. 1998; Clarke and Johnston 1999; Peck et al. 2006), although experiments with single fish in a water tunnel indicate that temperature plays a secondary role on the tail-beat frequency, which is instead modulated by the flow speed (Rome and Alexander 1990). The higher tail-beat frequency observed at 28 °C suggests that fish spend more energy (Herskin and Steffensen 1998; Steinhausen et al. 2005), possibly due to higher metabolic rates (Gillooly et al. 2001). These results have a direct implication on fish biology from environmental changes that cause an increase in temperature (Williamson et al. 2008). For example, in-situ observations have revealed that higher activity may cause imbalances in fish energy budgeting, in which lower rates of net energy are available for growth and reproduction (Rennie et al. 2005). Further experiments are required on an evolutionary time-scale to investigate whether changes in activity due to temperature can influence the species as a whole.

A positive correlation between individual activity and social behavior was also found in our results. In particular, fish cohesion (ANND) decreased (increased) with tail-beat frequency, indicating that as fish become more active they tend to stay apart. However, the causal relationship between these two behaviors may not be uniform through the entire range of temperatures. As discussed before, at high temperatures it is likely that activity and cohesion are independently regulated, due to an increase in metabolic rates and decrease in oxygen levels, respectively. Instead, at lower temperatures, social behavior may affect individual activity through hydrodynamic cues (Herskin and Steffensen 1998; Svendsen et al. 2003; Killen et al. 2012; Marras and Domenici 2013), whereby trailing fish that are able to utilize hydrodynamic cues at 22 and 25 °C display lower tail-beat frequencies.

Among the several parameters driving the global climate change, temperature is considered the most important (Cossins and Bowler 1987). We found that a moderate change of 3 °C in temperature is responsible for a remarkable variation of both social behavior and individual activity of giant danios. While the temperature variation considered here is compatible with diurnal and seasonal changes in the natural habitats of giant danios (McClure et al. 2006), our results indicate that it differentially influences fish cohesion, polarization, tail beat frequency, and rheotaxis. Analyses of these results indicate that a complex trade-off exists between individual activity and social behavior, which may depend on several factors, such as hydrodynamic cues and oxygen levels.