Developments in the field of live imaging of single-cell migration have enabled us to observe cellular processes and their temporal evolution at unprecedented detail. It is now possible to image the rich diversity of cellular dynamics inside living organisms. In this study, we examine the behaviour of leukocyte dynamics in zebrafish embryos in response to injury. The zebrafish, which has long been an important model system in developmental biology, has also become an attractive model in which to study inflammation and the immune system. Analyses in zebrafish allow *in vivo* imaging of immune processes to be combined with molecular studies that target signalling processes regulating leukocyte migration.

The innate immune system of zebrafish closely resembles that of mammals and is fully competent at early embryological stages before the emergence of lymphocytes. For the first few weeks of their life zebrafish embryos rely solely on their innate immune system as the adaptive system becomes functional 4 weeks after fertilization. Here, we focus on the spatio-temporal response of myeloid cells in zebrafish following surgical injury to the tail fin. Several studies have demonstrated that injury in zebrafish embryos results in the migration of leukocytes to the site of tissue damage.^{1, 2, 3, 4, 5} Although the migration is dependent in part on a hydrogen peroxide gradient produced at the injury margin,^{6} clearly other signals also contribute to the decision making that results in cell migration.

What becomes apparent from these studies of leukocyte recruitment in zebrafish embryos is that cells exhibit a panoply of different types of migratory behaviours. These behaviours will be influenced by the time since and distance from the wound site. Here, our aim is to capture and rationalize this richness in immune cell chemotaxis. The simple statistics, such as the number of recruited cells, the velocity, the mean square displacement or the straightness index, that are often used to analyse these trajectory data do not capture the whole information content of such rich data.^{7, 8, 9, 10}

Random walks have been used to model animal movement and cell migration.^{11} They are often described as uncorrelated random walks with diffusion^{12} or Lévy flights,^{13, 14} which are isotopic random walks with characteristic distributions of the step length (for example, Brownian motion (BM) vs Lévy flights). Another possibility is to model the change in direction rather than considering the step length, which leads to the analysis of isotopic vs non-isotopic random walks. In this context, it was recently reported that living mammary epithelial cells in a tissue display a bimodal persistent random walk (PRW).^{15} Here, we use automatic image analysis to capture and analyse a sufficiently large number of leukocyte trajectories in wounded zebrafish embryos to obtain reliable statistical interpretations of the leukocyte recruitment and migration under different conditions.

The discovery of selective ATP-competitive inhibitors made it possible to dissect the individual roles of the c-Jun N-terminal kinase (JNK) and p38 mitogen-activated protein kinase (MAPK) families. The anthrapyrazolone SP600125 is now widely used as an inhibitor of JNK signalling^{16} and SB203580, a pyridinyl imidazole is commonly used to inhibit p38 MAPK-dependent signalling.^{17} These inhibitors are useful tools to study the function of these protein kinases in cell signalling and other physiological processes. For instance, it has recently been shown that the JNK inhibitor SP600125, but not the p38 inhibitor SB203580 has an important role in the recruitment of tissue-resident primitive macrophages to the site of acute injury induced by tail transection.^{18}

To investigate the diverse dynamics of leukocyte migration, we apply transition matrices as a novel statistical approach to analyse *in vivo* trajectories of migrating cells. A transition matrix is used to describe the transition, in this case cell movement, from one state to another. Transition matrices have been previously used to define and model different types of random walks.^{19} Here, we use transition matrices as a data analysis tool to analyse leukocyte migration data produced in zebrafish injured and treated with pharmacological inhibitors of signalling proteins. This allows us to study how different molecular components can modulate the immune response by influencing the migratory behaviour of leukocytes. In addition to the analysis described, we show that migration behaviours are dependent on space and time. Our approach can be applied to analyse any kind of biological trajectory.

### Results

#### Cell tracking in live zebrafish embryos and acquisition of trajectory information

An automated cell tracking system was developed to analyse leukocyte recruitment at the single-cell level from trajectory data produced by time-lapse imaging. Trajectories were analysed mathematically to produce detailed information about leukocyte migration. The inhibition of MAPK proteins, known to have a role in leukocyte migration, altered migration behaviour as determined by our new statistical approach. Transgenic *pu.1:EGFP* zebrafish embryos were used to acquire the *in vivo* experimental data we presented.^{20} PU.1 is myeloid cell selective allowing investigation of the migratory behaviour of a heterogeneous population of myelomonocytes. Time-lapse imaging of *pu.1:EGFP* transgenic zebrafish embryos was performed to record the recruitment of *pu.1:EGFP*^{+} leukocytes to an injury produced by tail transection (Figure 1a). The data acquired were processed and normalized using the automated cell tracking system to produce information on the trajectories of individual cells migrating in response to injury. Our protocol took into account typical tracking errors, recently reviewed by Beltman *et al.*,^{21} and controled for their effects, resulting in reliable trajectory data. The automated cell tracking system acquired cell shape and cell movement information that allowed the generation of image sequences documenting change in cell shape and trajectory over time (Figure 1b). The distance and direction in which a cell moves between frames, that is, the motion vector, was determined; the angle between consecutive motion vectors was calculated and was used to test individual trajectories for different random walk behaviours. The angle between each motion vector of an observed trajectory and the negative y axis was computed and compared with the observed β in the next step (Figure 1c).

##### Figure 1.

The automated leukocyte tracking system enables statistical analysis. *pu.1:EGFP* zebrafish embryos were injured via tail transection (blue dashed line). The blue-framed region was captured using time-lapse fluorescent microscopy resulting in image sequences with green fluorescent *pu.1:EGFP-*positive cells. Each cell was detected automatically using edge detection and was described as an object with the coordinates of its centre. In addition, bright field images were generated to normalize the data. In all generated movies the zebrafish was injured via tail transection, therefore the injury is located orthogonal to the notochord. To allow the analysis of data that are extracted from different movies it was necessary to normalize them. The image resolution was constant in all movies. Linear transformation of the trajectory data results into the new axes shown in red. The normalized data were used to track the cells over time resulting in cell trajectories (blue lines). Scale bars are 100 μm (**a**). Time-lapse bright field images overlaid with images of single *pu.1:EGFP-*positive cell automatically detected (green cell) and tracked (blue trajectory line) produced by automated single-cell tracking system in a *pu.1:EGFP*^{+} transgenic zebrafish embryo injured by tail transection at 5 days post fertilization (dpf) injured by tail transection. Time starts from 3-h post injury (h.p.w.) and the images shown are at 36 s intervals (original time gap between images used for data analysis was 18 s) (**b**). A trajectory (blue) of a *pu.1:EGFP-*positive cell (green) that was tested for random walk characteristics. Two motion vectors *v*_{1} and *v*_{2} (dark blue) with their projections onto the x axis and the y axis (*x*_{1}, *y*_{1} and *x*_{2}, *y*_{2}) were used to test for isotropy, which is achieved by calculating the angle between *v*_{1} and *v*_{2}. If the BM random walk model holds, the one-dimensional projections of the motion vectors onto the axes are Gaussian distributed (**c**).

#### Influence of MAPK signalling on leukocyte trajectories

MAPK pathways are known to have important roles in leukocyte migration.^{22} JNK but not p38 MAPK has been shown to influence the number of macrophages and neutrophils recruited to an injury in zebrafish.^{18} However, the role MAPKs have in modulating leukocyte migration dynamics is poorly understood. We compared different characteristics of cell migration trajectories extracted from zebrafish embryos treated with the p38 MAPK inhibitor SB203580, the JNK inhibitor SP600125 (both soluble in dimethyl sulfoxide (DMSO)) with DMSO-control-treated embryos. We also acquired recruitment data from untreated embryos to determine the effect of DMSO alone on leukocyte migration, as DMSO is known to have modulatory effects on inflammatory processes.

We analysed trajectory information produced by two common methods of quantifying cell migration behaviour. Of the treatment groups analysed, only the p38 MAPK inhibitor SB203580 had a significant effect, that is, an increase in velocity and straightness index when compared with untreated fish (Supplementary Figure 1 and Supplementary Movie 1).

#### Analysis of cell migration dynamics using transition matrices

Leukocyte migration dynamics exhibit diverse types of behaviour that are affected by a multitude of factors. These patterns are only poorly described by simple statistics; computing the average straightness index or velocity across a whole population of cells can only give coarse insights into cell migration behaviour and how this differs as conditions are changed. Here, we aim to capture more subtle and nuanced changes in the migration behaviour over time and space. We therefore developed the application of transition matrices, which can provide more information and are better suited to elucidating mechanisms and effects of leukocyte behaviour than simple statistics. We furthermore considered how these transition matrices differed at a range of distances from the wound site and at a range of times after injury.

Leukocyte migration in the presence and absence of a signal has been described as a random walk,^{23, 24, 25, 26, 27} and we considered four different random walk processes: (i) Brownian motion random walk (BM, Supplementary Equation 1), where all transitions from a given state to an other have equal probability, that is, a type of isotopic random walk; (ii) biased random walk (BRW, Supplementary Equation 2) in which the movement of a cell is influenced by drift into a specific direction; (iii) persistent random walk (PRW, Supplementary Equation 3), where the cell has a higher probability of keeping the direction from the previous step than changing the direction; and (iv) biased persistent random walk (BPRW, Supplementary Equation 4), where in addition to the persistence a certain (absolute) direction of movement is favoured.^{11, 12} Our models do not consider the distribution of the step length. Instead, we investigate whether and how the migration deviates from a isotopic random walk, where all directions are equally favoured. We transformed all the trajectories so that the zebrafish notochord defines the y direction and the x direction is parallel to the injury (see Materials and methods) and therefore the y axis was used as a reference to determine whether a cell moves towards or away from the injury, that is, the cell movement is biased in a certain direction and is therefore directed.

Next, we investigate which dynamical model dominated under the different treatment groups in the real data. The investigated dynamical models are continuous-time stochastic processes {*α*_{t}}, where *α*_{t} is the angle between a motion vector and the negative y axis at time *t* (Figure 1c). As we observe data only every 18 s, we need to discretize the stochastic process {*α*_{t}} by sampling intervals of length *l*=18 s and therefore obtain {*β*_{t}}, where *β*_{t}=*α*_{kl}. We can now analyse the process *γ*_{k}=*i* if *β*_{k}∈[−π+2π/15(*i*−1), −π+2π/15*i*] for *i*∈{1, …, 15} by computing the probability matrix of transitions from step *t* to *t+1* as *T*_{i,j}=*P*(*γ*_{t}=1, *γ*_{t+1}=*j*), where *T*_{i,j} is the (*i,j*)-th entry in *T*. Note that this definition of the transition matrix differs from the widely used form, which describes the conditional probability distribution. Here, instead we compute the joint probability distribution. A β close to 0 describes a movement towards the injury, β*>*0 and β*<*0 describes an angle to the right and left side, respectively, and β close to (180°) describes movement away from the injury. Figure 2a shows some of the possible transitions using arrows to indicate motion vectors.

##### Figure 2.

Transition matrix as a tool to capture complex dynamics in cell migration behaviours. A key to indicate the cell migration transitions captured by the transition matrix (**a**). Red arrows indicate the first step, followed by green arrows representing the consecutive step. The angles provide the absolute orientation in the fish, where the negative y axis (notochord) is used as a reference (**a**). Sample paths of the four described random walk models: BM; BRW, biased random walk; PRW; BPRW, biased persistence random walk. Initial conditions for numeric simulation: *x*=0; *y*=−10 (**b**). Probability matrices for transitions of β for the four random walk models plotted as heat maps (blue, lowest probability; red, highest probability). Matrices are computed from 100 trajectories over 50 time units. The matrices show clearly distinctive patterns and can therefore be used to distinguish between the different random walk types (**c**).

This approach distinguishes sets of migration patterns that are based on the transition from a given state, in this case the angle between a reference axis (notochord) and the leukocyte step (direction), into another (Figure 1a). We first used simulations to determine the nature of transition matrices for different types of migration behaviour (see Materials and methods).

Figure 2a illustrates the location on the matrix of a representative selection of the step transitions that were captured by the transition matrices. We used Monte Carlo simulations to generate trajectories for each of the four types of random walk described above (Figure 2b) to generate probability matrices for the four random walk models. We generated 100 sample paths of 20 steps for each random walk model, to capture the characteristics of the extracted cell migration data, which are also limited in number and length. We could clearly distinguish the different patterns produced by the different types of random walks from the resulting transition matrices (Figure 2c).

Simulated trajectories for BM produced transition matrices where all transitions have equally high probability, that is, no overall pattern is discernible. By contrast, simulated trajectories for a biased random walk generated transition matrices with higher probability for the transitions in the centre of the matrix, representing the bias towards the injury, in this case. Trajectories simulated using a PRW produced transition matrices with high probabilities of transitions along the diagonal, where consecutive steps at time *t* and *t*+1 have very similar directions, indicating persistence. Trajectories from a biased PRW produced transition matrices with high probabilities of transitions along the diagonal with highest probability in the centre of the matrix (Figure 2c). We used these patterns as dictionaries to compare the patterns produced in transition matrices generated from real experimentally acquired trajectory data to determine the types of walk demonstrated by real leukocytes over time and space and under different treatment conditions.

The investigated models of random walks are stationary processes, that is, their characteristics do not change in time or space. We next investigate whether or not the observed migration process in zebrafish embryos is stationary as well, in which case the properties of the transition matrices do not change over time or space. It is important to investigate whether stationarity is given, not only to gain insights into the biological processes but also to understand whether simple summary statistics are applicable or not.

#### Temporal dependence of leukocyte migration dynamics

We applied this transition matrix analysis to the dynamics of leukocyte movement. Signals sensed by each leukocyte will change over time dependent on the balance of pro-inflammatory and anti-inflammatory/pro-resolution mediators.^{28, 29} We might therefore have expected the dynamics of leukocyte migration behaviour to change over time, and we investigated this using experimentally extracted trajectory information from live-imaging data to produce transition matrices. We grouped extracted trajectories taken at a distance of 0–155 μm from the wound from 3 to 14 h.p.w. (hours post wounding) into four equally distributed intervals (T1, 3.00–5.72 h.p.w., T2, 5.72–8.44 h.p.w., T3, 8.44–11.16 h.p.w. and T4, 11.16–14.00 h.p.w., Figure 3a) and computed the corresponding transition matrices for each set of trajectories (the grouping was used to yield roughly equivalent statistical power across all time-windows; the overall picture emerging from this analysis is, however, robust to varying the time-windows). Leukocytes from untreated zebrafish embryos showed a PRW, as demonstrated by the high probability of transitions along the diagonal. Over time this high probability along the diagonal is reduced, indicating that the migration type is a nonstationary process, where the level of persistence decreased with time.

##### Figure 3.

Leukocyte dynamics change with time after injury. Transition matrices as heat maps for the four treatment groups are presented. Leukocyte trajectories detected at the injury site (distance from injury between 0 and 300 μm) were divided into four time intervals post injury T1–T4 (see legend) and transition matrices plotted for each (**a**). We compute the average correlation time at each time interval (circles) with its bootstrap confidence interval of the mean (error bars). Note that the scales differ in between the treatment groups (**b**). To explain the unexpected dynamical patterns that appear in some of the transition matrix, we formulated two models, forward–backward random walk (**c**) and trafficking (**d**), to numerically simulate trajectories and compute their transition matrices for comparison. Initial conditions for numeric simulation: *x*=0; *y*=−10.

Another measure of the level of persistence is the correlation time of a trajectory. This is a measure of how long it takes until a cell changes its direction. To compute the correlation time τ, the autocorrelation function of β (the angle between a motion vector and the negative y axis) was computed. We define the time until this function reaches zero (no correlation) as the correlation time. Figure 3b shows the correlation time per time interval (T1–T4) after injury. In an untreated zebrafish, the correlation time decreased from 60 s at T1 to 18 s at T4. This is in line with the reduction in persistence demonstrated over time by the transition matrices.

The transition matrices for fish that underwent DMSO treatment showed weak persistence, that is, somewhat lower probability along the diagonal, in comparison with untreated fish (Figure 3a, second row). A higher probability for transitions in the centre of the matrix was observed, which showed a bias in the leukocyte movement towards the injury site. The pattern of the transition matrices did not change significantly over time, meaning that the temporal dependence of the leukocyte behaviour was ablated in the presence of DMSO. The correlation time for DMSO was also lower than in untreated, and did not decrease over time (Figure 3b, second row). Treatment with the p38 MAPK inhibitor SB203580 (dissolved in DMSO) restored the persistence and the decrease in correlation time. In fact, it increased the level of persistence compared with the untreated condition. Inhibiting p38 restored the temporal dependencies. Compared with untreated trajectories we observed a bias towards the injury site at later time points in these trajectories. As this pattern is also present in the DMSO control this is likely a DMSO effect.

Leukocytes exposed to the JNK inhibitor SP600125 (dissolved in DMSO) exhibit correlation times comparable to DMSO only treated zebrafish embryos at T1. At time T1, a moderate level of persistence was observed similar to that seen in untreated fish (Figure 3a fourth row). In the presence of SP600125, the persistence decreased rapidly over time following injury: at T1 there was a higher probability on the diagonal of the matrix that was not seen at T2–4. Instead, high probability was observed in the centre of the transition matrix, meaning that there was bias towards the injury. The patterns in the transition matrices observed in the SP600125-treated cells were similar to the DMSO control over time, indicating that JNK inhibition does not have a strong effect on migration behaviour when analysed in this way.

In the untreated and DMSO-treated groups, we also observed an increased probability along two further diagonals (in addition to the high probability along the diagonal of the transition matrix). Such transitions indicated a forward–backward movement along the same axis. This had not been expected or previously been described; but this behaviour can also be described in a Monte Carlo simulation model (Figure 3c): in this scenario a leukocyte has a high probability of keeping its direction or moving into the opposite direction in consecutive steps. Changing direction along the x axis was observed with low probability, that is, there was a low probability for cells to move along the x axis parallel to the injury. This forward–backward random walk was clearly apparent in untreated zebrafish and also the DMSO alone group. Inhibiting p38 MAPK decreased this behaviour, whereas inhibiting JNK removed this characteristic completely.

In both the DMSO and JNK inhibitor-treated groups a high probability in a further four positions of the matrix (Figure 3a, fourth row) was observed. These four areas on the matrix represent movement where the first step is towards the injury and the consecutive step away from the injury (and *vice versa*). This type of behaviour had not been expected but may represent increased leukocyte trafficking at later time points. We were able to generate simulated cell trajectories that display this type behaviour and computed the corresponding transition matrix (Figure 3d).

#### Spatial dependence of leukocyte migration dynamics

We investigated the dependence of leukocyte migration behaviour on the location of the cell in relation to the wound site. In our experimental setup, the tail transection wound is approximately orthogonal to the notochord in the embryo. We investigated how the migration dynamics change depending on the distance of the cell from the wound, that is, along the y axis (see Figure 1a for orientation). We grouped leukocyte trajectories detected between 3 and 5.72 h.p.w. (T1) into four equal distance intervals from the wound and computed the transition matrix and the correlation time for each interval (S1, 0–155 μm, S2 155–310 μm, S3, 310–465 μm and S4, 465–620 μm). We found that migration behaviour strongly depends on the distance from the wound in all four groups (Figure 4a). Leukocyte persistence, high probability along the diagonal of the matrices, decreased with distance from the injury (Figure 4a, S2–4). The correlation time also reflects this aspect of the leukocyte dynamics and decreases with distance from wound (Figure 4b). Note that, as seen in the temporal analysis, we observed high levels of persistence in untreated and fish treated with p38 MAPK inhibitor, whereas treatment with DMSO and JNK inhibitor resulted in lower overall persistence.

##### Figure 4.

The level of persistence in the migration of leukocytes is spatially dependent. Transition matrices as heat maps for the four treatment groups. Trajectories detected between 3 and 7 h.p.w. were divided into four equally distributed spatial clusters S1—S4 according to the distance from the injury, (see legend) and the transition matrices plotted (**a**). Average correlation time at each cluster (circles) with its bootstrap confidence interval of the mean (error bars) (**b**).

Leukocytes from the untreated, DMSO and JNK inhibitor treatment groups had similar spatial dependencies (Figure 4a, rows 1–2 and 4). When treated with p38 MAPK inhibitor the spatially resolved dynamics showed a different pattern (Figure 4a, third row). The persistence decreased with distance and at distances S2–S4 (distance between 155 and 620 μm) we observed a higher probability for movement towards the injury. This bias was increased, whereas the level of persistence was decreased, for cells further away from the injury site. Inhibiting p38 MAPK leads therefore to biased and persistent migration behaviour (biased PRW Figures 2b and c), with both bias and persistence depending on the distance to the wound. In general, we found that leukocytes observed at greater distances from the injury site (distance >465 μm) displayed BM type random walk across all groups (Figure 4a, fourth column and Figures 2b and c).

#### Spatio-temporal leukocyte migration patterns

We studied the combined influence of time since injury (temporal) and distance from injury (spatial) on the level of persistence of the leukocyte. We grouped the leukocyte trajectories into four temporal clusters (T1–T4), each of these was then split into 4 spatial clusters (S1–S4), resulting in 16 spatio-temporal clusters. For each cluster, we computed the correlation time as a measure of the level of persistence (Figure 5) for each treatment group.

##### Figure 5.

The correlation time of migrating leukocyte is spatio-temporal dependent and was modified by DMSO and MAPK inhibitors. The correlation time is plotted as a function of the distance from injury and the time post injury for the four treatment groups untreated (**a**), +DMSO (**b**), +SB203580 (**c**) and +SP600125 (**d**). The surfaces represent the interpolation of the measurements, where red is the longest and blue the shortest correlation time.

Untreated and p38 MAPK inhibitor-treated leukocytes showed a clear spatio-temporal dependency in their correlation time: the strength of persistence decreased with increasing distance from the injury (from S1 to S4) and increasing time after injury (from T1 to T4; Figures 5a and c). The correlation time in untreated leukocytes rapidly decreased close to the injury (S1–S2) and shortly after the injury (T2). Inhibiting p38 MAPK slowed this effect considerably and, for example, at T4 (>11 h.p.w.) leukocytes had a correlation time of 36 s at the injury site (53% decrease from T1; Figure 5a) compared with 18 s (73% decrease from T1) in the untreated group (Figure 5c).

Inhibiting JNK or treating with DMSO alone also reduces correlation times, and for early time points after injury (T1) we observe a pronounced spatial dependency with a decrease in the correlation time as we move further away from the wound with increasing distance from the injury (from S1 to S4; Figures 5b and d), as mentioned before (Figure 4b). This spatial dependence was lost at later time points (T2–T4).

### Discussion

The development of highly sophisticated live-imaging facilities enables us to collect high-quality cell migration data in live zebrafish embryos. These data are often rich in detail and behaviour, but this also makes them challenging subjects for analysis and statistical investigations. Here, we have aimed to capture the spatio-temporal dependence of leukocyte migration in response to wounding using transgenic zebrafish known to express enhanced green fluorescent protein (EGFP) in myeloid cells from 16 hpf into adulthood.^{30} We believe that the new tool of transition matrices—which capture the change in directionality of a migrating cell/particle—afford a more nuanced description of such processes than previously used statistical measures, such as velocity or straightness index. On the one hand this is not surprising as our statistics are multi-dimensional (*n* × *n* in *n* different intervals of angles are considered); but on the other hand, especially when interpreted in light of the ‘dictionaries’ (presented in Figure 2) of simulated trajectories, these matrices can be directly linked to certain modes of chemotaxis. Crucially, this methodology enabled us not only to distinguish between the previously described types of random walk but also revealed new unpredicted migration patterns.

We can therefore interpret cell migration patterns, their change over time and space, and their dependence on molecular mechanisms in a more straightforward way. And the comparison between real data and our dictionaries has enabled us to detect nuances in the migratory behaviour of leukocytes that had hitherto not been observed. The new types of migration behaviour—forward and backward—is not commensurate with any of the classical random walk behaviour hypotheses,^{4, 12} but seems to dominate cell migration at later time points in untreated fish. This forward–backward motion is furthermore biased in the direction perpendicular to the wound in some instances: notably at distances far from the wound in untreated fish, and it is especially pronounced at intermediate and later time points for fish in which JNK is inhibited. Such a dependence is lost if simpler statistical measures, such as the straightness index, are used.

The transition matrices offer a convenient and self-explanatory representation of many aspects of cell migration behaviour and how this is affected by different factors. Here, we have used them to test for consistency between hypothetical/theoretical models of random walk behaviour and actual *in vivo* observations of leukocyte migration; and we have been able to propose new models of random walk behaviour that are in better agreement with the observed behaviour under some conditions, when the cell migration clearly deviates from classical, biased, persistent or biased persistent walks.

Computing conventional statistics, such as velocity and straightness index and so on, would have failed to detect this nuanced behaviour, which becomes so apparent in the transition matrices. However, these matrices also only become truly useful with the aid of dictionaries (or comparison with numerical simulations). This increased level of detail, however, also comes at a price: we observe pronounced spatio-temporal dependence of the transition matrices, and thus infer concomitant changes in the migratory behaviour of cells, which need to be considered: heterogeneity between cells is to some extent a function of time since and distance to the wound, it appears. This has thus far not received the level of attention it deserves in light of our findings.

This heterogeneity (and the way in which leukocytes respond to wound injury) can be tempered by selectively inhibiting signalling proteins in the zebrafish embryos. Here, we have focussed on DMSO, and inhibitors of the p38 MAPK and JNK MAPK signalling proteins, to exemplify how this approach allows us to connect molecular processes and migration phenotypes. However, our approach can more generally be used to study any kind of cell migration data, collected under diverse experimental conditions.

DMSO has previously been reported to have anti-inflammatory effects.^{31, 32} We show that DMSO mainly influences the mode of cell migration: when compared with untreated zebrafish it strongly decreases the level of persistence at early time points after wounding, which is not restored at later time points so the observed temporal dependencies in untreated zebrafish are ablated. This finding is important as DMSO is commonly used as a solvent in drug screens, including zebrafish inflammation screens. To image the embryos over time it is necessary to anesthetize them to prevent movement that affects image acquisition. It must be noted that the anaesthetic may also have an effect on leukocyte migration behaviour.

The MAPK pathways are important mediators of cellular responses to inflammatory signals including leukocyte migration behaviour; p38 MAPK as well as regulating the production of inflammatory mediators regulates the effector function of leukocytes by controlling their migration in response to inflammatory stimuli.^{33, 34} A much studied but still little understood anti-inflammatory component is the p38 inhibitor SB203580. Many *in vitro* studies, as well as studies on cell cultures, show that inhibiting p38 results in a decreased straightness index, velocity and recruitment of cell numbers under acute injury and/or when stimulated with LPS.^{35, 36, 37, 38, 39, 40, 41, 42} However, some studies report contradictory effects.^{22, 43} The use of p38 inhibitors in clinical trials did also not fully confirm the anti-inflammatory behaviour. Although the actual role of p38 during inflammation, or more specific on leukocyte recruitment and migration is not resolved, we can summarize that p38 regulates inflammation in a complex way and appears to act on multiple levels. Our results contribute to previously reported studies by demonstrating that inhibiting p38 leads to an increased persistence in cell motion, which extends into a larger area of the fish tail. The persistence decreases more slowly over time after wounding compared with untreated zebrafish. This suggests that an inflammatory reaction is influenced by a multitude of factors and any analysis should evaluate all possible aspects of cell migration. Furthermore, it is important to note that when inhibiting p38 with SB203580 the zebrafish is also treated with DMSO, which when applied on its own had the opposite effect. The combinatorial effect of two components on inflammation can result in more complex behaviour than just the additive effects, as recently reported by Small *et al.*^{44}

The JNK inhibitor SP600125 had a minimal effect on cell migration compared with the DMSO control. The JNK inhibitor removed the novel forward–backward movement pattern observed in the untreated and DMSO groups but otherwise had no observable effect when compared with the control. DMSO treatment results in a strong decrease of persistence compared with untreated zebrafish. Several JNK substrates are known to impact actin regulation and cytoskeleton remodelling, including MAP1B, MAPA2, DCS and SCG10, they are likely to have an important role during inflammation and cell migration processes; however, our analysis did not reveal JNK inhibition to have a marked effect on cell migration behaviour.^{18, 38, 45, 46, 47, 48}

To understand the impact of the specific molecules on the cell migratory behaviour more detailed and comprehensive (multifactorial) inhibitor studies will be necessary. The platform we present here will help to complete such studies.

In conclusion, this work serves to demonstrate the uses and potential insights to be gained from considering transition matrices as descriptions of random walks. Although they are staple methods in the simulation of random walks (and a plethora of other stochastic) phenomena, this is, to our knowledge, the first time that they have been used in this inverse or reverse engineering capacity. This method is more widely applicable than just to the analysis of leukocyte migration. Visualizing the transition matrices has the additional benefit of serving as a convenient way of exchanging ideas and concepts between experimentalists and modellers and their use in reverse engineering tasks more generally seems equally promising. Recent years have seen advances in connecting simulation studies more directly and immediately to data^{49, 50, 51, 52, 53, 54} to parameterize or infer structures of mechanistic models (here, for example, signalling pathways regulating the cell migratory behaviour).

### Materials and methods

#### Zebrafish care and breeding

*Tg(−9.0spi1:EGFP)zdf11 (pu.1:EGFP)* zebrafish^{30} were bred and maintained according to the Animals (Scientific Procedures) Act 1986.

#### Tail transection and image acquisition

*pu.1:EGFP* zebrafish embryos (5 dpf) were pretreated in system water only (untreated) or system water containing either 0.002% (v/v) DMSO (vehicle control), 20 M SP600125 or 10 M SB203580, both dissolved in DMSO (Sigma-Aldrich, Dorset, UK), for 2 h at 28.5 °C. After 2 h, they were anesthetized in 0.6 mM MS-222 (Tricaine methanesulfonate, Sigma-Aldrich) and the tail fin was transacted using a sterile scalpel. The fish were then transferred to fresh treatment media for 2 h 28.5 °C before transferral to 0.8% low-melt agarose (Flowgen, Lichfield, UK) for time-lapse imaging experiments. Images were captured using a Zeiss Axiovert 200 inverted microscope (Zeiss, Cambridge, UK) controlled by the C-Imaging Simple-PCI acquisition software (Hamamatsu, Sewickley, PA, USA) for up to 14 h.p.w. The temperature was maintained at 28.5 °C throughout the experiment using a full incubation chamber with temperature control. The time gap between two consecutive images was 18 s.

#### Image processing and data transformation

Imaging resulted in stacks of images with dark background and fluorescent *pu.1:EGFP*^{++}cells. The image processing was done in *R* using (package *EBImage*^{55}). An edge detection method was used to automatically extract the information of the cells from the images. We used a manually set threshold of the light intensity per image stack. Each detected cell was described as an object with the coordinates of its geometrical centre describing the cell location and the occurrence time (Figure 1a). A surface algorithm was used to track the cells over time, which is based on the shortest distance of cells from two consecutive images. Our time-lapse microscopy data were optimized in the experimental setup, for example, 18 s time gap between two consecutive images, so that the cell area from one time point to the next one overlapped, to reduce a typical tracking error described in Beltman *et al.*^{21} When two cells overlapped in the same image (due to two di-mensional (2D) data), we stopped tracking them to avoid wrong cell paths. We excluded all cell trajectories that included time points in which the cell was located at the edge of the image. The images contain the zebrafish tail with the whole injury and only those trajectories with a distance to the injury of <650 m were included. Only trajectories that contain >40 time steps have been used for the analysis to improve the reliability of our results. Data sets in which tissue deformation occurred during acquisition were excluded from analysis. However, no minimum path length was required as long as the cell was tracked over minimum 40 time steps. In this way, it is also possible to observe possible resting cells. We produced bright field and fluorescent images at each time point. Comparing/overlapping two consecutive bright field images allowed us to detect shift and rotation due to small movements of the zebrafish, which was used to correct the absolute position of tracked cells. An overview about the analysed data is given in Supplementary Materials Table 1.

Although the zebrafish tail has a depth of a few cell layers, we performed our analysis in 2D for two reasons: (i) the majority of leukocytes that respond to injury in this tissue region can be imaged in one focal plane (at × 10 magnification) if the fin tissue is mounted flush with the plate (cells not in focus were excluded from analysis), (ii) the acquisition of 3D data leads to a longer time gap between two consecutive images, which results in more tracking errors and less information about the migration process.

To analyse the extracted image data more efficiently and to combine or compare data from several movies, it was necessary to normalize them, for example, the reorientation of the object positions in respect to the notochord of the fish. This was achieved by using linear transformation. The transformation describes the rotation and shifting of the new coordinate bases in the way that the blood flow describes the y axis and orthogonal to it the x axis, which was located approximately parallel to the injury (Figures 1a and b). The orientation was based on the bright field images. For the analysis only zebrafish embryos with the wound approximately orthogonal to the notochord were included. As the embryos were injured manually, we accepted small deviations and assumed them to be orthogonal.

#### Statistical analysis and random walk models

The detailed description of the random walk models and their analysis is present in Supporting Information. Simulation of the sample paths from the models was done in *R*. The extracted leukocyte trajectories were split into subtrajectories of 20 time steps. All analysis was performed on the subtrajectories, to avoid effects due to different trajectory length. The velocity of the trajectories has been computed using local polynomial regression. The straightness index *D* was calculated as the coefficient of the shortest distance between the start and end point of a trajectory and the actual length of the trajectory. A straightness index close to 1 indicates a movement along a line. Note that a straightness index close to zero does not necessarily imply that the cell performs a random walk as described in Supplementary Equations 1–4. We defined the correlation time *τ* as the time when the average autocorrelation function (over all trajectories) of *β* (angle between a motion vector and the negative y axis) is zero. Bars are the 5 and 95% bootstrap confidence interval of the mean. All statistics and graphics were generated in *R*. The analysis was here performed in 2D. Simple statistics such as the straightness index and the velocity can be computed analogously in 3D. To investigate the random walk process, some adaptations are necessary. Although the mathematical extensions to 3D are straightforward by using spherical coordinates, the visualization of the results would lack the intuitive appeal compared with 2D.

The data were clustered depending on time after wounding (T1–T4) and distance from the wound (S1–S4). The analysis was repeated with shifted intervals to test for independence of the clustering scheme. An initial analysis showed that the cell movement does not vary along the x direction (parallel to the wound).

### References

- Lieschke GJ, Oates AC, Crowhurst MO, Ward AC, Layton JE. Morphologic and functional characterization of granulocytes and macrophages in embryonic and adult zebrafish. Blood 2001; 98: 3087–3096. | Article | PubMed | ISI | CAS |
- Renshaw SA, Loynes CA, Trushell DM, Elworthy S, Ingham PW, Whyte MK. A transgenic zebrafish model of neutrophilic inflammation. Blood 2006; 108: 3976–3978. | Article | PubMed | CAS |
- Mathias JR, Perrin BJ, Liu TX, Kanki J, Look AT, Huttenlocher A. Resolution of inflammation by retrograde chemotaxis of neutrophils in transgenic zebrafish. J Leukoc Biol 2006; 80: 1281–1288. | Article | PubMed | ISI | CAS |
- Brown SB, Tucker CS, Ford C, Lee Y, Dunbar DR, Mullins JJ. Class III antiarrhythmic methanesulfonanilides inhibit leukocyte recruitment in zebrafish. J Leukoc Biol 2007; 82: 79–84. | Article | PubMed |
- Redd MJ, Kelly G, Dunn G, Way M, Martin P. Imaging macrophage chemotaxis
*in vivo*: studies of microtubule function in zebrafish wound inflammation. Cell Motil Cytoskeleton 2006; 63: 415–422. | Article | PubMed | CAS | - Niethammer P, Grabher C, Look AT, Mitchison TJ. A tissue-scale gradient of hydrogen peroxide mediates rapid wound detection in zebrafish. Nature 2009; 459: 996–999. | Article | PubMed | ISI | CAS |
- Chtanova T, Schaeffer M, Han SJ, van Dooren GG, Nollmann M, Herzmark P
*et al*. Dynamics of neutrophil migration in lymph nodes during infection. Immunity 2008; 29: 487–496. | Article | PubMed | ISI | CAS | - Harms BD, Bassi GM, Horwitz AR, Lauffenburger DA. Directional persistence of EGF-induced cell migration is associated with stabilization of lamellipodial protrusions. Biophys J 2005; 88: 1479–1488. | Article | PubMed | CAS |
- Lokuta MA, Nuzzi PA, Huttenlocher A. Calpain regulates neutrophil chemotaxis. Proc Natl Acad Sci USA 2003; 100: 4006–4011. | Article | PubMed | CAS |
- Woodfin A, Voisin MB, Beyrau M, Colom B, Caille D, Diapouli FM
*et al*. The junctional adhesion molecule JAM-C regulates polarized transendothelial migration of neutrophils*in vivo*. Nat Immunol 2011; 12: 761–769. | Article | PubMed | ISI | CAS | - Codling EA, Plank MJ, Benhamou S. Random walk models in biology. J R Soc Interface 2008; 5: 813–834. | Article | PubMed |
- Berg HC. Random Walks in Biology. Princeton University Press:: Princeton, NJ, USA. 1983, 164 p.
- Edwards AM, Phillips RA, Watkins NW, Freeman MP, Murphy EJ, Afanasyev V
*et al*. Revisiting Levy flight search patterns of wandering albatrosses, bumblebees and deer. Nature 2007; 449: 1044–1048. | Article | PubMed | CAS | - Harris TH, Banigan EJ, Christian DA, Konradt C, Wojno EDT, Norose K
*et al*. Generalized Lévy walks and the role of chemokines in migration of effector CD8+ T cells. Nature 2012; 486: 545–549. | PubMed | - Potdar AA, Jeon J, Weaver AM, Quaranta V, Cummings PT. Human mammary epithelial cells exhibit a bimodal correlated random walk pattern. PLoS ONE 2010; 5: e9636. | Article | PubMed |
- Bennett CM, Kanki JP, Rhodes J, Liu TX, Paw BH, Kieran MW
*et al*. Myelopoiesis in the zebrafish, Danio rerio. Blood 2001; 98: 643–651. | Article | PubMed | ISI | CAS | - Young PR, McLaughlin MM, Kumar S, Kassis S, Doyle ML, McNulty D
*et al*. Pyridinyl imidazole inhibitors of p38 mitogen-activated protein kinase bind in the ATP site. J Biol Chem 1997; 272: 12116–12121. | Article | PubMed | ISI | CAS | - Zhang Y, Bai XT, Zhu KY, Jin Y, Deng M, Le HY
*et al*.*In vivo*interstitial migration of primitive macrophages mediated by JNK-matrix metalloproteinase 13 signaling in response to acute injury. J Immunol 2008; 181: 2155–2164. | PubMed | - Gardiner CW. Handbook of Stochastic Methods—for Physics, Chemistry and the Natural Sciences Vol. 32004.
- Ward AC, McPhee DO, Condron MM, Varma S, Cody SH, Onnebo SM
*et al*. The zebrafish spi1 promoter drives myeloid-specific expression in stable transgenic fish. Blood 2003; 102: 3238–3240. | Article | PubMed | CAS | - Beltman JB, Maree AF, de Boer RJ. Analysing immune cell migration. Nat Rev Immunol 2009; 9: 789–798. | Article | PubMed | ISI | CAS |
- Stadtmann A, Brinkhaus L, Mueller H, Rossaint J, Bolomini-Vittori M, Bergmeier W
*et al*. Rap1a activation by CalDAG-GEFI and p38 MAPK is involved in E-selectin-dependent slow leukocyte rolling. Eur J Immunol 2011; 41: 2074–2085. | Article | PubMed | - Campos D, Mendez V, Llopis I. Persistent random motion: uncovering cell migration dynamics. J Theor Biol 2010; 267: 526–534. | Article | PubMed |
- Li L, Norrelykke SF, Cox EC. Persistent cell motion in the absence of external signals: a search strategy for eukaryotic cells. PLoS ONE 2008; 3: e2093. | Article | PubMed |
- Tranquillo RT, Lauffenburger DA. Stochastic model of leukocyte chemosensory movement. J Math Biol 1987; 25: 229–262. | Article | PubMed |
- Tranquillo RT, Lauffenburger DA, Zigmond SH. A stochastic model for leukocyte random motility and chemotaxis based on receptor binding fluctuations. J Cell Biol 1988; 106: 303–309. | Article | PubMed | CAS |
- Van Haastert PJ. A model for a correlated random walk based on the ordered extension of pseudopodia. PLoS Comput Biol 2010; 6: pii: e1000874.
- Medzhitov R. Origin and physiological roles of inflammation. Nature 2008; 454: 428–435. | Article | PubMed | ISI | CAS |
- Serhan CN, Chiang N, Van Dyke TE. Resolving inflammation: dual anti-inflammatory and pro-resolution lipid mediators. Nat Rev Immunol 2008; 8: 349–361. | Article | PubMed | ISI | CAS |
- Hsu K, Traver D, Kutok JL, Hagen A, Liu TX, Paw BH
*et al*. The pu.1 promoter drives myeloid gene expression in zebrafish. Blood 2004; 104: 1291–1297. | Article | PubMed | ISI | CAS | - Duimel-Peeters GP, Houwing RH, Teunissen CP, Berger MPF, Snoeckx LHEH, Halfens RJG. A systematic review of the efficacy of topical skin application of dimethyl sulfoxide on wound healing and as an anti-inflammatory drug. Wounds 2003; 15: 361–370.
- DeForge LE, Fantone JC, Kenney JS, Remick DG. Oxygen radical scavengers selectively inhibit interleukin 8 production in human whole blood. J Clin Invest 1992; 90: 2123–2129. | Article | PubMed | ISI | CAS |
- Cara DC, Kaur J, Forster M, McCafferty DM, Kubes P. Role of p38 mitogen-activated protein kinase in chemokine-induced emigration and chemotaxis
*in vivo*. J Immunol 2001; 167: 6552–6558. | PubMed | ISI | CAS | - Aomatsu K, Kato T, Fujita H, Hato F, Oshitani N, Kamata N
*et al*. Toll-like receptor agonists stimulate human neutrophil migration via activation of mitogen-activated protein kinases. Immunology 2008; 123: 171–180. | PubMed | - Liu X, Ma B, Malik AB, Tang H, Yang T, Sun B
*et al*. Bidirectional regulation of neutrophil migration by mitogen-activated protein kinases. Nat Immunol 2012; 13: 457–464. | Article | PubMed | CAS | - Heit B, Liu L, Colarusso P, Puri KD, Kubes P. PI3K accelerates, but is not required for, neutrophil chemotaxis to fMLP. J Cell Sci 2008; 121 (Part 2): 205–214. | Article | PubMed | CAS |
- Heuertz RM, Tricomi SM, Ezekiel UR, Webster RO. C-reactive protein inhibits chemotactic peptide-induced p38 mitogen-activated protein kinase activity and human neutrophil movement. J Biol Chem 1999; 274: 17968–17974. | Article | PubMed | CAS |
- Huang C, Jacobson K, Schaller MD. MAP kinases and cell migration. J Cell Sci 2004; 117 (Part 20): 4619–4628. | Article | PubMed | ISI | CAS |
- Isfort K, Ebert F, Bornhorst J, Sargin S, Kardakaris R, Pasparakis M
*et al*. Real-time imaging reveals that P2Y2 and P2Y12 receptor agonists are not chemoattractants and macrophage chemotaxis to C5a is PI3K- and p38 MAPK-independent. J Biol Chem 2011; 286: 44776–44787. | Article | PubMed | - Johns DG, Ao Z, Willette RN, Macphee CH, Douglas SA. Role of p38 MAP kinase in postcapillary venule leukocyte adhesion induced by ischemia/reperfusion injury. Pharmacol Res 2005; 51: 463–471. | Article | PubMed |
- Lee D, Schultz JB, Knauf PA, King MR. Mechanical shedding of L-selectin from the neutrophil surface during rolling on sialyl Lewis x under flow. J Biol Chem 2007; 282: 4812–4820. | Article | PubMed |
- Olieslagers S, Pardali E, Tchaikovski V, ten Dijke P, Waltenberger J. TGF-beta1/ALK5-induced monocyte migration involves PI3K and p38 pathways and is not negatively affected by diabetes mellitus. Cardiovasc Res 2011; 91: 510–518. | Article | PubMed |
- Hannigan MO, Zhan L, Ai Y, Kotlyarov A, Gaestel M, Huang CK. Abnormal migration phenotype of mitogen-activated protein kinase-activated protein kinase 2-/- neutrophils in Zigmond chambers containing formal-methanol-leaky-phenylalanine gradients. J Immune 2001; 167: 3953–3961.
- Small BG, McColl BW, Allmendinger R, Pahle J, Lopez-Castejon G, Rothwell NJ
*et al*. Efficient discovery of anti-inflammatory small-molecule combinations using evolutionary computing. Nat Chem Biol 2011; 7: 902–908. | Article | PubMed | - Dong C, Davis RJ, Flavell RA. MAP kinases in the immune response. Annu Rev Immunol 2002; 20: 55–72. | Article | PubMed | ISI | CAS |
- Johnson GL, Lapadat R. Mitogen-activated protein kinase pathways mediated by ERK, JNK, and p38 protein kinases. Science 2002; 298: 1911–1912. | Article | PubMed | ISI | CAS |
- Krens SF, He S, Spaink HP, Snaar-Jagalska BE. Characterization and expression patterns of the MAPK family in zebrafish. Gene Expr Patterns 2006; 6: 1019–1026. | Article | PubMed | ISI | CAS |
- Thalhamer T, McGrath MA, Harnett MM. MAPKs and their relevance to arthritis and inflammation. Rheumatology 2008; 47: 409–414. | Article | PubMed |
- Bumgarner SL, Neuert G, Voight BF, Symbor-Nagrabska A, Grisafi P, van Oudenaarden A
*et al*. Single-cell analysis reveals that noncoding RNAs contribute to clonal heterogeneity by modulating transcription factor recruitment. Mol Cell 2012; 45: 470–482. | Article | PubMed | - Cheong R, Rhee A, Wang CJ, Nemenman I, Levchenko A. Information transduction capacity of noisy biochemical signaling networks. Science 2011; 334: 354–358. | Article | PubMed |
- Fujita KA, Toyoshima Y, Uda S, Ozaki Y, Kubota H, Kuroda S. Decoupling of receptor and downstream signals in the Akt pathway by its low-pass filter characteristics. Sci Signal 2010; 3 ra56.
- Liepe J, Taylor H, Barnes CP, Huvet M, Bugeon L, Thorne T
*et al*. Calibrating spatio-temporal models of leukocyte dynamics against*in vivo*live-imaging data using approximate Bayesian computation. Integr Biol 2012; 4: 335–345. | Article | - Toni T, Stumpf MPH. Simulation-based model selection for dynamical systems in systems and population biology. Bioinformatics 2010; 26: 104–110. | Article | PubMed | ISI | CAS |
- Xu TR, Vyshemirsky V, Gormand A, von Kriegsheim A, Girolami M, Baillie GS
*et al*. Inferring signalling pathway topologies from multiple perturbation measurements of specific biochemical species. Sci Signal 2010; 3 ra20. - Pau G, Fuchs F, Sklyar O, Boutros M, Huber W. EBImage—an R package for image processing with applications to cellular phenotypes. Bioinformatics 2010; 26: 979–981. | Article | PubMed | ISI | CAS |

### Acknowledgements

We thank the Imperial College London Film Facility, Martin Spitaler and Christian Liebig for microscopy support and Dr Stephen Renshaw for the provision of transgenic fish used in preliminary experiments. This work was funded by grants from the BBSRC, The Wellcome Trust and GlaxoSmithKline. MPHS is a Royal Society Wolfson Research Merit Award holder.

The Supplementary Information that accompanies this paper is available on the Immunology and Cell Biology website

This work is licensed under the Creative Commons Attribution-NonCommercial-No Derivative Works 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/.