Functional trajectories during innate spinal cord repair

Adult zebrafish are capable of anatomical and functional recovery following severe spinal cord injury. Axon growth, glial bridging and adult neurogenesis are hallmarks of cellular regeneration during spinal cord repair. However, the correlation between these cellular regenerative processes and functional recovery remains to be elucidated. Whereas the majority of established functional regeneration metrics measure swim capacity, we hypothesize that gait quality is more directly related to neurological health. Here, we performed a longitudinal swim tracking study for 60 individual zebrafish spanning 8 weeks of spinal cord regeneration. Multiple swim parameters as well as axonal and glial bridging were integrated. We established rostral compensation as a new gait quality metric that highly correlates with functional recovery. Tensor component analysis of longitudinal data supports a correspondence between functional recovery trajectories and neurological outcomes. Moreover, our studies predicted and validated that a subset of functional regeneration parameters measured 1 to 2 weeks post-injury is sufficient to predict the regenerative outcomes of individual animals at 8 weeks post-injury. Our findings established new functional regeneration parameters and generated a comprehensive correlative database between various functional and cellular regeneration outputs.


Introduction
As vertebrates with elevated regenerative potential, adult zebrafish are an excellent model for innate spinal cord (SC) repair. After complete SC transection, pro-regenerative responses involving the immune system, neurons, and glia contribute to functional regeneration (Mokalled et al., 2016;Saraswathy et al., 2022). Prompted by a host of injury-induced regeneration promoting factors, glial and axonal bridges reconnect the lesioned tissue, neurons regenerate proximal to the lesion, and swim capacity is restored, all within 6-8 weeks post-injury (wpi) (Mokalled et al., 2016). Due to the remarkable ability of adult zebrafish to reverse paralysis, recovery of swim function is an ultimate metric and a central readout of SC repair.
Functional measurements of swim ability may be classified into two broad categories: swim capacity, which represents the amount or extent of swimming a fish can perform under specific conditions; and gait quality, which reflects the quality of a swim bout and the healthiness of a fish during active swimming. One of the earliest assays, in 1997, to evaluate swim function in zebrafish was a binary, recovered or not recovered, quality scoring system assigned by an observer using a startle assay (Becker et al., 1997). In this assay, fish that respond to a stimulus and swim mostly using their tail instead of their head are labeled as recovered. Based on these and other criteria, swim quality scoring systems on 1-5 and 1-6 scales have also been developed (Goldshmit et al., 2012;Strand et al., 2016). Two capacity measurements were subsequently introduced: time to exhaustion in 1998 (van Raamsdonk et al., 1998) and swim distance in a static tank in 2004 (Becker et al., 2004). These offered several advantages: they are less subjective, provide continuous scale measurements, and are scalable for longer assays using computational tools. Consequently, swim distance or time to exhaustion have been widely applied to SC regeneration studies between 1997 and 2020. Since 2020, the toolkit to quantify swim function has rapidly expanded and diversified. Traditional and recently established measurements of swim capacity include swim endurance as quantified by time to exhaustion against increasing water current velocities (van Raamsdonk et al., 1998;Mokalled et al., 2016;Burris et al., 2021;Klatt Shaw and Mokalled, 2021;Saraswathy et al., 2022), maximum speed either against increasing water current velocities or in a static tank (Chang et al., 2021;Huang et al., 2021;Hosseini et al., 2022;Huang et al., 2022), swim distance (Becker et al., 2004;Burris et al., 2021), time active (Burris et al., 2021;Saraswathy et al., 2022), time swimming against flow (Burris et al., 2021), burst frequency (Burris et al., 2021;Saraswathy et al., 2022), and average position of the fish against a water flow axis ("mean y") (Burris et al., 2021;Saraswathy et al., 2022). Although new quality measurements have been developed for larval fish including body angle (Zeng et al., 2021), power spectral densities (Vasudevan et al., 2021), and centerline posture kinematics (Hossainian et al., 2022), published quality measurements for adult fish are limited to manual scoring of perceived swim ability (Becker et al., 1997;Goldshmit et al., 2012;Strand et al., 2016), tail beat frequency and amplitude (Huang et al., 2022). Moreover, manually assigned scores are subjective and do not scale well for higher throughput. Thus, behavioral tests to quantify gait quality in adult zebrafish are less developed, yet much needed for accurate assessment of musculoskeletal function in general and of neural regeneration in particular.
Gait analysis offers a scalable approach to quantify swim quality. Prior applications of gait analysis, such as dorsal centerline posture and tail beat kinematics, supported the model that functional recovery emerges directly from structural recovery among ray-finned fishes (Doyle and Roberts, 2006;Hossainian et al., 2022;Huang et al., 2022). These studies revealed stepwise recovery of specific gait features in correlation with axon regeneration from V2a interneurons (Ljunggren et al., 2014;Huang et al., 2022). These findings suggested that formerly paralyzed zebrafish may regain the ability to swim in a preinjury-like manner after neural regeneration. Yet, further analysis of swim gait metrics, including posture and behavior, is required to confirm this hypothesis.
A first step in gait analysis is the annotation of elemental components of gait in swim videos: posture and behavior. Automated pose and behavior annotation tools for model organisms are increasingly accessible. While traditional computational methods for zebrafish pose annotation include thresholding and skeletonization (Girdhar et al., 2015;Mearns et al., 2020) or template-fitting (Fontaine et al., 2008;Thomas and Gehrig, 2020), many newer cross-species methods prioritize deep learning. Such tools include DeepLabCut (Mathis et al., 2018), DeepPoseKit (Graving et al., 2019), OptiFlex , and SLEAP (Pereira et al., 2022). For zebrafish, quantifying the dorsal centerline is an appropriate representation of body posture. Despite its limitations in measuring vertical position, body deformity in the dorso-ventral axis, or pectoral fin motion, dorsal centerline posture and gait has been applied to larval and adult locomotion analysis (Girdhar et al., 2015;Mearns et al., 2020;Huang et al., 2022) and lateral tail beating is the source of most swim propulsion (Mwaffo et al., 2017). Additionally, certain injury-induced gait alterations manifest in the centerline (Huang et al., 2022). Similar to recent pose annotation methods, automated behavior annotation is often performed through machine learning either by clustering in a latent space (Girdhar et al., 2015;Mearns et al., 2020;McCullough and Goodhill, 2021), such as the pre-packaged tool B-SOiD (Hsu and Yttri, 2021), or through deep learning, including DeepBhvTracking (Sun et al., 2021) or DeepEthogram (Bohnslav et al., 2021). Despite advances in pose and behavior annotation, methods to compare episodes of the same zebrafish behavior, either between animals or between recovery timepoints, are yet to be applied. Comparing multiple episodes of the same behavior is a critical component of gait quality analysis. One viable option includes novelty detection, which classifies behavior episodes as inliers or outliers relative to a control distribution. Another option is posture parameter quantification, which has been used in larval zebrafish (Hossainian et al., 2022). Examples of posture parameter quantification from human and mouse studies used behavior and gait features, such as quantified response to stimulus and range or speed of motion, to measure functional recovery (Maynard et al., 1997;Barbeau et al., 1999;Vrinten and Hamers, 2003;Xu et al., 2017). As swim quality is proposed to be a more direct readout of SC function and musculoskeletal wellness than swim capacity, recovery metrics based on posture and gait have the potential to become standards for functional assessment.
Given the recent diversification of swim capacity and gait quality measurements, this study compares various established and novel functional recovery metrics and describes their correlations with anatomical regeneration. To this end, we tracked swim function prior to injury and weekly between 1 and 8 wpi. Fish identities were tracked throughout the experiment, and cellular regeneration parameters were measured at 8 wpi. For the purposes of this study, we define cellular regeneration at the lesion as the extents of axonal and glial bridging that connect the transected stumps of the lesioned spinal cord. Axon regrowth was measured by anterograde axon tracing, while glial bridging was measured using histological staining for glial GFAP marker. Rostral compensation is established as a new gait feature that highly correlates with functional recovery. For comprehensive analysis of gait features, we also describe recovery trajectories using tensor decomposition of longitudinal recovery data. By observing correlations between established swim capacity and new gait analysis metrics with cellular regeneration features, we propose and validate a strategy for predicting 8 wpi recovery outcomes using 1 and 2 wpi swim function parameters. This study establishes a new gait quality measurement of neuromuscular health, provides a comprehensive correlative analysis of various functional and cellular regeneration outputs, and will help reduce measurement redundancy in future studies.

Zebrafish
Adult zebrafish of the Ekkwill and AB strains were maintained at the Washington University Zebrafish Core Facility. All animal Frontiers in Molecular Neuroscience 03 frontiersin.org experiments were performed in compliance with institutional animal protocols. Male and female animals 4 months of age and 2-2.5 cm in length were used.

SC transection
Complete SC transections were performed as previously described (Mokalled et al., 2016). Briefly, Zebrafish were anaesthetized in 0.2 g/L of MS-222 buffered to pH 7.0. Fine scissors were used to make a small incision that transects dorsal muscle and spinal cord tissues 4 mm caudal to the brainstem region. Complete transection was visually confirmed using forceps at the time of surgery. Injured animals were also assessed at 2 or 3 dpi to confirm loss of swim capacity post-surgery.

Swim behavior recording
Two fish at a time were placed in a 5 L swim tunnel device (Loligo, cat# SW100605L, 120 V/60 Hz). A customized physical divider was secured in the center of the swim chamber parallel to the flow, separating the tunnel into two chambers to enable individual tracking of each fish. A camera was placed directly above the tunnel and recorded videos at 70 frames per second. Each 15-min assay included three 5-min periods of increasing water current velocity at 0, 10, and 20 cm/s.

Swim endurance assay
The swim endurance assay performed in the prediction experiment was performed as previously described (Klatt Shaw et al., 2021). Briefly, zebrafish were exercised in groups of 8-12 fish. After 10 min of acclimation inside the enclosed tunnel, water current velocity was increased every 2 min and fish swam against the current until they reached exhaustion. Exhausted animals were removed from the chamber without disturbing the remaining fish. Swim time and current velocity at exhaustion were recorded.

Statistical analysis
Most statistics were performed in GraphPad Prism. 1 Metric cluster significance (Figure 1 and Supplementary Figures S6, S7) was tested using R (Team RC, 2021) version 4.0.4 and sigclust2 (Kimes et al., 2017) version 1.2.4. To test differences between outcome prediction groups, we used independent t-test in SciPy  version 1.7.3. Plots were generated using Matplotlib (Hunter, 2007) version 3.4.3 and Seaborn (Waskom, 2021) version 0.12.1, and were compiled and stylized using Adobe Illustrator.

Video processing and pose annotation
We normalized each video and subtracted the background. Because a divider separated two fish in each assay, we separated the left and right sides of the video leaving one visible fish in each normalized video. We trained a DeepLabCut model to identify 10 points on the dorsal centerline, from the head to the base of the tail fin, and a point near the tip of the tail fin ( Figure 2C) (Mathis et al., 2018;Nath et al., 2019). To smooth the poses, we fit cubic splines to each computer-annotated pose and resampled 10 evenly spaced points from the spline. We filtered away poses that were likely incorrectly annotated according to the following criteria: DeepLabCut likelihood score (require >0.5 at all keypoints), total pose length (require within 8 median absolute deviations from the median length), pose curvature (require z-score < 8 at each angle position), and whether the pose was too far from annotated poses in adjacent frames (require movement within 45 pixels at all keypoints).
Angles along the centerline were calculated using triplets of adjacent keypoints on the fish's centerline (see keypoint and angle positions in Figure 2C). We called this sequence of angles an angle pose. For example, to calculate the angle at Point B from three sequential keypoints A, B, and C, the angle at B is how far Line AB must rotate to be parallel to Line BC. In this manner, each 10-keypoint pose was reduced to an angle pose with eight measured angles. Eight angle positions have been shown to be sufficient to capture ordinary variation in zebrafish posture (Huang et al., 2022). Although other research has used different methods to convert keypoints to angle poses, we chose this representation because the summed angle pose for a resting non-scoliotic fish is close to zero.

Behavior annotation
We annotated many episodes of simplified behaviors: rest (1,355 episodes), cruise (3,243), and clockwise (128) and counterclockwise (165) turns. For the annotation model, we defined "cruise" as a forward swim with three body oscillations minimum. If the fish performed the behavior in the assay, we annotated three cruises per flow speed for every fish's uninjured Frontiers in Molecular Neuroscience 04 frontiersin.org Pairwise comparisons of spinal cord regeneration metrics at 8 wpi. (A) Heatmap of Spearman's rank correlations (r s ) between the cellular and functional measurements taken. Regeneration metrics include swim capacity, swim quality, structural, and neurological measurements. A dendrogram representing similarities between correlation patterns of measurements is shown. Male fish at 8 wpi were analyzed. Fish that could not be measured in all attributes were omitted. Correlations are reported regardless of p-value. For the sake of meaningful clustering, a measured attribute was multiplied by −1 if its average was increased at 1 wpi compared to controls. These attributes are marked with the prefix "(−)" on the label (n = 25). (B-D) One metric each of swim capacity (swim distance), behavior (burst frequency), and gait (rostral compensation) were plotted against glial bridging to demonstrate their correlation. Because the Spearman correlation operates on ranked values, we fit monotonic splines to plots where r s were significant (p < 0.05) to visualize possible associations (Panels B and C: n = 27; panel D: n = 25). (E) Scatter plot showing a strong association between the size of regenerated glial tissue and axon regrowth, proximal and distal (n = 27).
Frontiers in Molecular Neuroscience 05 frontiersin.org Cruise quality quantifications during SC regeneration. (A,B) Cruise periods at a water current velocity of 10 cm/s. Snapshots of swim behavior prior to injury are shown in (A) and at 1 wpi in (B). Overlayed swim forms shown below the separate frames highlight defective caudal movement after SC transection. (C) Experimental schematic to develop quantifiable gait quality measurements. A diagram showing keypoint and angle positions labeled on a fish's centerline. A DeepLabCut model was trained to identify the keypoints, then the curvature between three adjacent keypoints were calculated at each angle position. The rostral region of the fish corresponds to angle positions α 1 to α 5 . (D) Cruise curvature profiles (control, 1 wpi, and 8 wpi) for male fish that regenerated less than 20% of the glial tissue at the lesion site. Each cruise curvature profile represents the mean lateral angular amplitude along the dorsal centerline while cruising. The vertical dotted line separates rostral and caudal positions, demonstrating that acutely injured fish swim with markedly elevated curvature in the rostral portion of their body. (E) Cruise curvature profiles (control, 1 wpi, and 8 wpi) for male fish that regenerated more than 20% of the glial tissue at the lesion site. (F) Quantification of rostral compensation in male fish that regenerated less than 20% of the glial tissue at the lesion site. Rostral compensation represents the displacement between cruise profiles. This score is the maximum distance, on the vertical axis, between rostral positions of a cruise profile from the control profile. Angle positions α 1 to α 5 from Panel D were used to define the rostral region. (G) Rostral compensation scores for male fish that regenerated more than 20% of the glial tissue at the lesion site. (H) Tail beat frequency for male fish in still water (0 cm/s), measured at each assayed week. ANOVA was not significant for tail beat frequencies.
To prepare the data for classification, episodes were split into frames. Each annotated frame's angle pose was concatenated with the six angle poses before and the six angle poses after to create a larger vector, a temporal "pose window, " labeled with the middle frame's annotated behavior. We withheld 25% of the annotated data for validation. Because cruises were overrepresented in our annotations, we oversampled the train and validation datasets such that all behaviors were equally represented with Synthetic Minority Oversampling Technique (SMOTE) (Lemaitre et al., 2017) using 20 nearest neighbors.
We fit a UMAP (McInnes et al., 2018) model (2 components, 50 nearest neighbors) to all pose windows in the training set, then fit a random forest classifier (Pedregosa et al., 2011) to the UMAPtransformed windows for final classification. Finally, because some assays contained unusually high numbers of rest frames incorrectly classified as active behaviors, particularly for severely scoliotic fish, we applied a posture change threshold: if an angle pose differed no more than a certain threshold from either the previous or the next pose, it was labeled as "rest." We optimized this threshold using the same training set. Classifying and thresholding as described resulted in a high number of correctly classified cruises (94.8% training, 94.8% validation) and rests (96.5% training, 95.8% validation). We used this model to assign behavior labels to all frames with high-quality posture as previously described.

Cruise embedding
Taking all annotated cruise episodes in each assay, we performed a five-principal component decomposition on the angle poses, and then created a pairwise distance matrix for these cruise episodes using dynamic time warping. From each distance matrix, we used affinity propagation to select exemplars, or cruises that are most representative of the fish's general behavior. If affinity propagation failed to converge, we randomly sampled at most 16 cruises from the assay. To calculate the embedding for several assays, we calculated a pairwise DTW distance matrix for all exemplar cruises from the assays, then fed the distance matrix into UMAP (McInnes et al., 2018) using 20 nearest neighbors, which is consistent with published work (Mearns et al., 2020). We omitted fish with scoliosis scores higher than 0.35.

Correlation clustering of regeneration metrics at 8 wpi
Measurements from 8 wpi assays were scaled to comparable ranges using StandardScaler from scikit-learn (Pedregosa et al., 2011). Spearman correlations (r s ) were calculated pairwise between measurements and a distance matrix of 1-r s was assembled using SciPy . Average linkage hierarchical clustering was performed, and significance between clusters was tested, using sigclust2, which was modified to accept 1-r s as the distance metric.

TCA and fish clustering
A rank-3 tensor was created by concatenating all fish with their measurements in all assays (sorted temporally) in the tracking experiment. Measurements were scaled to comparable ranges using StandardScaler from scikit-learn (Pedregosa et al., 2011). We omitted 6 fish that died before 8 wpi and 10 fish that did not perform a measurable cruise at every assayed week. Tensor component analysis was performed with tensortools (Williams et al., 2018). We compared ranks from 1 to 90 for three varieties of canonical polyadic (CP) tensor decompositions: unconstrained by alternating least squares (cp_als), nonnegative by block coordinate descent (ncp_bcd) and nonnegative by hierarchical alternating least squares (ncp_hals). After comparing model error and replicate similarity for 4 replicates of each rank and model, our chosen combination was rank-7 CP decomposition by alternating least squares ( Figure 3A). We clustered fish according to their factor values using agglomerative clustering with distance threshold of 1.7 using scikit-learn. This distance threshold was chosen by comparing the number of clusters to the minimum cluster size for 1,000 threshold values spaced evenly from 0.001 to 5 ( Figure 3B).

Recovery outcome prediction
The first step in this experiment was to generate predictions that would classify fish into a highly regenerative prediction group and a poorly regenerative prediction group. To this end, a wellness score was generated by combining average distance swum and rostral compensation measurements at 1 and 2 wpi (averaged distance swum at 1 and at 2 wpi and averaged rostral compensation at 1 and 2 wpi). Fish were ranked according to both averages, a rank from high to low for distance swum and a rank from low to high for rostral compensation. The two ranks were added for each fish and a rank median was obtained. Fish were divided in half across the median. The highly regenerative prediction group included animals with combined ranks less than the median. The poorly regenerative 12, 13 fish at control, 1, 2, 3, 4, 5, 6, 7, and 8 wpi assays, respectively. Panels H and I include 30,16,14,18,17,22,21,21, 21 fish at control, 1, 2, 3, 4, 5, 6, 7, and 8 wpi assays, respectively. Error bars depict SEM and statistical significance was determined by Brown-Forsythe and Welch's ANOVA tests with Dunnett's T3 multiple comparisons tests. p-value markers in black represent comparisons between each time point post-injury relative to control measurements prior to injury. Red horizontal bars and p-values marked in red show significance between 1 wpi and 8 wpi. ***p < 0.001; **p < 0.01; *p < 0.05; ns, p > 0.05.

FIGURE 2 (Continued)
Frontiers in Molecular Neuroscience 07 frontiersin.org Tensor component analysis of swim behavior during SC regeneration. (A) Model selection parameters. Plots on the left show model error various ranks (x-axis). Plots on the right show model similarity for various ranks (x-axis). Unlike PCA, TCA is not deterministic. Thus, multiple models were trained and compared. Three model types are shown. To achieve an optimal balance between low model error and high model similarity, we chose a rank-7 canonical polyadic decomposition by alternating least squares (cp_als). (B) Selecting an appropriate distance threshold for clustering. We clustered fish according to their TCA factors using agglomerative clustering. To maximize the number of clusters while keeping a high minimum cluster size, we chose 1.7 as our distance threshold with five clusters identified. (C) Recovery outcomes for the five identified fish clusters, sorted by average glial bridging, low to high, from left to right. Each row's color is normalized such that the darkest blue corresponds to the maximum observation among all fish for that measurement. (D) Factors from a rank 7 tensor decomposition corresponding to each axis of the full data tensor: fish, assays (wpi), and functional measurements. Fish are sorted on the x-axis by their 8 wpi measured percent glial bridging and colored according to the rank of the cluster with respect to average glial bridging. Assays are sorted temporally. Measurements are listed below the plots in descending order. In this figure, 44 out of 60 total fish were analyzed. Sixteen fish were omitted either due to early death (6 fish) or because cruise waveform statistics were insufficient for at least one assay (10 fish).
Frontiers in Molecular Neuroscience 08 frontiersin.org prediction group included animals with combined ranks greater than the median. The second step in this experiment was to experimentally validate the predictions. To this end, glial bridging and axon regrowth were measured and compared between the highly and poorly regenerative prediction groups. All caregivers were blinded to the predicted outcomes.

Measurements of functional and structural recovery Classical function
Perceived swim quality -This score was assigned by observation on a scale from 1 (low quality) to 5 (high quality). We first found the best and worst fish, then scored all fish compared to these. We focused our observation on the first few minutes when the flow started (5 min) and when the flow accelerated (10 min). Our criteria were as follows: 5: Fish's swimming pattern looks normal. Mostly uses tail movement, not its head, to swim. No scoliosis.
4: Fish seems like it can swim at the same rate and speed as those categorized as 5. Slight scoliosis. Slightly less tail movement than 5, and slightly more head movement or "wiggling".
3: Fish cannot swim as effectively as 4. Equal head and tail movement. Scoliosis looks "bent" at about a 45-degree angle.
2: Fish have some tail movement, can rotate their body, but cannot swim forward effectively. Severe scoliosis with tail movement. No swimming once flow started.
1: Fish have no tail movement. Severe scoliosis is observed. No swimming once flow started.
-We treated the above criteria as guidelines because not all fish had all the features as described. For example, a fish could score "3" due to excessive head movement without significant scoliosis.
Mean y-position -Average centroid position along the water flow axis in the swim tunnel. Higher "mean y" was closer to the flow source. It was assumed that exhausted fish would be pushed backward by the flow and have a lower mean-y. We reported mean y-position only for periods of the behavior assay when water was flowing (10 and 20 cm/s). Distance -Sum of frame-to-frame centroid displacement measured in pixels.
In this study we did not adjust distance according to water flow velocity, and we measured during the entire assay at all flow speeds. Activity -Sum of frames where centroid displacement (see Distance) was above a threshold, divided by the total number of frames. In this study we did not adjust activity according to water flow velocity, and we measured during the entire assay at all flow speeds. Centroid burst frequency -We defined a centroid burst as an uninterrupted period of active frames (see Activity). Centroid burst frequency is the number of centroid bursts per minute. We reported this measurement only for periods of the behavior assay when water was not flowing (0 cm/s).
Time against flow -Sum of frames where centroid displacement (see Distance) is above a threshold in the direction of the flow, allowing 45-degree deviation in either direction, divided by the total number of frames where water is flowing. Accordingly, time against flow was only calculated for periods of the behavior assay when water was flowing (10 and 20 cm/s).
Endurance or time to exhaustion -The duration of time that a fish can swim against flowing water until exhausted. Fish allow the fish to acclimate in calm water, then increase the flow speed periodically. When the fish can no longer pull away from a barrier at the back of the tunnel, it is exhausted.

Gait and posture
Pose burst frequency -Same as Centroid Burst Frequency but active frames were defined as those with active posture; that is, for frames not classified as "rest" by our behavior classifier. Although this calculation for activity did not depend on flow velocity, we only reported this value for periods without water flow (0 cm/s) to be comparable with our reported centroid burst frequency. Lateral scoliosis -For each period of rest, or inactive posture, we calculated the average sum of each angle pose, then took the weighted average of these values over the entire swim where weights are the length of the rest periods. Although the calculation would have been essentially equivalent for non-scoliotic fish, we chose to analyze each rest bout separately and average their results rather than taking the average posture over the entire swim because some fish with severely poor recovery could not control their dorsalventral orientation. For example, when a scoliotic fish flipped to its back, its posture inverted; and repeated flipping lead to an artificially lower scoliosis score when posture was averaged over the entire swim. Hence, each period of rest was analyzed separately, then values for all rest periods were averaged as described. Cruise angular frequency -The number of posture oscillations per second while swimming forward. Angular frequency was mostly uniform along the centerline (Supplementary Figure S4A). We computed cruise angular frequency for each of the eight computed angle positions along a fish's centerline, then averaged over the cruise. All cruise values were then averaged to get a single score for each assay. We reported average cruise angular frequency values in Supplementary Figure S4B. Cruise rostral compensation -First, we calculated average angular amplitudes at each angle position along the dorsal centerline during episodes of cruise behavior. We called this a cruise curvature profile.
We calculated a control profile as the average profile of uninjured fish. We defined rostral compensation as the maximum absolute difference between an assay's cruise curvature profile and the control profile at rostral angle positions ⍺ 1 to ⍺ 5 ( Figure 2C).
Frontiers in Molecular Neuroscience 09 frontiersin.org Posture novelty -We trained a Local Outlier Factor (LOF) model using sampled uninjured control poses, then used the model to perform novelty detection on all assays. An assay's posture novelty score was calculated as the number of poses identified as "novel" by LOF divided by the total number of poses in the assay.
-We created a representative training set by sampling 1,200 poses from each control assay: 100 poses from 12 k-mean clusters. K-means clustering was performed separately for each assay.
Tail beat frequency -Using an annotated point near the tip of the caudal fin, we measured lateral extrema, then calculated oscillation frequency using those measurements.
Strouhal number -We calculate tail beat frequencies and peak-to-peak caudal fin tip displacement amplitudes for each cruise episode. Strouhal number (St) was defined as St = ƒA/U, which is tail beat frequency (ƒ) times amplitude (A) divided by forward speed (U) (Taylor et al., 2003). To get average St for one assay, we calculated St for all cruise episodes then took the average of these numbers weighted by the number of periods in each respective cruise.

Spinal cord structure
Glial bridging -GFAP immunohistochemistry was performed on serial transverse sections as previously described (Klatt Shaw et al., 2021). The crosssectional area of the glial bridge and the area of the intact SC rostral to the lesion were measured using ImageJ (Fiji) software (Schindelin et al., 2012). Bridging was calculated as a ratio of these measurements.
Axon regrowth (proximal and distal) -Anterograde axon tracing was performed as previously described (Klatt Shaw et al., 2021). Fish were anaesthetized using MS-222 and fine scissors were used to transect the cord 4 mm rostral to the lesion site. Biocytin-soaked Gelfoam Gelatin Sponge was applied at the new injury site (Gelfoam, Pfizer, cat# 09-0315-08; Biocytin, saturated solution, Sigma, cat# B4261). Fish were euthanized 6 h post-treatment and Biocytin-labeled axons were histologically detected using Alexa Fluor 594-conjugated Streptavidin (Thermo Fisher, cat# S-11227). Biocytin-labeled axons were quantified using the "threshold" and "particle analysis" tools in the Fiji software. Four sections per fish at 0.5 (proximal axon regrowth) and 2 (distal axon regrowth) mm caudal to the lesion core, and 2 sections 1 mm rostral to the lesion, were analyzed. Regrowth was calculated as a ratio of these measurements.

Code availability
Code that analyzes posture data to calculate recovery metrics and predict outcomes as presented in this study are publicly available in a GitHub repository: https://github.com/ MokalledLab/SwimFunction.

A longitudinal study of spinal cord regeneration parameters
We devised a longitudinal study that allowed us to track cellular and swim recovery metrics in individual animals for 8 weeks of SC regeneration ( Figure 4A). Sixty wild-type fish of the Ekkwill/AB strains (30 males and 30 females) were housed separately using physical dividers to separate fish for the duration of the study. Swim behavior was recorded for each fish prior to injury and weekly between 1 and 8 wpi. At each time point, fish were placed in an enclosed swim tunnel and a dorsally placed camera was used to capture swim behavior at 70 frames/s for a total of 15 min at water current velocities of 0 cm/s (5 min), 10 cm/s (5 min), then 20 cm/s (5 min). At 8 wpi and following swim behavior recording, axon tracing experiments and glial bridging measurements were performed to assess cellular regeneration metrics. A total of six fish (3 males and 3 females) died during the experiment (2 females right after surgery, 1 male and 1 female between 3 and 4 wpi, 1 male between 5 and 6 wpi, and 1 male between 6 and 7 wpi). Overall, 90% of the fish (54 out of 60) survived until the 8 wpi experimental endpoint.
To begin to assess SC regeneration parameters in this study, we first calculated previously established swim behavior measurements from the captured swim videos, including five swim capacity measurements ( Figures 4B-F) and one swim quality measurement ( Figure 4G). Functional measurements indicated that zebrafish are capable of recovery from SC transection while isolated from other fish. Swim distance, centroid time active, time against flow and mean y-position decreased with acute injury at 1 wpi relative to controls, then significantly increased between 1 and 8 wpi to approach uninjured control levels ( Figures 4B-E). Centroid burst frequency for male fish decreased at 1 wpi but did not show significant improvement at 8 wpi ( Figure 4F). Similarly, the proportion of fish that swam in a healthy manner, according to perceptually assessed swim quality, decreased after injury and increased through recovery ( Figure 4G). We noted that male fish exhibited this stereotypical recovery trend more strongly than females in this experiment (Supplementary Figures S1A-F). Overall, the female fish in this experiment regenerated poorly (Supplementary Figure S1F) and were less energetic both before and after injury, which is not necessarily typical of zebrafish (Hosseini et al., 2022). For this reason, female fish data are presented in the supplement. These measurements highlighted a need for improved, quantifiable and objective metrics to quantify functional regeneration, and provided a baseline against which newly developed metrics could be compared.

Spinal cord injury disrupts healthy swim gait
While established measurements of swim behavior captured the recovery of swim capacity after SCI, our swim videos showed even more pronounced swim gait differences. Comparing one period of oscillatory forward swim behavior (cruise) before injury and at 1 wpi, we found that acutely injured fish swim using more motion in the rostral portion of their body (Figures 2A,B). We thus postulated that a scalable quantification of gait healthiness would provide a markedly improved functional regeneration parameter compared to established swim capacity metrics and to manually assigned quality scores. To Frontiers in Molecular Neuroscience 10 frontiersin.org Longitudinal tracking of swim recovery after spinal cord injury in adult zebrafish. (A) Schematic representing an overview of the tracking experiment. A total of 60 fish (30 males and 30 females) were housed separately throughout the entire experiment to allow for longitudinal tracking of individual fish throughout the study. Swim behavior was recorded prior to injury, and weekly between 1 and 8 wpi. At each time point, fish were video recorded in a swim tunnel for 15 min. In each 15-min assay, fish were first acclimated in the absence of water current for 5 min (0 cm/s), then water current velocity was increased to 10 cm/s at 5 min and to 20 cm/s at 10 min. (B-G) A suite of established functional measurements were used to assess swim recovery for male fish following SC transection. The swim recovery outcomes for female fish are shown in Supplementary Figure S1. Swim distance (B), activity as measured by centroid movement (C), time swimming against the flow (D), mean y-position in the axis of flow (E), and burst frequency as measured by centroid movement (F) represent swim capacity measurements. Perceived swim quality scores are shown in (G). This figure includes 30,30,30,30,29,29,28,27, 27 fish at control, 1, 2, 3, 4, 5, 6, 7, and 8 wpi assays, respectively. Error bars depict SEM and statistical significance was determined by Brown-Forsythe and Welch's ANOVA tests with Dunnett's T3 multiple comparisons tests. p-value markers in black represent comparisons between each time point post-injury relative to control measurements prior to injury. Red horizontal bars and p-values marked in red show significance between 1 wpi and 8 wpi. ***p < 0.001; **p < 0.01; *p < 0.05; ns, p > 0.05.
Frontiers in Molecular Neuroscience 11 frontiersin.org perform high-throughput gait analysis, we began by annotating dorsal centerline posture ( Figure 2C). After training DeepLabCut (Mathis et al., 2018;Nath et al., 2019) to annotate keypoints on the centerline, we filtered and processed the poses, then trained a classifier to annotate simplified behaviors including rest, turn, and cruise. For simplicity, we defined a cruise as a forward swim with at least five measured extrema, or approximately three body oscillations. Our first approach to probe swim gait was to examine posture variation within healthy and injured animals without regard to behavior. To this end, we used principal components analysis (PCA) to decompose all poses where the fish was not near a wall. PCA was performed for all fish and all assays (Supplementary Figure S2A), separately for males (Supplementary Figure S2B) and females (Supplementary Figure S2C), and at control and recovery endpoints 1 and 8 wpi per sex group (Supplementary Figures S2D,E). Exploring the principal components of control poses, merely three components were required to explain as much as 98% of the variance in both groups. Using poses from 1 wpi, four components were required to capture 98% of the variance. At the end of 8 weeks in recovery, as many as five components were required to capture 98% of the variance. These results indicated that centerline posture increased in complexity after injury and through recovery.
Next, using cruise episodes annotated by the machine learning classifier, we measured body curvature amplitudes and frequencies at each measured angle position. Curvature at each angle position was calculated using the corresponding keypoint position and two adjacent keypoint positions ( Figure 2C). We measured center-topeak (half of peak-to-peak) curvature amplitude at all angle positions during cruise oscillations. Cruise amplitudes along the centerline were plotted for control, 1 and 8 wpi ( Figures 2D,E). At 1 wpi, we observed a significant change in angular amplitude at angle positions 1 to 5 compared to uninjured controls. Cruise amplitudes appeared closer to control values at 8 wpi. These findings indicate that acutely injured fish compensate for paralysis using the rostral portion of their body and that compensation is less pronounced after cellular regeneration. Hypothesizing that fish swim more naturally if they regenerated well, we separately plotted cruise amplitudes for fish that regenerated at least 20% of their glial tissue at the lesion core ( Figure 2E). Well-regenerated fish appeared to swim using amplitudes closer to control values. These results were also observed for female fish, although fewer female fish, 5 females versus 16 males, recovered more than 20% of their glial tissue at the lesion (Supplementary Figure S3B). We quantified maximal rostral compensation and noted that this feature of swim gait does recover toward control levels ( Figures 2F,G). We also measured summed rostral amplitude (Supplementary Figure S4C). Fish with more regenerated SC tissue recovered healthier gait on average, indicated by lower rostral compensation at 8 wpi ( Figure 2G). Individual recoveries were more pronounced: 17 fish at 8 wpi exhibited rostral compensation lower than 3 standard deviations above the control mean, and these fish had high average cellular regeneration: 59% glial bridging, 57% proximal axon regrowth, and 34% distal axon regrowth. All fish with compensation score lower than 0.025 (2.49 standard deviations above the control mean) had at least 20% glial bridge. These results indicate that rostral compensation is most pronounced during earlier stages of SC regeneration and that stronger cellular regeneration is associated with higher physiological swim quality.
In addition to angular amplitude, we also measured cruise frequency, defined as the number of complete oscillations at each angle position per second. Regardless of injury, the rate of movement during cruises was nearly uniform along the fish's body (Supplementary Figure S4A). Like amplitude, average body cruise frequency was also disrupted by injury and improved over time (Supplementary Figure S4B). Although functional abilities appeared different between the sexes according to established functional metrics, there was no evidence that rostral compensation differs between males and females at 1 wpi (Student's t-test p-value = 0.6), suggesting that SC transection affects the gait of both sexes equally and independently of swim capacity differences.
Cruising zebrafish produce thrust by ejecting vortices of water behind them (Mwaffo et al., 2017). Strouhal number (St) is a unitless value related to vortex shedding mechanics and is defined as tail beat frequency times peak-to-peak amplitude of the tail tip divided by speed of forward motion. Cross species research has concluded that St between 0.2 and 0.4 are most physiologically efficient (Taylor et al., 2003). We calculated tail beat frequency for fish swimming in static water (0 cm/s flow velocity) and did not observe a significant change after injury ( Figure 2H). Using displacement amplitude of the caudal fin, fin flick frequency, and swim speed during cruises, we calculated St for all cruises during the first 5 min (0 cm/s flow velocity) of the swim assay. Average St was within or near the efficiency limits throughout the experiment ( Figure  2I and Supplementary Figure S3F). However, we measured tail beat frequency throughout full assays (0, 10, and 20 cm/s flow velocity) and did observe significant affects at 1 wpi, and this measurement recovered by 3 wpi for both male and female groups (Supplementary Figure S4D). We did not measure cruise speed during 10 and 20 cm/s flow velocity periods, so we could not calculate Strouhal numbers for full assays. These results suggested that SCI to match past tense language in our results preclude efficient swim thrust, likely due to compensatory movement in the rostral portion of the body during periods of active cruising.

Injury-induced lateral scoliosis is irreversible by 2 weeks post-injury
Before exploring centerline-derived gait more comprehensively, we had to address injury-induced scoliosis. Although all fish in the experiment appeared healthy before injury, some fish developed extreme body curvature after injury. We quantified scoliosis as the summed curvature at eight angle positions along the fish's dorsal centerline ( Figure 2C) averaged over the entire swim. Representative fish with their scoliosis scores are presented in Figure 5A. Our analysis indicated that of the 30 male and 30 female fish, 4, 2, and 1 male and 4, 3, and 2 female fish presented scoliosis scores >1.34, >2.77, and > 3.28, respectively. Pairwise Spearman correlation between time points showed that relative scoliosis rankings were established at 2 wpi and did not significantly change beyond 2 wpi ( Figure 5B). Fish did not exhibit noticeable scoliosis at 1 wpi, nor did scoliosis scores at 1 wpi correlate with the following weeks. Scores at pre-injury and 1 wpi weakly correlated with subsequent time points since the fish were all straight bodied at the beginning of the experiment and had not developed scoliosis by 1 wpi. The randomness of scoliosis rankings at 1 wpi and stability of rankings after 2 wpi are presented in Figure 5C using trendlines for each fish colored by the fish's rank at a specific point in recovery. As an alternative, unsupervised posture-driven recovery measurement, we used a nearest-neighbors approach to quantify postural abnormality for each assay. Taken as a ratio compared to representative posture observed in preinjury assays, we called this measurement "posture novelty." Posture novelty was closely associated with scoliosis scores. Pairwise rank correlations of scoliosis scores suggest that injury-induced scoliosis is irreversible by 2 wpi, and these results altogether revealed that scoliosis is an important factor in the variation of poses observed in the experiment at 8 wpi (Supplementary Figures S2D,E).

Gait recovery plateaus after 3 weeks post-injury
Because our rostral compensation score is just one feature of complex locomotion, we next set out to comprehensively analyze cruise gate recovery by embedding cruise episodes into a latent space. To reduce the effects of body shape on gait, we omitted fish with a scoliosis score greater than 0.35 at 8 wpi. For computational efficiency, we performed embedding on representative cruise episodes, exemplars, sampled from each assay. To explore the data in posture space, we decomposed poses using principal components analysis. Cruise traces in posture space manifested as ellipses, similar to previously described traces for larval zebrafish (Girdhar et al., 2015;Mearns et al., 2020). We noted that 1 wpi cruise traces are both distinct from preinjury cruises and visually similar for different animals within Assessment of lateral scoliosis among all fish, male and female, in the tracking experiment. (A) Visualization of the scoliosis score. The scoliosis score is the sum of curvature measured at angle positions on the centerline at rest (see methods). To demonstrate how this score relates to body curvature, frames were taken from representative assays identified using k-medoids clustering of scoliosis scores of all assays. (B) Pairwise comparison of scoliosis scores between weeks by Spearman's rank correlation. Scoliosis scores correlate weakly between control and 1 wpi to other assays. Scores are most strongly correlated from 2 wpi onward. (C) A demonstration that scoliosis ranks stabilize after 2 wpi. Scoliosis trend lines for individual fish are plotted over all assays (x-axis), colored by rank at 1, 2, 3, and 8 wpi (top-left to bottom-right). Fish scoliosis trend lines are colored on a rainbow scale from red (most severe) to violet (least), and colored gray if the fish did not survive to the ranked week. This figure includes 60, 58, 58, 58, 56, 56, 55, 54, 54 fish at control, 1, 2, 3, 4, 5, 6, 7, and 8 wpi assays, respectively. Frontiers in Molecular Neuroscience 13 frontiersin.org the same time point ( Figure 6A). Then, we embedded cruise traces using UMAP for three-dimensional visualization. We plotted cruises from fish that regenerated well, those that recovered at least 20% glial tissue at the lesion ( Figure 6B), separately from cruises of fish with relatively poor cellular regeneration ( Figure 6C). To interpret this embedding, average UMAP values at each time point for decomposed cruise episode exemplars were plotted for highly ( Figure 6D) and poorly ( Figure 6F) regenerating fish. For both groups, average UMAP values exhibited the most change by 3 wpi. Similarly, for both highly and poorly regenerating fish, reduction of rostral compensation slowed around 3 wpi (Figures 2F,G and Supplementary Figure S4C). Kernel density estimates were calculated for each time point in each UMAP dimension, separated by cellular regeneration outcome ( Figures 6E,G). According to the UMAP kernel density estimates, 8 wpi cruises did not inhabit the same embedding space as preinjury cruises. Cruises for female fish were embedded in the same space and the results were visually similar ( Supplementary Figures S5A-G). This temporal cruise embedding suggested that gait recovers to the greatest extent by 3 wpi and that injury-induced gait changes are incompletely resolved at 8 wpi.

Selected functional measurements correlate with cellular repair at 8 weeks post-injury
We next explored relationships between the full array of functional and cellular regeneration metrics at 8 wpi. We measured Spearman correlations between all 8 wpi measurements, pairwise, then performed hierarchical clustering on the correlation matrix ( Figure 1A). While not all measurements correlated well with cellular regeneration metrics, some did, including quantifications of capacity, behavior, and gait. Selected measurements of these classes were plotted against glial bridging: swim distance, a swim capacity measurement ( Figure 1B); burst frequency quantified using active posture, a behavior measurement ( Figure 1C); and rostral compensation, a gait quality measurement ( Figure 1D). Percent glial bridging correlated strongly (r s > 0.6) with both proximal and distal axon regrowth ( Figure 1E). Assays could only be included in the heatmap if the fish exhibited every measurable attribute, and because two fish did not cruise in the 8 wpi swim assay, their data was omitted from the heatmap in Figure 1A. There were also three male and three female fish that did not survive to the end of the experiment. Hence correlations differ slightly between Figures 1A-E.
Comparing pairwise correlations at 8 wpi, swim capacity and behavior measurements generally correlated strongly with one another and resided in a swim capacity associated cluster that we labeled Cluster 2 ( Figure 1A). Such measurements include distance, activity, pose burst frequency, and time swimming against the flow. Mean y-position correlated moderately with time swimming against the flow, but weakly with the other swim capacity measurements. Most, but not all, capacity measurements were at least moderately (r s > 0.3) correlated with glial bridging and axon regrowth. At 8 wpi, tail beat frequency, which did not change significantly after injury or through recovery ( Figure 2H and Supplementary Figure S3E), did not correlate well with any other functional, structural, or cellular measurement. A separate cellular regeneration associated cluster, labeled Cluster 1, contained all cellular regeneration measurements, rostral compensation, perceived swim quality, scoliosis, and posture novelty. Unlike the swim capacity associated cluster, all metrics in Cluster 1, were at least moderately, positively correlated with each other. Of all functional metrics, rostral compensation correlated most strongly with perceived quality and percent glial bridging, and with axon regrowth to the same extent as posture novelty. Together, this analysis showed that not all the swim capacity metrics we measured were representative of the SC's condition at 8 wpi, and that rostral compensation is a neurologically associated measurement of gait quality.
As previously described, female fish in this experiment regenerated more poorly than male fish. Nonetheless, a similar clustering of 8 wpi measurements from female fish yielded similar correlation patterns and clusters (Supplementary Figure S6A). Spearman rank correlation of swim distance, pose burst frequency, rostral compensation, and axon regrowth with glial bridging did not reach statistical significance for female fish (Supplementary Figures S6B-E).

Tensor decomposition of all assay measurements corresponds with 8 wpi outcomes
We applied tensor component analysis (TCA) to explore recovery trajectories. To prepare the data, we concatenated measurements from all 9 assays of all 60 fish into a rank-3 tensor. The software that we used for TCA did not allow missing values, and we decided not to use interpolation, so 16 fish (6 male and 10 female) had to be omitted. We selected parameters for the model by optimizing for low model error and high (>0.8) model similarity ( Figure 3A). After selecting parameters for the model, we obtained 7 tensor components including factors for each axis: fish, assay, and functional measurement ( Figure 3D). To visualize factors, we sorted fish by the size of their glial bridge at 8 wpi and sorted assays temporally. By manual inspection, values for many fish factors showed a directional trend, implying that the trajectories captured in the factor values represented a functional output relevant to neurological recovery. We explored this relationship further by clustering fish according to their factor values. We selected a distance threshold parameter that yielded the most clusters given a high minimum allowed cluster size ( Figure 3B). The five resulting clusters of fish were roughly the same size, including between 7 and 11 fish in each cluster. Cluster averages for measurements taken at 8 wpi were plotted in a heatmap, with clusters sorted by average glial bridging ( Figure 3C). When ordered by average glial bridging in the cluster, clusters also sorted according to average scoliosis, posture novelty, perceived quality, and rostral compensation. In the same ordering but omitting cluster 1, clusters 2 to 5 also sorted according to average measurements of axon regrowth (proximal and distal), swim distance, activity, time against flow, posture burst frequency, and mean y (but in the opposite direction than expected). The only measurement averages that were not sorted in this ordering were centroid burst frequency and tail beat frequency. Fish factor values in Figure 3D were colored by the fish's cluster according to the cluster's average glial bridging. We expected that assay factors would exhibit a displacement-to-recovery trend from 1 to 8 wpi, mimicking the recovery trend of most functional metrics (Figures 2F, 4B-G). Although some assay factors did capture this trend, many diverged away from control through recovery, and the values of TC1 and TC2 Frontiers in Molecular Neuroscience 14 frontiersin.org did not change dramatically from control until 2 wpi, capturing a trend more similar to the scoliosis score ( Figure 5C). We interpret the diversity of assay factor trendlines to represent complexities in the differing biological signals of the functional measurements and longitudinal support for non-uniformity of 8 wpi metric correlation signals shown in Figure 1A. Overall, tensor component analysis and fish factor clustering indicate that recovery trajectories correspond strongly with 8 wpi cellular regeneration measurements.
Swim function at 2 weeks post-injury is predictive of cellular regeneration at 8 weeks Swim distance and rostral compensation were two functional measurements that most correlated with SC regeneration at 8 wpi. Swim distance and rostral compensation measure different functional classes: swim capacity and gait quality, respectively. They also clustered separately in the pairwise metric analysis and recovered at different rates. Thus, as distinct functional outputs that correlate well with cellular regeneration, we hypothesized that a combination of swim distance and rostral compensation assessed during early stages of SC regeneration could predict injury outcomes at 8 wpi. To test this hypothesis, we averaged 1 and 2 wpi distance and rostral compensation measurements and plotted them against one another colored by 8 wpi glial bridging ( Figure 7A). As expected from the correlation analysis, fish with high glial bridging generally swam longer distances and with lower rostral compensation. We ranked fish according to swim distance and negative rostral compensation, then added the two ranks to create a wellness score for early recovery. We divided male and female data separately into two equally sized groups across each sex's wellness score median: a highly regenerative prediction group and a poorly regenerative one. To assess the prediction outcomes, we then measured and compared glial bridging and axon regrowth parameters between the highly and poorly regenerative prediction groups. We found that percent glial bridging and proximal axon regrowth were significantly higher in the cohort that was predicted to regenerate most successfully ( Figure 7B). Since this analysis was performed after our tracking experiment was completed and final outcomes were measured, a new experiment was performed to validate the prediction method.
In the prediction experiment, we predicted regeneration outcomes for 60 (30 male and 30 female) fish using the same wellness score described above ( Figure 7C). Swim behavior was assayed before injury in addition to 1, 2, and 8 wpi. Fish were briefly housed in male-female pairs to track their identities until swim assays were performed at 2 wpi. Predictions were made separately for males and females, then fish of both sexes were mixed randomly between tanks within the prediction groups, 5-7 fish per tank. Predictions were made using the median wellness scores in the prediction experiment to divide the groups ( Figure 7D). At the end of the prediction experiment, four fish (1 male and 3 females) died in the group predicted to regenerate well, and none died in the group predicted to poorly regenerate. Thus, our final comparisons included 26 and 30 fish in the highly and poorly regenerative cohorts, respectively. At 8 wpi, glial bridging was significantly elevated in the highly regenerative prediction group compared to the poorly regenerative prediction group ( Figure 7E). The results of this prediction experiment indicated that it is possible to predict 8 wpi cellular regeneration outcomes from a subset of 2 wpi measurements.
We clustered the 8 wpi functional and regeneration measurements in the same way as we did for the tracking experiment. In doing so, we discovered that endurance, a measure of swim capacity that was not evaluated at any other timepoint or in the tracking experiment, was a member of the neural health-associated cluster, Cluster 1, not the swim capacity cluster (Supplementary Figure S7A). Unlike the tracking experiment, swim distance and pose burst frequency were not associated with bridging to the same extent (Supplementary Figures S7B,C), and axon regeneration was measured lower than expected for all fish (Supplementary Figure S7E). Rostral compensation, however, still correlated more strongly with glial bridging than any other measurement (Supplementary Figure S7D). These findings provided additional evidence that this rostral compensation score is a neurologically associated gait quality measurement, and suggested that results derived from gait quality replicate more reliably than those derived from swim capacity.

Discussion
This study explores connections between functional and cellular regeneration measurements during SC regeneration in adult zebrafish. Fish were individually housed to enable their longitudinal tracking for 9 weeks. In comparison with alternative methods of tracking fish identities such as fin clipping, dye injection, passive integrated transponder tagging or skin pattern recognition, physical separation was the method of choice to avoid introducing additional injuries or imaging steps to our experimental pipeline (Delcourt et al., 2018). It is important to note that, compared to the well-known elevated regenerative capacity of zebrafish SC tissues, regeneration efficiency was reduced in this cohort of 60 fish. Although it remains to be determined whether physical separation negatively impacts SC regeneration, we propose that our previously established injury and post-operative standards, including group housing, support optimal regeneration conditions (Klatt Shaw et al., 2021;Saraswathy et al., 2022). Even in such conditions where functional recovery is expected to continue to 8 wpi, some fish experience negligible functional improvement after 6 wpi (Becker et al., 1997). However, our purpose was not to demonstrate SC regenerative capacity in zebrafish, but to compare traditional and new functional measurements and their associations with structural recovery. Our fish exhibited significant recovery up to 6 wpi, glial and axon bridging were highly correlated, and all three measurements of cellular regeneration showed similar correlation patterns with examined functional and structural metrics. Although functional recovery appeared different between the sexes, we saw no evidence that the cruise gait of males and females are affected differently by SC transection, comparing male versus female rostral compensation scores at 1 wpi using Student's t-test (pvalue = 0.6). Thus, irrespective of whether housing conditions for this study were detrimental to recovery, the broad range of regeneration observed was not only well suited, but also retrospectively ideally tailored, for our purposes. Our tracking experiment allowed us to perform comprehensive correlative analyses of recovery metrics over a wide range of regeneration parameters.
Our study introduces a rostral compensation score as a scalable quantification for gait quality. In both the tracking and prediction Frontiers in Molecular Neuroscience 16 frontiersin.org Predicting 8 wpi regeneration outcomes using measurements taken by 2 wpi. (A) Tracking experiment: swim distance versus rostral compensation was averaged between 1 and 2 wpi. Dots represent individual fish and were colored based on the extent of glial bridging measured at 8 wpi for each fish. Fish that would develop larger glial bridges tended to swim further and exhibit less rostral compensation, in lower right side of each graph. Each fish was assigned a prediction score by adding its rank according to average swim distance to its rank according to average negative rostral compensation, relative to its sex group (Predicted poorly n = 30; predicted well n = 28). (B) Tracking experiment: 8 wpi glial bridging and axon regrowth outcomes for groups ranked high in swim distance and low in rostral compensation between 1 and 2 wpi ("high") compared to those ranked low in swim distance and high in rostral compensation between 1 and 2 wpi ("low") (Predicted poorly n = 27; predicted well n = 27). (C) Schematic overview of the prediction experiment. A total of 60 adult fish (30 males and 30 females) were housed in male-female pairs to track their identities until low/high regeneration predictions were assigned, then housed in prediction groups. At 8 wpi individuals were separated again to correlate final measurements from the endurance and behavior assays with cellular regeneration. Behavior was assayed before injury, 1 wpi, 2 wpi, and 8 wpi. Predictions were made, as described, after the 2 wpi behavior assay (Predicted poorly n = 30; predicted well n = 28). (D) Prediction experiment: swim distance versus rostral compensation was averaged between 1 and 2 wpi. Dots represent individual fish and were colored based on the predicted outcome. (E) Prediction experiment: 8 wpi glial bridging and axon regrowth outcomes for each prediction group (Predicted poorly n = 30; predicted well n = 26). Statistical significance in panels B and E was determined by Student's t-test. p-values represent comparisons between prediction groups. ***p < 0.001; **p < 0.01; *p < 0.05; ns, p > 0.05. experiments, rostral compensation correlated more closely with glial bridging than any other measurement at 8 wpi. Compared to previously established functional metrics (perceived quality score) that better correlated with axon regrowth at 8 wpi, rostral compensation was more correlated with glial bridging (0.81) than axon regrowth (0.66 and 0.64). Intriguingly, functional measurements at 2 wpi predicted the size of the glial bridge more significantly than the amount of axon regrowth. These observations highlight a central role for glial cells during early stages of regeneration, and suggest establishing functional neuronal connections is a more gradual regenerative process that extends throughout the regeneration time course. The strong correlations we observed between rostral compensation and cellular regeneration measurements support a model in which rostral compensation reflects the compensatory effort exerted by paralyzed fish to produce sufficient thrust to move. Whether fish optimize their Strouhal number by learning to adjust the appropriate amount of rostral compensation or whether the optimal Strouhal number is physiologically enforced by the natural elasticity of a fish's body remains to be explored (Beal et al., 2006). The calculation of rostral compensation was entirely automated after training a classifier to annotate cruise behaviors from centerline posture. As a recovery metric in the tracking experiment, average rostral compensation scores showed 50% recovery at 8 wpi.
Notable and significant changes in rostral compensation occurred by 3 wpi, suggesting a threshold of cellular regeneration is required for healthy functional outcomes and that cellular regeneration beyond 3 wpi has a diminished effect on functional recovery. Although the rostral compensation measurement described in this study is specific to our injury model where SC lesions were performed 4 mm caudal to the brainstem region, our methods are easily applicable to other SC lesions along the rostro-caudal axis of the fish. Moreover, since fish locomotion is produced by serial muscle segments along the rostro-caudal axis, we predict cruise shapes and rostral compensation may also apply albeit to different extents to other injury locations along the SC tissue, with caudalmost injuries inducing the least effect on swim gait. Overall, our findings show that rostral compensation is a newly established gait quality metric that recovers earlier than swim capacity, a valuable functional readout that highly correlates with glial bridging, and a prediction tool for cellular and functional regeneration outcomes. To achieve a more comprehensive analysis of cruise gait recovery beyond single gait features such as rostral compensation, cruise episodes were embedded with UMAP using dynamic time warping distances. Surprisingly, even after selecting for fish that showed elevated regeneration metrics, 8 wpi cruises showed a clearly distinct distribution compared to control cruises prior to injury. These findings suggest that some injury-induced gait feature persists for many fish after apparently successful recovery. When an abnormal swim gait develops during recovery, it could be due to mistaken axon connections or suboptimal tissue remodeling. Specific SC neurons and regions are known to be associated with aspects of zebrafish locomotion (Bagnall and McLean, 2014;Barrios et al., 2020). After SC transection, as axons reconnect, fast and slow V2a interneurons regrow axons along the rostro-caudal axis, connecting to neurons of the same type and enabling specific features of functional recovery (Huang et al., 2022). In addition to axon regrowth, it is estimated that as much as a third of SC tissue shows evidence of cell division during SC regeneration (Reimer et al., 2008). Moreover, recent mammalian studies indicate that certain neurons required to restore walking after SC injury are not the same as the neurons used for the same behavior before injury (Kathe et al., 2022). Together, these various modes of cellular regeneration may explain why, given the natural variation in recovery outcomes, the kernel density estimates of UMAPembedded cruises did not completely overlap with those of uninjured control cruises. We propose that differential swim gait development during the recovery process could be due to misguided axon regrowth or suboptimal tissue remodeling, and that further cellular and behavioral regeneration studies are needed to better understand the cellular basis of swim recovery in zebrafish.
We performed a separate experiment to explore the hypothesis that rostral compensation and swim distance measurements at 1 and 2 wpi can be used to predict 8 wpi cellular regeneration outcomes. The prediction experiment, while not completely successful at predicting significantly different outcomes for both glial bridging and axon regrowth, nonetheless provides a proof of concept for future work. In both the tracking and prediction experiments, glial regeneration outcomes were significantly different, which indicates that early functional measurements can be predictive of cellular regeneration measured 6 weeks later. Moreover, our prediction experiment provides validation for the rostral compensation score as a neurologically meaningful functional metric, and evidence that swim endurance, which was not evaluated in our tracking experiment, is also associated with neurological health. Importantly, both the tracking and prediction experiments support our conclusion that rostral compensation provides the strongest correlation with cellular regeneration than any other functional measurement that we examined. Comparing the two experiments, we likely overestimated swim distance's predictive power, and knowing that gait recovers relatively early, rostral compensation alone may be the best metric for outcome prediction, which remains to be tested.

Conclusion
Our study supports standard functional analysis, demonstrating that recovered swim capacity measurements correlate with spinal cord regeneration. We introduce rostral compensation as a gait-driven measurement that correlates more strongly with and likely provides a more accurate functional proxy for spinal cord regeneration than existing functional regeneration metrics. Through posture analysis, we discovered that the fish that would develop injury-induced lateral scoliosis had a set trajectory by 2 weeks following SC transection. We found that, in still water, fish swam in a mechanically efficient manner both before and after injury. Finally, we discovered that grouping fish according to their rank in functional attributes 2 weeks into recovery can divide the fish into groups that have statistically divergent cellular regeneration outcomes at 8 weeks post-injury. We propose that developing a gait-driven prediction algorithm could offer powerful benefits to the zebrafish research community such as non-invasively tracking musculoskeletal wellness or reducing the time required to complete SC regeneration experiments.

Data availability statement
The original contributions presented in the study are included in the article/Supplementary material, further inquiries can be directed to the corresponding author.