Computational protocol: Strain differences in the collective behaviour of zebrafish (Danio rerio) in heterogeneous environment

Similar protocols

Protocol publication

[…] The methodology based on massive data gathering [] has now become standard in studies on animal collective behaviour with flies, Drosophila melanogaster [,], birds, Sturnus vulgaris [–] and fish, Notemigonus crysoleucas []. The experiments with cylinders were recorded at 15 fps and tracked online by a custom-made tracking system based on blob detection. We call a batch a group of 10 experiments. For these batchs, each experiment consists of 540 000 positions (10 zebrafish×54 000 frames) and 270 000 positions (5 zebrafish×54 000 frames). For experiments with discs, we faced tracking troubles. Since the fish below the floating discs were difficult to distinguish by the program due to a lack of sufficient contrast, experiments with floating disc were tracked offline by two custom Matlab scripts. A first script automatically identifies the positions of the fish swimming outside of the floating discs by blob detection. Since this method did not allow a perfect detection of all the individuals, we developed a second script that was run after the first one and that plotted the frame where a fish (or more) was undetected for the user to manually identify the missing individual(s). It allowed us to identify the fish that were partially hidden during a collision/superposition with another fish or the fish that were situated under the floating discs. Since this analysis tool is time-costly, we only analysed 1 fps for all experiments with discs. For these batchs, each experiment consists of 36 000 positions (10 zebrafish×3600 positions).Since our tracking system did not solve collision with accuracy, we did not calculate individual measurements but characterized the aggregation level of the group. The probability of the presence of the fish was calculated by the cumulated positions of all individuals along the entire experiment. We also calculated the distance between each individual fish and the attractive landmarks (and averaged it) as well as the interindividual distances between the fish and the average interindividual distance. Finally, we computed the time of shelter occupancy as the time that is spent by the fish at less than 25 cm from the attractive landmarks. These time sequences were calculated according to the number of fish present near the landmarks. All scripts were coded in Python using scientific and statistic libraries (numpy, pylab, scilab and matplotlib).To compute the number of majority events, the number of fish was averaged over the 15 frames of every second. This operation guarantees that a majority event is ended by the departure of a fish and not by an error of detection during one frame by the tracking system. Electronic supplementary material, figures S9 and S10 show the proportions of the durations of the majority events before and after this interpolation. […]

Pipeline specifications

Software tools Numpy, matplotlib
Application Miscellaneous
Organisms Danio rerio