# Beads above cultured airway cells can move in different directions yet follow a predictable pattern

Beating cilia, the hairlike structures on airway cells, help move fluid along the airways. Researchers track beads above cultured airway cells to see how well that transport works. When beads move in different directions across a microscope field, their velocities can average to nearly zero. The average looks much the same whether each bead changes direction unpredictably or beads in different parts of the field follow a flow that bends in a consistent way.

We tested this distinction in cultures from people with primary ciliary dyskinesia (PCD), an inherited disorder of ciliary function. Five PCD fields showed weak alignment and had enough moving beads to assess direction. In four of the five, a bead's position helped predict which way it would move. A smooth map of bead velocities fitted to the first 1.5 seconds of each recording predicted the directions of other beads in the last 1.45 seconds better, on average, than using one direction everywhere. Both eligible fields from healthy donors showed this pattern too.

## Measuring alignment and persistence

Hadas and colleagues tracked fluorescent beads above cultured airway cells from 14 people with PCD and 10 healthy donors. Their study, CiliaTracks, used bead speeds and directions to distinguish affected from unaffected cultures. They described rapid ciliary beating but disorganized bead transport in cultures associated with DNAH11, a gene that encodes part of the motor that drives ciliary beating. [1] Flow also varies from place to place in normal airway tissue and cultures. [2,3]

We used the CiliaTracks recordings to ask whether flow at a given position persisted even when the beads showed little overall alignment. We measured alignment in the late part of each recording by adding the bead velocities as vectors and dividing the length of their sum by the sum of their lengths. This score, called polarization, equals one when all beads move in the same direction and approaches zero when their velocities cancel.

To test persistence, we split the bead tracks into two groups. We used early velocities from one group to predict late velocities in the other, then exchanged their roles. A 1.5-second gap separated the early and late windows. We measured the error in predicting velocity (vector error), which takes both speed and direction into account. To score direction alone, we used late tracks with at least three pixels of fitted movement. The directional error, or angular loss, is one minus the cosine of the angle between the predicted and observed velocities. It is zero for a correct direction, one for a perpendicular direction and two for the opposite direction.

We compared three ways of mapping early velocities. The simplest predicts the same velocity everywhere (uniform). The next allows velocity to change linearly with position (affine). The third allows the flow to bend smoothly across the field by fitting a quadratic function of position to each velocity component. For both the affine and quadratic maps, we also tested a correction based on nearby tracks: if the map missed their early velocities in a consistent way, did that difference help predict a late bead's velocity at a similar position? We compared predictions on the same late tracks.

## Results

### Direction predictions in weakly aligned fields

The analysis covered 40 recordings with 39,106,667 bead positions. The initial sample comprised eight DNAH11 recordings from four donors and one recording from each of 20 other donors. The internal validation sample comprised a further 12 DNAH11 recordings from three of the four donors. Five of the 20 DNAH11 fields had both weak alignment (polarization below 0.5) and enough movement to assess direction (at least ten moving targets per split). Each field has a recording identifier, such as Rep101, in Table 1.

Table 1. All fields meeting the alignment and moving-target criteria. The five columns from Uniform through Quadratic + neighbors give angular loss for the same moving targets; lower is better. Each vector gain is the percentage reduction in vector error from adding the neighbor correction to the indicated map, using all targets regardless of movement. Each split contributes equally. “Normal” denotes a healthy donor.

| Field | Sample | Polarization | Moving targets | Vector gain over affine | Uniform | Affine | Affine + neighbors | Quadratic | Quadratic + neighbors | Vector gain over quadratic |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| DNAH11 Rep101 | Initial | 0.263 | 66 | +15.2% | 0.462 | 0.519 | 0.237 | 0.168 | 0.206 | +0.8% |
| DNAH11 Rep97 | Initial | 0.427 | 41 | -0.6% | 0.541 | 0.359 | 0.332 | 0.351 | 0.239 | +7.3% |
| DNAH11 Rep66 | Validation | 0.437 | 73 | +12.4% | 0.654 | 0.502 | 0.340 | 0.323 | 0.289 | +1.4% |
| DNAH11 Rep102 | Validation | 0.479 | 56 | +8.1% | 0.361 | 0.193 | 0.195 | 0.201 | 0.200 | -0.5% |
| DNAH11 Rep27 | Validation | 0.271 | 20 | -5.2% | 0.471 | 0.570 | 0.721 | 0.682 | 0.664 | -4.0% |
| Normal Rep14 | Initial | 0.361 | 36 | +12.6% | 0.615 | 0.474 | 0.389 | 0.373 | 0.351 | +4.7% |
| Normal Rep167 | Initial | 0.213 | 27 | -3.8% | 1.027 | 0.778 | 0.637 | 0.446 | 0.545 | -11.2% |

The smooth quadratic map gave lower mean directional error than a uniform prediction in four of the five DNAH11 fields. In Rep101 and Rep66, from different donors, error fell from 0.462 to 0.168 and from 0.654 to 0.323, respectively. The simpler affine map already described Rep102 well. Rep97 benefited more than Rep101 or Rep66 from adding neighbors to the quadratic map. In Rep27, predicting one direction everywhere outperformed all four predictions that used position.

Of ten healthy fields, four had at least ten moving targets per split and two of those four also had weak alignment. In both weakly aligned fields, the quadratic map predicted direction better than either the uniform or the affine map. Thus even when velocities largely canceled across a field, position helped predict direction in recordings from both groups.

### What nearby tracks added to the maps

Adding nearby tracks to the affine map improved both mean vector error and mean directional error in two of the five eligible DNAH11 fields. Three of the 12 validation fields were eligible: Rep66 improved on both measures, Rep102 only on vectors, and Rep27 worsened on both. In the initial sample, Rep101 improved on both measures and Rep97 only on direction. Among healthy fields, Rep14 improved on both when averaged over splits, although the directional gain reversed in one split. Rep167 improved on direction alone.

In both Rep101 and Rep66, the quadratic map alone predicted late directions at least as well on average as the affine map with neighbors (Table 1; Figure 1). Vector errors were also similar: dividing the error of the affine map with neighbors by that of the quadratic map and averaging the ratio over splits gave 1.01 for Rep101 and 1.05 for Rep66. Adding neighbors to the affine map reduced vector error by 15.2% and 12.4%, respectively. Once the map allowed curvature, neighbors reduced vector error by only 0.8% and 1.4%. They worsened the quadratic direction prediction in Rep101 and improved it in Rep66, mostly in one split (angular loss fell from 0.349 to 0.290, versus 0.298 to 0.288 in the other). A smooth change in flow across the field accounted for most of the predictability in these two recordings.

![Directions predicted from early tracks and observed late in two DNAH11 fields and one healthy field](results/smooth_flow.png)

Figure 1. Each column shows one field. At each moving target's position, the arrow in the top panel gives the direction predicted by the quadratic map of early velocities; the corresponding arrow below shows the observed late direction. All arrows have equal length so the eye can compare direction regardless of speed. The maps use even-numbered early tracks for fitting; Table 1 includes both splits.

Bead displacement matters when interpreting direction. In DNAH11 fields Rep27, Rep9, Rep53 and Rep113, the median fitted displacement in the late window was just 1.2–1.9 pixels. At those distances a small tracking error can change a bead's apparent direction. Conversely, a better velocity prediction can leave direction unchanged. In the strongly aligned field Rep50 (polarization 0.818), adding neighbors reduced affine vector error by 18.9% but left angular loss at 0.179.

### Checks on the spatial predictions

To test whether the quadratic maps depended on where the early beads were, we shuffled early velocities among early locations and refitted each map. In the two splits of Rep101, only 1 and 0 of 999 shuffles matched or beat the directional error of the unshuffled map. The counts were 7 and 2 for Rep66. The healthy fields varied more between splits (4 and 117 for Rep14; 12 and 30 for Rep167).

We also tested the neighbor correction by shuffling the differences between observed early velocities and their affine predictions (the residuals) among early locations. In Rep66, adding neighbors reduced angular loss by 0.076 in one split (37 moving targets) and 0.249 in the other (36). Of 999 shuffles, 47 matched or exceeded the first gain and none matched the second. Resampling the late targets gave paired 95% intervals for the gains of −0.137 to 0.298 and 0.060 to 0.429, respectively. In practice, the weaker split is compatible with no gain. In Rep101 the corresponding shuffle counts were 8 and 0 of 999.

The spatial predictions also survived checks for motion shared across the image and for early and late tracks that might trace the same bead. We subtracted the frame-by-frame motion shared by particles and excluded early paths that passed within 75 pixels of the target's full path. Adding neighbors to the affine map then reduced angular loss from 0.611 to 0.320 in Rep101 and from 0.699 to 0.364 in Rep66. Selecting tracks separately in each time window also preserved the vector gains (14.4% and 18.3%, respectively).

![Effect of adding neighbors to the affine map in all 20 DNAH11 fields](results/paper_dnah11_fields.png)

Figure 2. Effect of adding neighbors to the affine map in every DNAH11 field, grouped by donor. Blue marks the initial sample and orange the validation sample. Positive gains favor adding neighbors. Brackets give moving-target counts. Crosses give vector gains after excluding early paths that approached the target's path, which can leave fewer targets. The dotted line marks polarization of 0.5.

## Methods

### Recording selection

We used the public CiliaTracks track and position tables and the supplementary table linking 602 recordings to 24 donors. [1,4] Hadas and colleagues imaged 1.9-µm beads above cells grown with air on one side and liquid on the other. They recorded at 100 frames per second and 0.67 µm per pixel. An exploratory scan covered 10,334,671 track summaries and 10,836 combinations for spatial testing: 602 fields, three track selections (all tracks, tracks lasting at least 100 frames, or the top 150 by quality), and six measurements (speed, straight-line speed, confinement, displacement, duration and quality). Eleven pilot recordings informed the trajectory predictor and were excluded from both analysis samples.

Within each donor, we ranked the remaining fields by a reproducible sorting key: the Secure Hash Algorithm 256-bit (SHA256) digest of the text “local-order-v1:” followed by the released recording name. We took the first two for each DNAH11 donor and the first for each other donor. For validation we took the next four per DNAH11 donor with unexamined trajectories; none remained for the fourth donor. We retained every selected recording regardless of outcome. All recording summaries had contributed to the exploratory scan. For the comparison of affine predictions with and without neighbors, the vector test was specified in advance for both samples and the direction test for the validation sample. The quadratic comparison was exploratory in both.

### Track selection and velocity

We checked the compressed table lengths and hashes (digital fingerprints). Position counts agreed with track summaries, each track–frame pair was unique, and exported time indices agreed with frame numbers. We selected the 150 tracks with the highest mean quality over the recording, then removed tracks with maximum speed above five pixels per frame. For each track, we fitted horizontal and vertical position against frame by ordinary least squares. The slopes gave velocity in frames 0–149 and 300–444. Within each window we required at least 50 positions, a span of at least 50 frames (last frame minus first), a count-to-span ratio of at least 0.8 and a mean position between pixels 100 and 2203 on both axes. We used all eligible late tracks to measure polarization.

### Velocity maps

We used even-numbered early tracks to predict odd-numbered late tracks, then exchanged the groups. Each split required at least ten early and ten late tracks. To compare maps on the same targets, we required each late target to have at least three early track centers at distances of 75 to less than 400 pixels (approximately 50–268 µm). We kept the nearest eight within that range for the neighbor correction.

The uniform prediction used the median of each early velocity component. For each component the affine map used an intercept and linear terms in horizontal and vertical position. The quadratic map added both squared coordinates and their product (12 coefficients for the two components together). We fitted each map to all eligible training tracks in the split. To limit the influence of large errors, we first fitted by least squares, then reweighted the observations and refitted 15 times. Each weight was the smaller of one and a scale divided by the residual vector length. The scale was 1.5 times the median residual length, with a floor of 10⁻⁶ pixels per frame. For the neighbor correction, we added the median residual of the selected neighbors to the map prediction, taking the median separately for each component.

### Scoring and checks

Within each split, vector error was the mean Euclidean distance between predicted and observed velocities. Gain was one minus the ratio of corrected to uncorrected error. For angular loss, we required a fitted speed times observed span of at least three pixels; a prediction of zero velocity had loss one. We weighted the two splits equally in field averages. For the quadratic check, we permuted early velocity vectors among early locations 999 times per split. We kept the late observations fixed and refitted the quadratic map each time. For the affine direction check, we permuted early residual vectors among fixed locations and recalculated the neighbor correction 999 times per split. To obtain intervals conditional on the fitted maps, we resampled moving targets with replacement, keeping each target's corrected and uncorrected predictions paired. We took the 2.5th and 97.5th percentiles of 9,999 mean paired loss differences.

To remove common motion, we measured the median horizontal and vertical displacements of particles linked across adjacent frames and subtracted the accumulated displacements, preserving the spatial matching. For the full-path separation check, we removed training tracks that came within 75 pixels of any recorded position of the target at any time. This exclusion applied to both the neighbors and the affine fit, which required ten remaining training tracks per target. For the window-specific check, we ranked tracks by mean quality and applied the speed filter separately within each window.

## Interpretation

A field-wide alignment score loses information about where the beads move. Even when velocities largely cancel, a map fitted early can predict the direction of other beads later. In the two DNAH11 fields where nearby tracks improved both speed-sensitive and directional predictions over an affine map, allowing the flow to bend smoothly explained most of that advantage.

Persistence here spans two windows of a 4.45-second recording. At the available track density, the predictions cannot distinguish separate flow domains from broad curvature. Targets share neighbors, and fields from the same donor are not independent biological replicates. The resampling intervals describe variation within fields; uneven numbers of usable tracks prevent a balanced comparison of how often the pattern occurs in healthy and affected cultures. The trajectories cannot establish whether cilia drove the flow: the curved liquid surface or convection in the culture insert, and imaging distortions that vary across the field, are alternatives. The cohort movies are available only on request. Bead motion in these cultures does not measure how well a patient clears mucus.

## References

1. Hadas N, et al. *Machine learning analysis of cilia driven particle transport distinguishes primary ciliary dyskinesia from normal cilia.* Communications Biology (2026). [Article and supplementary data](https://doi.org/10.1038/s42003-026-11149-0).
2. Ramirez-San Juan GR, et al. *Multi-scale spatial heterogeneity enhances particle clearance in airway ciliary arrays.* Nature Physics (2020). [Article](https://doi.org/10.1038/s41567-020-0923-8).
3. Roth D, et al. *Structure and function relationships of mucociliary clearance in human and rat airways.* Nature Communications (2025). [Article](https://doi.org/10.1038/s41467-025-57667-z).
4. Hadas N. *CiliaTracks Complete Raw Track Data, CNN Input Plots and Software Applications.* Zenodo (2026), record 21811519. [Public archive](https://zenodo.org/records/21811519).
