Welfare Challenges Influence the Complexity of Movement: Fractal Analysis of Behaviour in Zebrafish

The ability to assess welfare is an important refinement that will ensure the good condition of animals used in experimentation. The present study investigated the impact of invasive procedures on the patterns of movement of zebrafish (Danio rerio). Recordings were made before and after fin clipping, PIT tagging and a standard pain test and these were compared with control and sham handled zebrafish. The fractal dimension (FD) from the 3D trajectories was calculated to determine the effect of these treatments on the complexity of movement patterns. While the FD of zebrafish trajectories did not differ over time in either the control or sham group, the FDs of the treatment groups reduced in complexity. The FD of fish injected with different strengths of acetic acid declined in a dose-dependent manner allowing us to develop an arbitrary scale of severity of the treatments. The 3D trajectory plots from some groups indicated the presence of repetitive swimming patterns akin to stereotypical movements. When administered with lidocaine, which has analgesic properties, the movement complexity of fin clipped fish reverted to a pattern that resembled that of control fish. Fractal analysis of zebrafish locomotion could potentially be adopted as a tool for fish welfare assessment.


Introduction
The ability to monitor the welfare of experimental animals is a crucial refinement that can inform scientists of the severity of procedures. Here, we define animal welfare as the state of the individual as it attempts to cope with the environment [1,2]. However, determining an animal's welfare state is extremely difficult because animals cannot verbalise their internal experiences to experimenters. Instead scientists have to use indirect measures such as changes in behaviour and physiology to assess whether an animal's welfare has been compromised [3][4][5][6]. While there has been considerable work on assessing markers of rodent welfare [7,8] there has been relatively less research on fish. Currently fish are one of the most popular species used in experimentation, second only to mice, with approximately half a million individuals used in UK experiments in 2017 [9]. Zebrafish (Danio rerio) have become an important experimental model organism owing to the detailed genetic information available, the high genetic homology of zebrafish to humans, their relatively low cost, short generation time and easy maintenance and handling amongst other attributes [10][11][12]. Despite their popularity, the assessment and monitoring of zebrafish welfare during invasive experimentation is far behind that of rodents [13], thus, finding a means of accurately gauging the health status of fish would enhance the wellbeing of a large number of experimental animals.
Although the capacity of fish to perceive pain has been questioned [14,15] there is a steady accumulation of experimental evidence that fish meet the criteria for animal pain [5]. Fish possess nociceptors, the receptors required to detect pain-causing stimuli [16][17][18][19] as well as altered activity in brain areas that are activated at a molecular, physiological and functional level in response to pain [20][21][22]. Fish also show prolonged adverse changes in their behaviour and physiology in response to a noxious stimulus [23][24][25][26][27] that are ameliorated by providing analgesia [28][29][30][31]. For example, zebrafish injected subcutaneously in the lips with a noxious substance (acetic acid) showed a concomitant decrease in activity and dramatic increase in ventilation rate [25]. This evidence highlights the importance of detecting and characterising detrimental changes in the welfare of fish used in research, especially when commonly used procedures such as fin clip result in the damage of tissue containing nociceptors [26]. In order to characterise welfare changes from behaviour, a method for quantifying and comparing complex behavioural patterns in a broad, high-level but compressed manner is required.
Since animals continually evaluate their constantly changing environments and re-adjust their priorities accordingly through real-time actions, their natural movement trajectories are complex and stochastic rather than deterministic since three dimensions are available for flying/swimming. Conventional methods, for example Euclidian geometry, may describe the complex trajectories with high accuracy but in a highly complex manner [32][33][34]. If a reasonably accurate specification of a trajectory is required, machine learning methods may model or generate autonomous trajectories to a high degree of approximation, for example evolutionary computation [35], phase transition networks [36], Markov models [37] and support vector machines [38] among others. However, these methods retain some complexity and are therefore not usually easily directly deployable as comparative measures of complexity. Fractal dimension (FD) [39], Principal Component Analysis (PCA) [40] and Chromatic Analysis [41] are some of the techniques that assist with substantially reducing the dimensionality (complexity) of models and data. In the case of PCA and Chromatic Analysis, generally two, three or more parameters are identified to explain the main features of the behaviour. FD abstracts a single dimension from a data pattern in order to characterise its complexity in a single parameter, which may be used as a coarse, highly compressed measure of complexity for comparative purposes, at the expense of broad over-simplification of some of the detail of rich and diverse patterns that machine learning methods can capture. It is thereby considered to be a potentially suitable indicator for these purposes.
Fractal analysis can reveal patterns previously undetected by standard analysis of frequency/duration. It was originally developed to analyse geometric complexity using the concept of scaling [39] but has since been applied to the measurement of the temporal and spatial complexity of biological structures or systems [42,43]. Medicine in particular has benefited from using this approach, extracting 'hidden information' from physiological time series data, identifying for example, changing complexities in heart rate as a response to age and disease in humans where standard analysis revealed little detail [42]. Fractal analysis has also been applied in animal welfare studies to demonstrate a reduction in behavioural complexity linked to parasitic infection and pregnancy in Spanish ibex (Capra pyrenaica) [44], impaired health, ageing and low dominance status in Japanese macaques (Macaca fuscata yakui) [45], sickness in chimpanzees (Pan troglodytes schweinfurthii) [46,47], exposure to toxicants in fish and shrimps [48][49][50], welfare of marine diving mammals [51] and stress in dolphins (Tursiops aduncus) [52]. Surprisingly in most of these studies, standard behavioural approaches revealed little difference between treatments.
The aim of this study was to determine whether fractal analysis could reveal changes in female zebrafish behaviour in response to a series of potentially painful procedures. Different modes of pain elicit differing behavioural responses. For example, zebrafish administered with a potentially painful stimulus to the lip area did not show tail wafting which is observed during the same stimulus administered near to the tail fin (caudal peduncle) or after fin clipping [25,29,53]. Therefore, it is vital to assess more than one mode of pain in the present study. Previous work in mammalian species has highlighted a reduction in behavioural complexity as a result of stress/impaired health with speculation that behavioural complexity might correlate with states of increased allostatic load [46,48,52] or with pain and pre-pathological stress states [43,54,55]. The utility of fractal analysis to characterise the behavioural response of zebrafish to stress and to potentially painful stimuli could provide a useful tool for welfare assessment of laboratory fish. We hypothesized that potentially painful interventions in female zebrafish will also result in a reduction in behavioural complexity and that administering a pain-relieving drug would ameliorate these effects.

Results
There was a significant interaction between treatment group and time (F 28,192 = 2.757, p < 0.05; Figure 1) indicating that the type of treatment had a differential effect on the resulting zebrafish fractal dimension over time. The effect of both treatment and time on zebrafish FD was then investigated as discussed below.

Effect of Treatment
Initially all fish had similar FD properties pre-treatment with no significant differences between any of the treatment groups (F 7,48 = 0.794, p = 0.596; Figure 1) demonstrating lidocaine did not affect FD prior to fin clipping. However, after treatment there were changes in complexity at the 1 h (F 7,48 = 4.388; p < 0.05; Figure 1), 2 h (F 7,48 = 9.780; p ≤ 0.001; Figure 1), 3 h (F 7,48 = 8.091, p ≤ 0.001; Figure 1) and 6 h (F 7,48 = 7.145, p < 0.05; Figure 1) time points. Post hoc analysis revealed that control fish had more complex trajectories than the fin clip group at 2, 3 and 6 h (p < 0.05), the PIT tag group at 1, 2 and 3 h (p < 0.05), the 1% acid at 3h (p < 0.05), the 5% acid at 2 and 3 h (p < 0.05) and the 10% acid group at 1, 2, 3 and 6 h (p < 0.05). The effect of stress in the sham handled group did not result in FD that differed from controls but did result in much higher FD values than the PIT group at 1 and 2 h (p < 0.05), the fin clip group at 2, 3 and 6 h (p < 0.05), the 5% acid group at 2 h (p < 0.05) and the 10% acid group at 1, 2, 3 and 6 h (p < 0.05). The administration of lidocaine appeared to ameliorate the fin clip as the FD values in this group did not differ from controls (p > 0.05) but did differ from the fin clip group at 2 and 6 h (p < 0.05), the PIT tag group at 1 and 2 h (p <0.05) and the 10% acid group at 1, 2, 3 and 6 h (p < 0.05). A visual analysis of 3D trajectory plots generated by treatment groups with high FD values (control fish) versus low FD values (Fin clip, PIT tag etc.) appeared distinctly different with 3D plots from fish with lower FD values indicating repetitive movement patterns ( Figure 2).

Hypothetical Scale of Severity
The range of values associated with each treatment appeared to occupy a sliding scale with control (1.08-1.15; Figure 3) and 10% acid lip (0.83-0.97; Figure 3) occupying opposite ends of the spectrum while the rest of the treatments (Lidocaine 1.06-1.12; Sham handled 1.04-1.11; 1% Acid 0.96-1.09; PIT tag 0.94-1.05; 5% Acid 1.03-0.95 and Fin clip 1.02-0.9; Figure 3) overlapped each other across the range of the spectrum. The clustering of FD scores for each treatment combined with the observed decrease in FD as the percentage of acetic acid increased led to the tentative development of a potential scale of severity ranging from Normal (Control); Stress (Sham); to Mild to Severe Pain linked to FD scores from the painfully treated groups ( Figure 3).

Discussion
Fractal analysis of the locomotory behaviour of female laboratory zebrafish subject to two laboratory procedures and a validated pain test was found to differentiate undisturbed fish from those subject to potentially painful procedures. The reduction in the complexity of the fish trajectories observed in this study signified a profound change in behaviour after a noxious event. While the trajectory complexity of control and sham handled fish remained relatively constant over the duration of the experiment, a significant reduction in complexity was noted across the pain groups. The decrease in movement complexity associated with the potentially painful interventions used in this study is similar to that observed in mammalian studies where acute stressors resulted in significant reductions in behavioural complexity [43,48,56]. This is also consistent in studies on pain in rainbow trout [23,28] and zebrafish [25,29,31,53] where the amount of swimming activity was reduced. Relatively lower behavioural complexity has been suggested to be an indicator of stereotypical behaviour [57]. Stereotypies are repetitive behaviours with no obvious function but may be linked to a sign that the animal is trying to cope with the current welfare challenging situation [58] or is in a state of distress [59]. In the present study the 3D trajectory plots of individuals with the greatest reduction in complexity showed repetitive swimming patterns. The presence of stereotypical behaviours in other species may indicate poor welfare [60] which can result from the application of a noxious stimuli [61].
An important property of a system used to identify changes in animal welfare is its ability to detect changes in behaviour that are proportional to the intensity of the applied stimulus. In this study the FD value of female zebrafish trajectories declined at a rate that scaled with the

Discussion
Fractal analysis of the locomotory behaviour of female laboratory zebrafish subject to two laboratory procedures and a validated pain test was found to differentiate undisturbed fish from those subject to potentially painful procedures. The reduction in the complexity of the fish trajectories observed in this study signified a profound change in behaviour after a noxious event. While the trajectory complexity of control and sham handled fish remained relatively constant over the duration of the experiment, a significant reduction in complexity was noted across the pain groups. The decrease in movement complexity associated with the potentially painful interventions used in this study is similar to that observed in mammalian studies where acute stressors resulted in significant reductions in behavioural complexity [43,48,56]. This is also consistent in studies on pain in rainbow trout [23,28] and zebrafish [25,29,31,53] where the amount of swimming activity was reduced. Relatively lower behavioural complexity has been suggested to be an indicator of stereotypical behaviour [57]. Stereotypies are repetitive behaviours with no obvious function but may be linked to a sign that the animal is trying to cope with the current welfare challenging situation [58] or is in a state of distress [59]. In the present study the 3D trajectory plots of individuals with the greatest reduction in complexity showed repetitive swimming patterns. The presence of stereotypical behaviours in other species may indicate poor welfare [60] which can result from the application of a noxious stimuli [61].
An important property of a system used to identify changes in animal welfare is its ability to detect changes in behaviour that are proportional to the intensity of the applied stimulus. In this study the FD value of female zebrafish trajectories declined at a rate that scaled with the concentration of acetic acid. A previous study conducted in our laboratory [62] explored the effect of these same noxious interventions on more traditional behavioural measures including average speed (cm/s), percentage time spent in the bottom of the tank and amount of the tank explored. In that study the behavioural response of the 1% acid group was easily distinguishable from the two higher strengths as the higher strength groups had slower average speeds and spent more time on the bottom of the tank with less exploration: the difference between the 5 and 10% acid group, however, was much harder to discern but can be seen using FD analysis here. The only behavioural difference between the two higher strengths of acid was in the amount of time individuals spent in the top half of the tank; zebrafish injected with 10% acid spent more time in the top half of the tank rather than the bottom which was the case for all other treatment groups. This behavioural measure was similar to that observed in controls but inconsistent with that observed in the other pain groups (fin clip, PIT tag insertion, 1 and 5% acid groups) where avoiding the top half of the tank, an anti-predatory behaviour or anxiety response [63], seemed fairly predictable. This failure to avoid the top half of the tank by 10% Acid fish could be due to the severity of the pain being so great that it took priority over normal anti predatory or anxiety behaviour; this phenomenon has been seen in another fish species, the rainbow trout, where subcutaneous acid injection into the lips resulted in these fish not exhibiting normal fear or anti-predator responses [23,64]. The use of standard behaviour measures, therefore, required at least two behaviours (time spent in the bottom half of the tank and either average speed or percentage of tank explored) to identify a meaningful difference between the 5 and 10% acid groups [62] while here fractal analysis was able to differentiate the two groups with just one value. Current definitions of animal pain suggest animals may respond by altering their behaviour and when animals reduce activity this may be an attempt to conserve energy to divert to the healing process but may also be similar to guarding behaviour where reduced use of a limb or area prevents further damage and pain [5]. Reduced activity is observed in mammalian responses to pain and thus the data presented here and in other studies using trout and zebrafish [23,30,31,62] suggests this response is evolutionarily conserved and underlies mechanisms to recover from injury. In the laboratory context prolonged changes in behaviour could potentially confound experimental studies [65] whereas in a natural setting abnormal behaviours may alter the risk of being detected by predators [23].
The scaled decrease in movement complexity in relation to different strengths of acetic acid allowed the development of a provisional scale of severity that we then used to attempt to gauge the intensity of other commonly practiced procedures. Both the fin clip and PIT tag resulted in a reduction in complexity that fell between that observed for the 5 and 10% acid groups suggesting that these procedures are significantly painful. The changes in behaviour associated with these procedures, however, could also be due to the physical changes of the body that accompany these interventions. The impact of administering lidocaine which acts as a local anaesthetic with analgesic properties makes this explanation unlikely since fin clipped fish behaviour returned to normal when lidocaine was subsequently applied; their FD was not significantly different from control or sham handled zebrafish and did not differ over time. It is worth considering that lidocaine could have impacted normal behaviour although adverse behavioural reactions to this drug were not observed during the pre-treatment time point. Indeed, a study using lidocaine as an immersive agent in zebrafish demonstrated there were no side-effects when administering lidocaine alone [29].
The addition of extra weight via the implantation of a PIT tag appeared to have the least impact on swimming performance with several studies reporting no negative effects across a range of species on critical swimming velocity [65][66][67][68]; a measure of the swimming velocity at which maximum oxygen uptake occurs [69]. Although similar studies have not been conducted in zebrafish, the PIT tags used in this study equated to approximately 2% of the individual's bodyweight. This is much less than the tags (6-12% bodyweight) used in a study on chinook salmon (Oncorhynchus tshawytscha) which found no detrimental effects on swimming performance [66]. Measurements taken within our laboratory also suggest that female zebrafish can routinely carry eggs equalling 5+% of their bodyweight making it unlikely that PIT tag insertion in this study affected swimming performance. The reduction in behavioural complexity over the 6 h period, therefore, is likely to result from the tissue damage that accompanies this procedure. The potential for this procedure to be painful is also validated by another study from within our laboratory where the standard behavioural measurements (average speed, percentage tank explored and percentage time spent in the bottom half of the tank) of PIT tagged fish diverted from control behaviour to a similar degree to that observed in the 5% acid group across the 6 h experiment [62]. Previous studies have noted that in some species tagging is associated with infections, reduced feeding and increased mortality [67,68]. The immediate physiological response to the implantation of acoustic tags in carp and roach (Rutilus rutilus) led to an increase in cortisol concentrations with peak cortisol levels occurring between 2 and 10 h post-tagging [70]. Although the response to tagging appears to be species and tag specific [68] several studies have indicated the potential for tag implantation to induce an acute stress response and lead to mortality although no mortality was seen in the present study; the reduction in movement complexity noted in this study would certainly suggest that the procedure is having a detrimental effect on behaviour. While little has been done to address the potential for this procedure to cause pain, it is possible that the implantation of PIT tags in the short term results in damage to the musculature of the body wall leading to abdominal discomfort.
Tail or caudal fin clipping does have the potential to impede swimming ability when tested in other species [71,72]. Comparisons between wild type and no-tail zebrafish indicated the absence of a caudal fin could result in a 65% reduction in critical swimming performance [73]. This is an important consideration as a reduction in the ability to swim efficiently could be responsible for changes in more traditional behavioural measures such as locomotor activity, rather than being due to behaviours associated with an animal undergoing a painful treatment. One of the benefits of measuring movement or FD complexity, however, is that it is largely independent of behaviours related to swimming performance and instead describes how the fish chooses to explore the area [43,74] thereby possibly offering an insight into the subjective experience of the individual. Even if these procedures reduced critical swimming velocity, this should not dictate an effect on complexity. To control for the effect of any physical modifications on movement complexity we included a treatment group providing fin clipped fish with lidocaine. The lidocaine appeared to ameliorate the behavioural effects of the fin clip in that movement complexity was restored to those seen in control fish. The analgesic properties of lidocaine have previously been demonstrated in trout, where the behavioural and physiological symptoms associated with the injection of acetic acid were greatly reduced [28] and in fin clipped zebrafish [29]. The ability of lidocaine to diminish the impact of the fin clip in this study is evidence that the reduction in behavioural complexity was not due to the physical change accompanying the removal of the fin but instead part of a complex behavioural reaction to painful tissue damage. This was mirrored in our previous studies where the fin clip elicited reductions in average speed, tank exploration and time spent in the bottom half of the tank [29,62]; these changes in behaviour were greatly ameliorated via the addition of lidocaine and other analgesics highlighting both the success of lidocaine as an analgesic as well as the ability of FD analysis to accurately describe the welfare status of zebrafish.
The potential for the fin clip to be painful is considerable as studies have demonstrated the presence of nociceptors within the tail fin of the common carp (Cyprinus carpio) [26]. Nociceptors are sensory neurons that are preferentially stimulated by noxious stimuli. The properties of nociceptors in fish have been well documented with their physiology being identical to that of mammalian nociceptors [18,75]. The nociceptors found in the tail fin of carp consisted of C-fibres and A-δ fibres at a similar abundance to those found in the trigeminal nerve in trout [26,75]. The removal of a considerable section of tail fin is therefore likely to excite these receptors while exposing them to the environment. As well as the identification of nociceptors, Roques et al. [26] also observed a distinct change in the behaviour and physiology of fin clipped Nile tilapia (Oreochromis niloticus), with individuals showing higher swimming activity while spending more time in the light than controls over the 6 h duration of the experiment. The fin clip procedure in the present study also caused a distinct change in behaviour relative to control and sham handled zebrafish with a reduction in movement complexity also lasting for the 6 h observation period.
Zebrafish are a gregarious species and are often held in groups. Studies have demonstrated that group housed zebrafish recover more quickly from fin clipping than those held individually [76] and that fear responses are reduced when zebrafish have olfactory and more importantly visual cues of conspecifics [77,78]. This phenomenon is termed social buffering where social support assists in reducing responses to threatening stimuli or events and appears evolutionarily conserved from fish to mammals [77,78]. Thus, it is conceivable that if we repeated these experiments in group housed zebrafish we may see a lesser or no change in the complexity of movement. However, we chose to test individual zebrafish as this is more relevant to the laboratory context. Zebrafish are held individually after invasive procedures to allow recovery and promote healing (e.g., cardiac surgery [79], optic nerve crush [80] and spinal lesions [81]) or to allow genotyping from fin clips [29]. Further, the 3D tracking of groups of animals whilst maintaining individual identity is not currently possible as demonstrated in the present study for individual behavioural tracking. More importantly, it would be very difficult to understand the complexities of the group response if we did not first understand the changes in an individual so we propose this is a stepping stone for future studies which should investigate this phenomenon in groups of zebrafish when technology allows.
The differential response of female zebrafish to the treatments in this study, indicate the ability of some interventions to have a greater impact on behavioural complexity than others; fin clip and 10% acetic acid interventions for example, exhibited much lower FD values relative to controls over time compared to the sham handled or 1% acid lip groups. Identifying the range of values associated with each intervention in this study allowed the tentative construction of a hypothetical FD based welfare scale by which the severity of new interventions could be measured. In this present study there is a clear gap between the ranges of values associated with control fish (1.08-1.15) versus those associated with fin clip (1.02-0.9) and 10% acid lip (0.94-0.83). From this it could be argued that values close to and above 1.15 indicate excellent welfare and those close to and below 0.9 indicate negative welfare. Sham handled fish occupied a range of values from 1.04-1.11 potentially indicating a part of the scale that might describe the stress of handling and anaesthesia. The range of values associated with the 1% acid lip (0.96-1.09) group occupy the middle of the scale slightly encroaching on to the range of control, PIT and fin clipped fish indicating a more mild to moderate impact on zebrafish welfare. From this scale it could be argued that in terms of the severity of procedure, 10% Acid Lip > Fin clip > PIT > 5% Acid Lip > 1% Acid lip>Sham handled. Future work could refine and add clarity to the scale through the testing of a wider range of procedures and could provide a means of assessing actual severity of a variety of invasive experiments including non-painful treatments that may cause stress or distress. It would also be vital to extend this work to male zebrafish and to other strains where it is possible behavioural responses may differ from AB females.

Subjects and Husbandry
Eight month old female zebrafish (D. rerio) (n = 56; mean size 0.83 g ± 0.04) of AB strain were randomly selected from the University of Liverpool aquarium in-house breeding project: Stock fish were maintained in a semi-closed recirculation system in 10 L tanks at 28 ± 1 • C, with constant aeration on a 14:10 h light: dark cycle. The use of females removed the confounding factor of sex. Fish were selected at random, netted carefully into a 3L tank and transferred individually to a semi-closed recirculation system consisting of two parallel rows of nine glass tanks (20 × 30 × 20 cm; n = 1 fish per tank) each fitted with an identical, external laminated printout of a green plant background. The background acted as a green screen enabling the behavioural tracking system [82] to accurately differentiate between the focal fish and the background. All tanks were supplied with filtered water (pH 7.2, NH 3 ≤ 0.01 mg/L, NO 2 ≤ 0.01 mg/L, NO 3 ≤ 5 mg/L) maintained at a constant temperature of 28 ± 1 • C, under a 14:10 light: dark regime with aeration provided by an aerated, fluidised 200 L biological filter. Fish were acclimatised in their experimental tank for two weeks prior to experimentation and fed twice daily ad libitum with a commercial tropical ornamental flake (TetraMin, Tetra, Melle, Germany). Fish were only used in experiments if they fed readily when food was presented for at least seven days. Fish were in chemical (through shared water) and visual contact with adjacent tanks so they had social contact until the evening prior to experimentation when two opaque pieces of plastic were placed in between tanks to visually isolate the test individuals.

Treatment Groups
The effect of several potentially painful procedures on the behaviour of zebrafish was tested against control (undisturbed), sham handled (anaesthetised and handled in a similar manner and time frame but no treatment) plus a further group that had a fin clip but were administered with lidocaine (5 mg/L dissolved in the tank water) which prevented the behavioural changes associated with fin clipping in a previous study on zebrafish [29]. Fish were randomly assigned to one of the eight treatment groups (n = 7 for each group): Control; sham handled; five noxiously-stimulated groups (1-3. Injected subcutaneously with either 1, 5 or 10% acetic acid into the lips; 4. PIT tag injection through the abdomen; and 5. fin clip where 40% of the caudal fin was removed as described in The Zebrafish Handbook (http://zfin.org/zf_info/zfbook/chapt7/7.8.html).); and an Analgesic group subject to fin clip administered with lidocaine, a local anaesthetic with pain-relieving properties (5 mg/L Sigma-Aldrich Co., Dorset, UK). Only the fin clip group were tested with lidocaine to keep sample sizes to a minimum and previous studies have demonstrated drugs with analgesic properties prevent behavioural changes in response to acetic acid [27,30,31,53,83]. Control fish were left undisturbed for the duration of the experiment; all other treatment fish were carefully netted and transferred to a 1 L beaker containing 500 mL of aerated water dosed with benzocaine (0.033 g L −1 ; Sigma-Aldrich Co., Dorset, UK) where fish were anaesthetised to deep plane anaesthesia so they were unconscious during the procedure. Benzocaine was used as it has short lasting analgesic properties [84]. After anaesthesia the sham treatment group were handled similarly but without any invasive treatment applied. During anaesthesia the Acid groups were injected subcutaneously into the frontal lips using 2 µL per lip with either 1, 5 or 10% acetic acid using a sterile gastight syringe and needle (34 g; Hamilton; Bonaduz, Switzerland). PIT tag treatment fish were orientated upside down and a sterile 20 gauge needle used to inject a 4 mm PIT tag into the abdomen (Loligo systems, Viborg, Denmark). All fish were returned to their home tank after the intervention and allowed to recover from the anaesthesia where video recordings began 1 h afterwards; no mortalities occurred in response to any of the above treatments.

Data Collection
Fish movements were captured on video for 25 min periods, five times throughout the experiment at the following time points; 40 min pre-treatment, 1, 2, 3 and 6 h after treatment. These time points were chosen as fish subject to noxious stimulation usually show an initial adverse response up until 3 h then recovery by six hours in acetic acid tests [23,25]. Fish were tracked using two industrial IDS USB 3.0 colour video cameras (IDS; Obersulm, Germany) fitted with a 25 mm monofocal lens and connected to a computer (HP compact elite 8300; Palo Alto, CA, USA) running tracking software developed at the University of Liverpool [82]. Cameras positioned dorsally and laterally to the focal tank were used to track the 3D trajectories of fish. Cameras positioned above the tanks were mounted on a sliding gantry 1.4 m above the two parallel rows of nine tanks; this enabled the cameras to be moved from tank to tank without disturbing the fish. Cameras positioned laterally were attached to tripods 1.4 m away from the focal tanks and were manually moved between tanks although only one tank on each side was recorded each day with cameras moved the previous evening. Treatments were randomised to prevent order effects. Data files generated by the 3D tracking software written in MATLAB were used to analyse the fractal dimension of fish trajectories. The tracking software was validated through blind comparisons with a human observer comparing the scores percentage (%) time spent in different zones of the tank and % time spent inactive (8 videos tested with 100% accuracy). The pre-treatment behavioural recordings were carried out at the same time each day (commencing at 10:00 a.m. GMT), to minimise any effect of diurnal fluctuations on behaviour. Inflow to all tanks was turned off at 9:30 a.m. GMT to isolate each tank chemically and in the Analgesia group the lidocaine was added at this time to allow uptake and to ensure lidocaine in itself did not affect pre-treatment behaviour.

Fractal Dimension
Fractal dimensions (FDs) were obtained for the fish in order to characterise, in a single parameter, various aspects of their behaviours during each 25 min period under study (see Supplementary  Information for raw data). The basic procedure for obtaining an FD followed that of Nimkerdphol and Nakagawa [33,85]. An FD may be obtained from a variety of source data, for example location or distance. In this case, three FDs, FD (x, y, z), were obtained from the location of a fish in the tank along each of the x, y and z dimensions and an average composite FD was calculated for the three dimensions FDx, FDy, FDz taken together. The procedure for ascertaining the fractal dimension for a period consisted of obtaining discrete Fourier transforms of the x, y and z vectors computed with the fast Fourier transform (FFT) [86] using the first 17 min (8192 location samples) out of the 25 min recording period (the number of samples in the FFT needs to be a power of 2. With the sampling rate used, 17 min = 8192 samples). A Fourier transform is usefully applied to signals in order to obtain a different view of them which can give additional information. Often, the transform converts the signal from one domain (e.g., time) to another (e.g., frequency). For example, a sound signal may be graphically represented as the amplitudes of the sampled signal on the y-axis with the x-axis as the time domain. In the case of the FD in the present study, application of the FFT in effect transforms the domain from being the absolute location coordinate of the fish in time to the domain of relative change in location coordinate. Figure 4 shows an example of the x-coordinate dimensions and the FFTs thereof for a Control fish and a Fin Clip fish 2 h after treatment. the Analgesia group the lidocaine was added at this time to allow uptake and to ensure lidocaine in itself did not affect pre-treatment behaviour.

Fractal Dimension
Fractal dimensions (FDs) were obtained for the fish in order to characterise, in a single parameter, various aspects of their behaviours during each 25 min period under study. The basic procedure for obtaining an FD followed that of Nimkerdphol and Nakagawa [33,85]. An FD may be obtained from a variety of source data, for example location or distance. In this case, three FDs, FD (x, y, z), were obtained from the location of a fish in the tank along each of the x, y and z dimensions and an average composite FD was calculated for the three dimensions FDx, FDy, FDz taken together. The procedure for ascertaining the fractal dimension for a period consisted of obtaining discrete Fourier transforms of the x, y and z vectors computed with the fast Fourier transform (FFT) [86] using the first 17 min (8192 location samples) out of the 25 min recording period (the number of samples in the FFT needs to be a power of 2. With the sampling rate used, 17 min = 8192 samples). A Fourier transform is usefully applied to signals in order to obtain a different view of them which can give additional information. Often, the transform converts the signal from one domain (e.g., time) to another (e.g., frequency). For example, a sound signal may be graphically represented as the amplitudes of the sampled signal on the y-axis with the x-axis as the time domain. In the case of the FD in the present study, application of the FFT in effect transforms the domain from being the absolute location coordinate of the fish in time to the domain of relative change in location coordinate. Figure 4 shows an example of the x-coordinate dimensions and the FFTs thereof for a Control fish and a Fin Clip fish 2 h after treatment.   show the x-coordinates of a control fish (C2) and a fin-clip fish (FC2) in their tank 2 h after intervention, indicating that C2 is much more active as compared with FC2 in both the extent of the trajectories across the tank within x = 13 to x = 206 and the frequency of them, whereby the maximum trajectories by FC2 are within x = 49 to x = 171 and are fewer in frequency. The gradient of the plot of an FFT of a variable (here the x-dimension) gives an indication of the complexity of the variable (here, activity in that dimension) and indicates the FD. For example, a static fish has a flat, constant trace across the samples (i.e., a straight line in Figure 4a or b and a corresponding FFT gradient (FD) of~0. A fish that swims half way across the tank and back would have FD~0.5, one that swims fully across,~0.92 and one that swims two full round trips across and back, FD~0.94. The FDs of C2 and FC2 in Figure 4c,d are 1.17 and 0.93 respectively, indicating that the complexity (FD) of the control fish activity by location is substantially higher than that of the fin clip fish.

Statistical Analysis
Data were analysed using SPSS software 21. The fractal dimension data was normally distributed for all interventions as assessed by Shapiro-Wilk's test (p > 0.05), displayed homogeneity of variance as assessed by Levene's test (p > 0.05) and did not violate sphericity (p > 0.05). An interaction between time and treatment was first tested on the FD via a mixed model ANOVA which also analysed the impact of treatment group and time separately followed by post hoc Tukey tests to determine where differences lay. A FD scale describing the welfare state of zebrafish was constructed using the range of FD values for each treatment group. The range of FD values for each treatment group was calculated using the means of the top and bottom third of all FD values post intervention. A hypothetical scale of severity was created based upon the FD calculations.

Ethics Note
Experiments were conducted with approval from the Home Office, U.K. (licence no. 40/3534) and the University of Liverpool's Ethics committee. At the end of the experiment, fish were euthanized using a schedule 1 method (concussion followed by pithing) and tissue harvested for use in other studies. All fish were treated humanely and care taken when carrying out the treatments. As different modes of pain elicit different behavioural responses it was vital we tested more than one type of painful stimulus. The treatments were chosen as they represent either a standard pain test, such as the acetic acid groups [23,27,31] or they are routinely used for identification purposes such as the fin clip [87,88] and PIT tagging [67]; thus knowledge of the severity of these procedures would be useful in refining procedures and applicable to other laboratories using these methods. The PIT tags used weighed 0.020 g equating to around 2% of the bodyweight of the individuals used in this study which is below the threshold weight of tags known to affect swimming performance [66]. Although there is evidence that benzocaine may be more aversive than other anaesthetics [89], benzocaine also acts as a local anaesthetic and so provides a period of short-term pain relief pre-operatively thus being the more ethical choice of anaesthetic during these painful treatments. The sham treated group controls for any stress associated with handling and anaesthesia. We did not perform any sham injections of non-painful saline since previous studies demonstrate there are no differences between control and sham injected fish [19,31,53,83].

Conclusions
The results from this study demonstrate the ability of fractal analysis to identify differences in behaviour that scale with the intensity of the administered noxious procedure thus highlighting its potential to reveal insights into the welfare status of zebrafish. This ability to differentiate between different strengths of acid appeared to give it a better resolution than the more traditional behavioural scores. Significant reductions in movement complexity were observed in most pain groups relative to controls and sham handled fish, which is consistent with what has been observed in mammals experiencing high levels of acute stress [43,44,52]. The greatest reductions in complexity were observed in the 10% acid lip and fin clip groups highlighting the possibility that these interventions may be more intense while the provision of lidocaine ameliorated the impact of the fin clip further highlighting the likelihood that these routine procedures are indeed painful. This data, therefore, demonstrates these procedures should be accompanied by the provision of analgesia and here we can recommend the use of 5 mg/L lidocaine based on the present study. Currently, procedures which result in acute pain for a few hours are deemed to be of mild severity under EU legislation [90] but our results show that the responses to fin clipping and PIT tagging persists for several hours and as such should be deemed moderately severe. However, if immersion analgesia is provided to alleviate any associated pain and discomfort, this procedure could be reduced to mild. The increased use of fish and in particular zebrafish in research means that they are subject to a wide variety of invasive procedures with little known about the ability of these interventions to cause pain. It is crucial, therefore, that non-invasive tools like fractal dimension analysis be used and developed to address the severity of protocols so that appropriate actions can be taken to ameliorate their impact upon health and welfare. Being able to assess severity and possible pain from a laboratory procedure and further minimising pain via analgesia represent important refinements in the treatment of experimental zebrafish.