Computer-assisted beat-pattern analysis and the flagellar waveforms of bovine spermatozoa

Obstructed by hurdles in information extraction, handling and processing, computer-assisted sperm analysis systems have typically not considered in detail the complex flagellar waveforms of spermatozoa, despite their defining role in cell motility. Recent developments in imaging techniques and data processing have produced significantly improved methods of waveform digitization. Here, we use these improvements to demonstrate that near-complete flagellar capture is realizable on the scale of hundreds of cells, and, further, that meaningful statistical comparisons of flagellar waveforms may be readily performed with widely available tools. Representing the advent of high-fidelity computer-assisted beat-pattern analysis, we show how such a statistical approach can distinguish between samples using complex flagellar beating patterns rather than crude summary statistics. Dimensionality-reduction techniques applied to entire samples also reveal qualitatively distinct components of the beat, and a novel data-driven methodology for the generation of representative synthetic waveform data is proposed.

: Measurements of storage and loss moduli for the methyl cellulose medium at various frequencies.
We observe that both the storage and loss moduli, shown as light and dark squares respectively, are wellapproximated by a linear viscoelastic Maxwell model. Error bars corresponding to the standard deviation of measurements are shown for each of the moduli, though only two such bars are visible at the resolution of this figure.

Sample preparation
All bovine semen samples were kindly provided by Genex Cooperative, Inc. Sample A was a fresh semen sample from one bull, from which the beats of 79 sperm were captured. Shortly after semen collection, 1 mL of bovine semen sample was diluted in 5 mL of warm TALP, and then processed identically to Tung et al. [2]. Sample B was a frozen semen sample from another bull, from which the beats of 137 sperm were captured. Notably, as Samples A and B differ in both their handling and their source animal, we will not seek to draw biological conclusions from any further observed distinctions between them, and place emphasis wholly on the comparative methodology presented in this work that is exemplified by the consideration of these two samples. After collection, the semen was first diluted in OptiXcell extender (IMV t Technologies, L'Aigle, France), and then frozen according to the standard procedures followed at Genex [3]. The thawing process is similar to our previous procedures for thawing frozen semen straws [4]. The frozen semen was first thawed in a water bath at 37 • C for 30 seconds, and then transferred on top of two layers (40% and 80%) of BoviPure diluted in BoviDilute. The live sperm were separated from the rest of the fluid by centrifugation (100 x g for 10 minutes), as they formed a pallet at the bottom of the tube. After removal of the supernatant, 3 mL of TALP was added and followed by another centrifugation (100 x g for 3 minutes) to wash the sperm pallet. 100 µL of TALP was added to the sperm pallet to make the suspension, which was kept in an incubator maintained at 38.5 • C with 5% of CO 2 .

Image acquisition and experimental setup
Our previously developed microfluidic device [5] was adapted for imaging to create a well-controlled, no-flow environment. Before the experiments, devices were filled with a 1% MC solution and kept for at least 2 hours in an incubator at 38.5 • C with 5% of CO 2 . Sperm suspension was then seeded onto the 2 mm access hole of the device and sperm were allowed to swim inside the device. The microfluidic chamber is 100 µm deep, and we captured videos close to the lower surface by a scientific CMOS camera (ANDOR Neo for sample A (fresh) and Zyla for sample B (frozen)) at their respective highest frame rates (135-165 frames per second), in conjunction with an inverted microscope with phase contrast and NIS-Elements software. Given an estimated 20 µm depth of the focal plane, only vague shadows of sperm swimming close to the upper surface were seen. The devices were maintained at 38.5 • C during the experiments.
2 Tracking and smoothing of flagellar waveforms

Tracking and selection
Videomicroscopy data is processed using the TrackMate plugin included in the popular software package Fiji [6][7][8], with TrackMate automatically tracking the locations of the spermatozoa between frames by identifying their cell bodies. Individual swimmers are then isolated using bespoke Fiji macros, utilising automatic local thresholding to segment individual swimmers into binary masks. Typically, swimmers were approximately one cell length away from other individuals. In detail, written in the form of the ImageJ Macro language, the preprocessing performed constituted of the following operations: run ("32 -bit ") ; im = getImageID () ; run (" Z Project ..." , " projection =[ Average Intensity ]") ; avg = getImageID () ; i ma ge Ca l cu la tor (" Divide stack 32 -bit " , im , avg ) ; selectImage ( avg ) ; run (" Close ") ; selectImage ( im ) ; run (" Smooth " , " stack ") ; run (" Unsharp Mask ..." , " radius =5 mask =0.80 stack ") ; run (" Enhance Contrast ..." , " saturated =0.3 normalize process_all ") ; run (" Remove Outliers ..." , " radius =5 threshold =50 which = Bright stack ") ; run (" Minimum ..." , " radius =1 stack ") ; run ("8 -bit ") ; run (" Auto Local Threshold " , " method = Phansalkar radius =15 parameter_1 =0 parameter_2 =0 stack ") ; These processing steps correspond to a background subtraction, smoothing and contrast-enhancing, noise reduction, and local thresholding to produce a binary mask. We note that bespoke preprocessing of swimmers into a binary mask is likely required for other datasets. Each swimmer mask is then processed using the fully automated scheme of Walker et al. [9], with flagella being identified by their approximately consistent visible width. The resulting digital representations of the flagella, validated by eye and consisting of pixel locations of the flagellum in each frame, are screened to accept only those where the observable flagellum length, projected onto the focal plane of the microscope, varied by less than 10% of the maximum over multiple beating periods. Of these accepted individuals, frames containing digitised flagella of captured length greater than this 90% threshold were truncated in space to enforce uniformity whilst avoiding the need for extrapolation. This truncated flagellar length represents the true flagellar length to within approximately 10%. Reliably reporting the true flagellar length is precluded by difficulties in imaging the most-distal region of the flagellum, an issue common in the microscopy of flagellates though here limited to approximately the distal 10%.

Spatial and temporal smoothing
With the data by construction reporting spatiotemporal information for approximately 90% of the visible flagellum for each swimmer, pixel locations are identified with Cartesian xy coordinates, translated and rotated so that the proximal flagellar end is both at the origin and aligned along the horizontal axis (1, 0), as illustrated in Figure 1 of the main text (lower left), hence quantifying flagellar motion relative to the swimmer body. Each flagellum is parameterised by arclength and time, and smoothing in both space and time performed using smoothing splines and Gaussian convolutions, respectively, in the software package MATLAB ® . Owing to infrequent erroneous results of the flagellar identification and tracking process, a low proportion (less than 10%) of frames corresponding to each individual swimmer are omitted from temporal smoothing due to such errors.
Instead, for these rare frames, flagellum data is linearly interpolated from the preceding and following frames, and we note in particular that the frame rates are sufficiently high so as to preclude significant interpolation errors. All smoothing and interpolation is validated by visual comparison with the unsmoothed data.
In more detail, the raw Cartesian coordinates of captured waveforms were first smoothed in space using the MATLAB smoothingspline fit type with smoothing parameter 0.005. Waveforms were then resampled at 1000 material points up to 90% of the maximum recorded flagellum length. The effects of noise on this computed maximum length were first reduced by taking a moving arithmetic mean with a window size of 60 frames. Beating patterns were then aligned such that in a single frame the base of the flagellum was parallel to some fixed axis, here the Cartesian x-axis. Subsequent frames were then reoriented so as to minimise the sum of the squared differences of the coordinates of the proximal 20% of the flagellum, verified by eye in all cases to successfully align the proximal regions of the flagellum.
Temporal smoothing then proceeded by the interpolation of any missing frames due to noted infrequent errors in the tracking and spatial alignment process via linear interpolation using scatteredInterpolant. This interpolation was performed on the smoothed angle parameterisation of the waveform, itself parameterised by 1000 material points and typically hundreds of frames, with smoothing taking place via a MATLAB default Gaussian filter with normalised standard deviation of unity. Following interpolation, a circular disk averaging filter of dimensionless radius two was convolved with the angle parameterisation, itself parameterised by discrete frames and arclengths. The approximate beating period and frames over which such periodic beating occurs were calculated from this smoothed data using the script find period.m, as may be accessed according to the data access statement found in the main text, following the approach as described in the main text. The angle parameterisation was then truncated in time over this period and resampled at 100 timepoints via cubic interpolation. Finally, a smoothing Gaussian filter of normalised standard deviation five was convolved with the approximately periodic resampled angle parameterisation, padding circularly in time and replicating in space. The results of spatial and temporal smoothing, including period identification, were verified by eye in all cases.
We note that the methodologies presented in the main text for comparative quantitative waveform analysis and synthetic waveform generation are not reliant on the details of the smoothing used in this study, and may be generically applied to captured waveform data.