🔬💊 Phage OD Deviation Calculator

Objective Detection of Phage Treatment Effect Onset from Optical Density Data

by Stephen T. Abedon Ph.D. (abedon.1@osu.edu)

phage.org | phage-therapy.org | biologyaspoetry.org | abedon.phage.org | google scholar

Jump to:   💡 Concept  |  ∂ The Math  |  🔬 Analyzer  |  🔬ⁿ n-Analyzer  |  🧪 Time-Kill  |  📖 Methods  |  ⚙️ Tech  |  🧮 More Calculators

What is deviation? Deviation is the point when a treatment curve (e.g., of phage-infected bacteria) begins to measurably diverge from the control curve (uninfected bacteria). This tool detects this divergence objectively by comparing growth slopes between treatment and control, eliminating subjective visual assessment.

Deviation can serve as a means of estimating phage time-killing (time-kill curves) using optical density data and can be superior to either OD-max or area-under-curve (AUC) determinations for assessing phage antibacterial virulence.
What this calculator can do
Three calculus-based analytical approaches — Univariate (treatment curve only), Multivariate (treatment vs. control), and Statistical (parameter-grid consensus across both curves). Each is suited to a different data regime; the calculator reports all three so the user can cross-check.

Multiple landmark detection — deviation onset (DO), threshold deviation (TD), first post-DO time point, ODmax, Transition to Terminal Lysis (T3L), peak lysis rate, 95% lysis time, end-of-lysis, second-lysis events, time of presumptive regrowth of culture. Each landmark is reported with the underlying calculus rationale and, where useful, a confidence label (PRECISE, MODERATE PRECISION, LOW PRECISION, or IMPRECISE) reflecting how cleanly the curve supports the detection.

Visual reality checks via inline graphs — the OD curves, slope (first derivative) curves, ratio charts, and AUC visualizations all display the detected landmarks as labeled vertical lines. This means every quantitative output can be visually verified against the underlying data, and dataset-specific oddities (early plateaus, two-peak profiles, regrowth, lysis inhibition) can be identified by eye. The framework is designed as a hybrid: algorithmic detection paired with visual verification, where each modality catches what the other can miss.

Quality diagnostics — pre-deviation R², noise level (σ / peak slope), consistency checks (DO < ODmax < EOL), control stationary-phase detection, and warning banners that flag when the algorithm may have been fooled by post-lysis regrowth or non-exponential control growth.

Companion analyses — AUC-based virulence index and centroid index for literature comparison (with explicit window and baseline choices), peak-anchored parabolic ODmax fitting, a Time-Kill tab for paired OD-plus-CFU experiments, and a hidden Sim Data tab (URL ?simdata=1) for analyzing ODE simulation outputs against the same detection algorithms.

Data import and export — CSV, Excel, and JSON file upload; load remote example datasets; export results as HTML report, CSV, debug text. Curated example datasets (T1 through T7 across mid-log and late-log infection conditions) are available via the 📡 button.
Calculus landmarks on the OD curve
1. Deviation onset (DO) — first inflection point; peak of d(OD)/dt; second derivative crosses zero. Marks the onset of phage-mediated lysis at a detectable scale (when biomass increase in the phage-containing culture first measurably lags that of the phage-free control).

2. Lysis onset (ODmax) — OD maximum; d(OD)/dt = 0; second derivative at minimum. Marks population-wide cell lysis — the second killing, approximately one latent period after deviation onset.

3. Transition to Terminal Lysis (T3L) — the time at which the terminal lysis cascade begins its descent. Detected by walking backward from peak lysis rate to where d(OD)/dt first reaches 25% of the peak-lysis-rate slope. For single-stage curves (the typical case — one clean lysis cascade), T3L coincides with ODmax. For two-stage curves (lysis-inhibition phages like T2, T4 WT, T6), the OD curve shows an initial lysis event that plateaus or sags before a terminal lysis cascade clears the culture; T3L marks the start of that terminal descent and is distinct from the first ODmax. DO → T3L is the appropriate latent-period proxy in both cases: for single-stage curves it equals DO → ODmax; for two-stage curves it correctly spans both cascades rather than just the first.

4. Peak lysis rate — minimum (most negative) of d(OD)/dt; second derivative crosses zero between ODmax and end-of-lysis. The moment of steepest OD decline during the (terminal) lysis cascade.

5. 95% lysis time — time at which OD has dropped 95% of the way from ODmax to the lysis floor. A more lenient companion to calculus EOL; biologically: "the bulk of lysis has happened." More intuitive than the calculus second-zero-crossing of d(OD)/dt, which marks when the lysis cascade has fully subsided (often considerably later, when only the slow tail of the decline remains).

6. End-of-lysis — calculus — second inflection point; d(OD)/dt returns toward zero from below; second derivative crosses zero again. Marks when the lysis cascade subsides — "extinction" of the culture's previous turbidity.

7. Time of presumptive regrowth of culture — second zero-crossing of d(OD)/dt after end-of-lysis, going from negative or near-zero to clearly positive. Most commonly reflects bacterial regrowth from phage-resistant mutants but can have other causes; the neutral framing reflects the observational nature of the OD measurement.

Threshold deviation (TD) (a hybrid landmark): the time at which d(OD)/dt has dropped 5% from its peak. Combines calculus (peak slope) with a small subsequent OD-slope-based crossing. In empirical comparison with CFU-based time-kill, threshold deviation has produced the smallest mean absolute offset against CFU 50% drop among the OD-based candidates.

For further discussion of optical density-based techniques, including of deviation and time-kill, see the following references:
Abedon, S.T. (2026). Viruses 18:97. 10.3390/v18010097
Abedon, S.T. (2025). Viruses 17:1573. 10.3390/v17121573
Abedon, S.T. (2025). Open Life Sciences 20:20251209. 10.1515/biol-2025-1209

Additional manuscripts describing the computational methodology and validation of the Deviation approach are in preparation.

To cite this tool: Abedon, S.T. (2026). Phage OD Deviation Calculator. deviation.phage.org  ·  DOI: 10.5281/zenodo.19023877

deviation.phage.org  ·  Abedon’s Books  ·  DOI: 10.5281/zenodo.19023877

How can I improve this page?  contact: deviation@phage.org

💡 Understanding OD Deviation Detection

The three detection approaches at a glance:
  • Univariate — uses the phage-containing curve only; deviation defined by first derivative.
  • Multivariate — same but uses both phage-containing and phage-free curves.
  • Statistical — uses both curves, slope-ratio grid with trimmed consensus.

Threshold-based detection (Uni & Multi) enables direct comparison between approaches; it is also more robust than the "earliest" estimate for both noisy and continuous data.

For a primer on the underlying math — first derivative, second derivative, inflection points — see the ∂ The Math tab.

What is Deviation? ↑ Contents

When lytic bacteriophage infect a bacterial culture, the optical density (OD) of the culture eventually begins to drop as infected cells lyse. But the actual onset of deviation — when the phage treatment first measurably affects bacterial growth — often occurs earlier than the OD drop. Deviation is the separation of phage-containing from phage-free OD curves; it is the OD signature of phage impact on a bacterial culture. Detecting this precisely, objectively, and early is the goal of this calculator.

📖 Key terminology — please note the y-axis vs x-axis distinction:

Deviation is a y-axis phenomenon — a magnitude. Its onset and the operational estimates of that onset are x-axis quantities — times. The methods first detect whether deviation is occurring (y-axis), then estimate when it began (x-axis).

  • Deviation (OD units, y-axis) — the separation magnitude between phage-containing and phage-free curves at any given time. The biological phenomenon. Without deviation, there is no onset to time.
  • Deviation onset (time units, x-axis — the calculus landmark itself) — the moment at which the second derivative d²(OD)/dt² equals zero; equivalently, the time at which d(OD)/dt attains its maximum. The first inflection point of the phage-containing OD curve. Computed directly from the data via the slope peak (not an estimate of anything else). This is the calculus-defined event the paper centers on.
  • Earliest deviation estimate (time units, x-axis — operational alternative) — an operational landmark deliberately placed half a sampling interval after deviation onset: the midpoint between the peak slope timepoint and the next sample. Used when a small noise margin past the bare onset is desired.
  • Threshold deviation estimate (time units, x-axis — most robust operational alternative) — another operational landmark, computed as the first time d(OD)/dt has persistently dropped by a specified fraction (default 5%) from its peak. Later than both deviation onset and earliest deviation; the most robust of the three and the most comparable across datasets.

Deviation onset is the calculus landmark itself (d²(OD)/dt² = 0; equivalently, d(OD)/dt at its maximum). Earliest deviation and threshold deviation are operational alternatives, used when a noise margin past the bare onset is desired. In temporal order: deviation onset → earliest deviation (half a sample later) → threshold deviation (later still, after the deviation has accumulated to 5% of peak slope). All three are computed from the same OD curve; which one to report depends on how much noise margin the application requires.

Deviation timing — the x-axis quantity — is a measure of phage antibacterial virulence: earlier deviation onset means faster-acting phage (Abedon 2025aAbedon 2025b). It complements traditional metrics like OD-max and area-under-curve (AUC), but perhaps most importantly it provides an OD-based alternative to traditional time-kill curves. The key advantage: automated OD plate readers can take readings every few minutes across a multi-hour experiment, whereas traditional time-kill curves require manual plating at each timepoint — making fine-resolution sampling impractical (Abedon 2026).

Landmarks on the OD Curve ↑ Contents

Every phage-bacterial OD curve contains a sequence of biologically meaningful moments. The calculator identifies and reports the following landmarks, each marked by a feature of the OD curve, its first derivative d(OD)/dt, or its second derivative d²(OD)/dt²:

  1. Deviation onset (DO) — d²(OD)/dt² first crosses zero (positive → negative); equivalently, d(OD)/dt is at its peak. The OD curve's first inflection point. Marks phage-mediated bactericidal commitment: bacteria have been committed to death, although the population is still nominally growing.
  2. Threshold deviation (TD) — the time at which d(OD)/dt has dropped a specified percentage (default 5%) below its peak. A hybrid landmark combining calculus (peak slope) with a small subsequent slope-based crossing. TD is the universal deviation comparative used throughout this calculator because it is the only deviation estimator that is definable across all three detection approaches (Univariate, Multivariate, Statistical) and across both real Time-Kill data and simulated data — making it the natural anchor for cross-approach and cross-tab comparisons.
  3. Earliest deviation — the time half a sampling interval after the peak slope; a finite-sample-aware estimate of DO that is slightly later than the calculus zero-crossing but more robust on discrete sampled data. Univariate-only.
  4. Lysis onset (ODmax) — the OD maximum; d(OD)/dt = 0; d²(OD)/dt² at its minimum. Marks population-wide cell lysis — the second killing, approximately one latent period after deviation onset.
  5. Transition to Terminal Lysis (T3L) — the time at which the terminal lysis cascade begins its descent. Detected by walking backward from peak lysis rate to where d(OD)/dt first reaches 25% of the peak-lysis-rate slope. For single-stage curves (one clean lysis cascade), T3L coincides with ODmax. For two-stage curves (lysis-inhibition phages like T2, T4 WT, T6), the OD curve shows an initial lysis event that plateaus or sags before a terminal lysis cascade clears the culture; T3L marks the start of that terminal descent and is distinct from the first ODmax. DO → T3L is the appropriate latent-period proxy in both cases.
  6. Peak lysis rate (PLR) — the minimum (most negative) of d(OD)/dt; d²(OD)/dt² crosses zero between ODmax and end-of-lysis. The moment of steepest OD decline during the (terminal) lysis cascade.
  7. 95% lysis time — the time at which OD has dropped 95% of the way from ODmax to the lysis floor. A more lenient companion to calculus end-of-lysis; biologically: "the bulk of lysis has happened." More intuitive than the calculus second-zero-crossing of d(OD)/dt (which marks when the lysis cascade has fully subsided — often considerably later, when only the slow tail of the decline remains).
  8. End-of-lysis (EOL) — the OD curve's second inflection point; d²(OD)/dt² crosses zero again (negative → positive). Marks the moment the lysis cascade subsides — "extinction" of the culture's previous turbidity.
  9. Presumptive regrowth — the second zero-crossing of d(OD)/dt after end-of-lysis (going from negative or near-zero to clearly positive). Most commonly reflects bacterial regrowth from phage-resistant mutants but can have other causes; the neutral framing reflects the observational nature of the OD measurement.

The two killings — phage-mediated bactericidal activity (deviation) and bacterial physiological death (lysis) — sit at successive landmarks separated by approximately one latent period. A single signal (the second derivative) narrates the entire phage-bacterial dynamic. The landmarks above the lysis cascade (PLR, 95L, EOL) and beyond (presumptive regrowth) extend the same calculus-based framework to capture the full lifecycle of the OD signature.

The Time-Kill tab adds CFU-side landmarks (CFU peak, CFU 50% drop, CFU 10× drop, CFU 100× drop) when CFU measurements are also provided. The Sim Data tab adds simulation-only landmarks (Peak culture growth, Control stationary phase). For chart axes and AUC integration windows, the calculator consistently anchors at TD — see the Math tab section 8 for rationale.

The Three Detection Approaches ↑ Contents

This calculator implements three approaches to detecting deviation, ordered from least to most complex — in terms of what data you need, what assumptions you make, and what happens when simpler approaches are insufficient. These are Univariate Detection, Multivariate Detection, and Statistical Detection:

In plain language:
  • Univariate: "I only have one curve, but it happens to be exponential, so I can use the math of that curve against itself."
  • Multivariate: "I have two curves, and now I can subtract their slopes from each other to cancel out the growth shape — but I still need clean enough data to detect the slope change in that difference."
  • Statistical: "The calculus approach isn't working because the data is too noisy, so I'll use a grid sweep across many parameter combinations and take a robust consensus."

1. Univariate Detection

One curve — no control required. When bacterial growth is exponential, the natural logarithm of OD increases linearly with time. This means the instantaneous slope of ln(OD) — the specific growth rate μ — is constant. Deviation is detected as the first sustained departure of μ from its pre-deviation plateau: mathematically, when the second derivative of ln(OD) with respect to time (d²(ln OD)/dt²) first becomes persistently negative — that is, when the growth rate itself is declining.

The instantaneous slope (the slope of a short local window of ln(OD) vs time, approximating d(ln OD)/dt at each moment) is computed at each timepoint and compared against the peak pre-deviation slope. When the slope first drops below a threshold fraction of that peak and stays down, deviation is declared.

Experimental flexibility: Because Univariate Detection requires only a single curve, it offers greater experimental flexibility than the two-curve approaches. Multiple treatment curves with different starting bacterial concentrations can be generated and analyzed simultaneously without the need to precisely pair each one with a matched phage-free control experiment. Technical replicates can likewise be analyzed individually and compared directly, rather than averaged to match a control — preserving within-experiment variation that averaging would obscure.

The cost of this flexibility is also experimental: Univariate Detection requires not only that deviation occurs during exponential growth, but that exponential growth is captured over a sufficient number of timepoints to establish with confidence that the pre-deviation growth was in fact exponential. Too few pre-deviation timepoints, or a lag phase that extends too far into the pre-deviation period and thereby obscures it (it is best practice to start these experiments with log-phase bacteria), will compromise the reliability of the result — as reflected in a low correlation coefficient.

Quality metric: How flat is the instantaneous slope series during the pre-deviation window? If the slope d(OD)/dt is nearly constant (or equivalently, if d(ln OD)/dt is constant on a logarithmic plot — exponential growth being linear on a log scale but not on a linear scale) (a flat horizontal line), the pre-deviation growth was cleanly exponential and detection is reliable. If the slope is erratic or trending, exponential growth was not clean and results should be interpreted with caution. The calculator reports this flatness using the correlation coefficient (R²) — expressed as a percentage from 0% to 100%, where higher means flatter and more reliable.

2. Multivariate Detection

Two curves — phage-free control required. The Univariate Detection approach requires exponential growth because it is the linearity of ln(OD) vs time that provides the flat reference baseline. If growth is not exponential — for example, if the culture is in a lag phase, approaching stationary phase, or growing linearly rather than exponentially — then ln(OD) is not linear in time, the slope series is not flat, and establishing a stable baseline becomes more difficult, making the approach less reliable.

The Multivariate Detection approach solves this by using the phage-free control curve as the reference rather than pre-deviation bacterial growth in phage presence — no curve fitting or assumption about growth shape is needed. At each timepoint, the instantaneous slope of ln(OD_treatment) and the instantaneous slope of ln(OD_control) are each computed independently. As long as phage are having no effect, both cultures are growing at the same rate, so the two slopes are equal — their difference hovers near zero regardless of what shape the growth curve has. It doesn't matter whether growth is exponential, linear, decelerating, or anything else: whatever is driving both cultures equally appears in both slope series and cancels out when you subtract one from the other.

Deviation is declared at the first moment when the treatment slope drops persistently below the control slope — the same logic as Univariate Detection, but using the control curve's instantaneous slope as the reference rather than the treatment curve's own pre-deviation slope. No curve fitting is required; the control curve provides the reference point by point.

Quality metric: Noise level of the pre-deviation residual. Low noise → sensitive detection. High noise → consider the Statistical approach.

3. Statistical Detection

Two curves — phage-free control required. Fallback when calculus-based approaches are unreliable. The Statistical approach uses a parameter grid sweep. At each timepoint and for each combination of window size, threshold, and minimum consecutive points, the ratio of treatment slope to control slope is tested. Results across all parameter combinations are trimmed and averaged, yielding a robust consensus estimate that is resistant to individual noisy readings.

Two sub-approaches run in parallel: stat-raw (slopes on raw OD values, absolute growth rate) and stat-ln (slopes on ln-OD values, specific growth rate). Their independently trimmed means are combined with equal weight.

Quality metric: SD of the trimmed mean across the parameter grid. Lower SD → more consistent result across parameter choices → higher confidence.

Which Approach to Trust? ↑ Contents

The three approaches are complementary, not competing. When all three agree, you have very strong multi-method evidence. When they disagree, the pattern of disagreement is itself informative:

  • Univariate earlier than Statistical → exponential growth phase was clean; Univariate is detecting the true early signal
  • Univariate later than Statistical → pre-deviation growth was not cleanly exponential (low pre-deviation R² or high noise level); Statistical may be more reliable
  • Multivariate between the two → typical; residual-based detection is intermediate in sensitivity
  • All three agree closely → very high confidence in the deviation time

The Role of Data Quality ↑ Contents

Starting inoculum: Beginning experiments with log-phase (exponentially growing) bacteria produces cleaner pre-deviation data for all three approaches. With log-phase inocula, OD begins rising almost immediately and the slope curve rises quickly to a reliable plateau. Stationary-phase inocula introduce a true lag phase that can obscure the pre-deviation baseline. Log-phase inocula are therefore strongly recommended.

All three approaches benefit from denser sampling. Experimental OD plate readers sampling every 5–10 minutes may appear to show sharper transitions than fine-resolution simulations — this however is a sampling artifact. Denser sampling reveals the true gradual nature of the transition and improves detection precision for all three approaches, particularly Univariate.

For Univariate specifically, two quality metrics predict detection reliability: pre-deviation R² > 0.85 indicates clean exponential growth; noise level < 10% indicates low measurement variability. Both being good = reliable. Low R² or high noise level suggests caution and preference for Statistical (Multivariate noise level is necessarily higher than Univariate on the same data, but it does not require exponential growth).

Relationship to Computational Modeling ↑ Contents

Computational models of phage-bacteria dynamics (e.g., ODE-based population models) are ideally suited to validate these detection approaches. Key open questions addressable by simulation include:

  • What fraction of bacteria must be infected before deviation becomes detectable, and how does the timing of this "substantial fraction" threshold depend on phage parameters such as burst size, latent period, and adsorption rate?
  • How does detection precision scale with sampling frequency across all three approaches — and at what sampling interval does each approach begin to lose reliability?
  • How does artificially introduced noise — at controlled and varying levels — affect detection reliability across all three approaches? This is something difficult or impossible to explore systematically with experimental data alone.
  • What sub-OD-threshold population dynamics precede and drive the deviation event? Simulation can explore bacterial and phage densities too low to be detected by optical density measurements, illuminating the early-infection processes invisible to experiment.
For more detail, see the other tabs:
  • ∂ The Math — the mathematics: derivatives of the OD curve, the three landmarks as features of d(OD)/dt and d²(OD)/dt², why the inflection point precedes OD_max, the quality metrics (R² and noise level).
  • 📖 Methods — what to do as a user: data format requirements, file upload, choosing between Univariate / Multivariate / Statistical, reading the results table, interpreting the figures, when each approach is preferred.
  • ⚙️ Tech — exact algorithms, pseudocode, parameter values, interpolation formulas, statistical procedures, citation, code provenance — suitable for methods sections and peer review.

💡 Conclusions from Limited Experimentation

Hypothesis (working, supported by ten paired OD+CFU datasets across five experiments): All three deviation-related landmarks — deviation onset, earliest deviation, and threshold deviation — closely track CFU-measured bacterial killing time, while ODmax and end-of-lysis lag the killing event substantially. The strongest finding is that deviation onset places r48 and WT phages within half the OD sampling interval of each other in every paired experiment, even when CFU sampling is too coarse to detect the within-experiment correspondence directly.

Five reasons all three deviation candidates are useful estimators of bacterial killing:

  1. All three are objective. Threshold deviation uses a fixed 5%-of-peak-slope criterion. Deviation onset and earliest deviation are calculus landmarks (the time at which d²(OD)/dt² = 0; the midpoint between slope-peak time and the next sample). None requires per-dataset judgment.
  2. Bias-vs-precision trade-off among the three. Deviation onset has the smallest mean signed offset from CFU 50% drop time (essentially unbiased: +0.5 min mean across ten datasets), at the cost of a larger standard deviation. Earliest deviation is systematically a few minutes later but with smaller variance. Threshold deviation sits between the two on both measures. The choice between them depends on whether you prioritize bias-zero (deviation onset) or precision (earliest or threshold deviation).
  3. Within-experiment phage comparison is dominated by sampling resolution, not biology. When CFU is densely sampled, r48 and WT show ≤1.1 min difference in CFU 50% drop time across experiments. Deviation onset shows exactly 0.50 min difference in every experiment — at the limit of OD sampling resolution. This suggests the two phages' killing kinetics may be even closer than CFU sampling can resolve, with the OD-based method limited only by its own sampling interval.
  4. Applicable to both discrete and continuous data. On smooth, simulation-like data the deviation event has no abrupt step of divergence — every infinitesimally small departure from exponential gets registered, which can fire deviation onset implausibly early. Threshold deviation requires the deviation to have accumulated to a measurable magnitude (5% drop in slope), making it the more robust landmark on noiseless simulation data; on real noisy experimental data, all three converge.
  5. All three are much better than ODmax for long latent periods. ODmax lags the bacterial killing event by approximately one latent period (20–40 min in these experiments). For phages with latent periods of 30 minutes, ODmax can be acceptable; for phages with latent periods of 2+ hours (common under non-optimized or in situ-like conditions), ODmax is too late to inform clinical or screening decisions. Deviation-based landmarks are approximately latent-period-independent.

The important caveat: These conclusions depend on having sufficiently short OD sampling intervals. With 1–5 minute sampling, threshold deviation crossings are detected with sub-sampling-interval precision via linear interpolation between samples. With 10+ minute intervals, the threshold crossing may be poorly resolved, and earliest deviation (or deviation onset itself) may become the better choice because their timings are anchored to the slope-peak sample rather than to the interpolated threshold crossing.

Test these conclusions on your own paired OD+CFU data using the 🧪 Time-Kill tab. The Time-Kill comparison table directly shows which deviation estimator (onset, earliest, or threshold) best matches the CFU 10× drop and CFU 50% drop times on your dataset.

∂ Why Calculus? A Plain-Language Guide

📑 Contents

This tab explains the mathematical ideas behind OD deviation detection — no prior calculus knowledge required.

1. What is a Derivative?

A derivative measures how fast something is changing at a given moment. If you plot a quantity on a graph, the derivative at any point is the slope of the curve at that point — how steeply it is rising or falling.

More precisely, the first derivative of OD with respect to time, written d(OD)/dt, answers the question: "How fast is the optical density changing right now?" A large positive value means OD is rising rapidly; a value near zero means OD is barely changing; a negative value means OD is falling.

The second derivative, d²(OD)/dt², tells you how fast the first derivative itself is changing — whether the growth rate is speeding up, staying constant, or slowing down.

Physics analogy: if OD is position, then d(OD)/dt is velocity and d²(OD)/dt² is acceleration. Just as you can describe a moving car by its position, velocity, and acceleration, you can describe an OD curve by its current value, its rate of change, and the rate at which that rate of change is itself changing.

2. Why Does This Matter for Bacterial Growth?

During exponential growth, a bacterial culture doubles at a constant rate. This means the OD curve rises as an exponential function: OD(t) = OD₀ × eμt, where μ is the specific growth rate.

What exponential growth looks like on different plots:
  • OD vs time (linear-linear): A continuously accelerating upward curve — OD doubles, then doubles again, then doubles again. The slope keeps increasing.
  • ln(OD) vs time (log-linear): A straight line with slope = μ. This is the hallmark of exponential growth.
  • d(OD)/dt vs time (first derivative, linear): A continuously rising curve that mirrors the OD curve — the faster OD grows, the steeper its rise. Zero-crossing marks the OD peak.
  • d(ln OD)/dt vs time: A flat horizontal line at exactly μ. This constancy is the mathematical definition of exponential growth.

3. Three Landmarks on Every Phage-Bacterial OD Curve

A typical phage-bacterial OD curve passes through three biologically distinct moments, each marked by a specific feature of the derivatives of OD(t):

  1. Deviation onset — The first inflection point of the OD curve, where curvature flips from concave-up (∪) to concave-down (∩). At this moment:
    • The first derivative d(OD)/dt is at its maximum
    • The second derivative d²(OD)/dt² crosses zero (from positive to negative)
    Observationally: the moment when biomass accumulation in the phage-containing culture begins to slow relative to that of a phage-free control. The "first" detectable phage impact on culture biomass — corresponding biologically to the beginning of phage-mediated bacterial killing, although the proximate cause of the OD slowdown (cessation of division, cessation of biomass increase, or both) depends on the phage-host pair.
  2. Lysis onset — The maximum of the OD curve. At this moment:
    • The first derivative d(OD)/dt is zero
    • The second derivative d²(OD)/dt² is at its minimum (most negative value)
    Note: OD_max is a maximum of OD, not an inflection point. Biologically: the moment population-wide cell lysis begins. The second killing — physical destruction.
  3. End-of-lysis — The second inflection point of the OD curve, where curvature flips from concave-down (∩) to constant or instead back to concave-up (∪). At this moment:
    • The first derivative d(OD)/dt is at its minimum (most negative)
    • The second derivative d²(OD)/dt² crosses zero again (from negative to positive)
    Biologically: the lysis cascade has reached its peak rate and is now subsiding — what has been described as "extinction" of a culture's previous turbidity. The OD curve will have reached its observable-lysis floor.

The second derivative as a single narrator. A single signal — d²(OD)/dt² — passes through all three landmarks in sequence: it starts positive (growth accelerating), crosses zero at deviation onset, reaches its minimum near OD_max, and crosses zero again at end-of-lysis. This calculator computes all three.

Asymmetry: deviation onset is fundamentally harder to detect than the other two landmarks — but the other two are not the same kind of "easy."

  • Deviation onset is an inflection point — the first place where curvature changes sign. Inflection points cannot be seen by inspecting OD values alone; they require looking at how OD is changing, i.e., the first or second derivative. This is the difficult problem the calculator solves.
  • OD_max can be found three different ways, each with its own failure modes: (a) the peak-anchored calculus method (the primary value the calculator reports) finds the discrete maximum and refines it via local parabola fit — sub-timepoint precision plus a built-in PRECISE/MODERATE PRECISION/LOW PRECISION/IMPRECISE precision flag based on whether slopes around the peak are sign-consistent; (b) the naive discrete max simply picks the highest reading — robust but can be fooled by post-lysis recovery; (c) the slope zero-crossing interpolates where the smoothed first derivative crosses zero — continuous but can be fooled by intermediate inflections on multi-stage curves. The calculator reports all three for diagnostic comparison; see §3b for full discussion.
  • End-of-lysis is different from OD_max. The calculus-based identification (minimum of d(OD)/dt; second inflection point of OD) marks when the lysis cascade begins to subside — a biologically meaningful event. The naive identification (min OD after peak) marks when the lysis floor is reached — a different and later event, dependent on how long the experiment continued running after lysis. These two are not the same quantity, just measured differently — they are different events. The calculator reports the naive value as "Lysis floor — naive" to flag this, and uses the calculus value as the canonical end-of-lysis.

Bottom line: for OD_max, the peak-anchored value is the default — it inherits naive's robustness while adding calculus's sub-timepoint precision and a confidence diagnostic. For end-of-lysis, use the calculus value — the naive minimum is measuring a different (later) event.

Why is deviation onset the most informative for time-kill? Lysis onset (OD_max) occurs approximately one latent period after the phage-mediated killing events that produced it. By the time OD has peaked, the killing decision has already been made; the OD curve is reporting downstream consequence. Deviation onset, by contrast, marks the earliest detectable moment that growth has slowed relative to pure exponential — the closest OD-based correlate to the actual phage adsorption and host commitment events.

3a. Detection of Deviation Onset

When a phage population begins to have an effect on a bacterial population, bacterial growth slows. This shows up immediately in the first derivative: d(OD)/dt, which had been rising steadily, begins to drop. The zero-crossing — where d(OD)/dt = 0 — marks where OD peaks. At this exact moment the second derivative d²(OD)/dt² = 0, meaning the OD curve has an inflection point. This zero-crossing is the latest possible deviation time.

More sensitively, deviation can be detected before the zero-crossing, as a drop from the rising first-derivative curve. Panel A of Figures 1 and 2 shows the first derivative of OD vs time. The calculator reports two estimates:

  • Earliest (Univariate only): midpoint of the bracket (t_peak, t_peak+1) — the very first drop from the peak. No threshold required. This is the most sensitive possible estimate but has no Multivariate equivalent (Multivariate's difference series is too noisy for a meaningful "first drop").
  • Threshold-based (Univariate and Multivariate): midpoint of the bracket where d(OD)/dt first drops and stays below a threshold fraction of the peak (e.g., 0.95×, 0.85×, 0.75×μ for Univariate; 1–2σ below pre-deviation mean for Multivariate). This can be operationally a more obtainable or more broadly useful estimate: (1) it is directly comparable within an approach across experiments — since the same bracket-midpoint logic is used, threshold times from the same approach can be compared across datasets; (2) it is more robust for continuous or nearly continuous data, where the first derivative never drops sharply — a threshold requirement filters out trivially small initial drops. The threshold estimate is expected to always be later than (or equal to) the earliest estimate and earlier than (or equal to) OD_max.

Note on fine-grained simulations: For continuously sampled or very fine-grained data (e.g., simulations with 1-second intervals), the "earliest" estimate (peak slope timepoint) and the threshold estimate converge — adjacent timepoints are so close together that the bracket between them is negligibly small. In this regime, the threshold-based interpolated crossing is the better-defined estimate, since it gives a precise continuous time rather than depending on the sampling interval. For typical plate-reader data (4-minute intervals), the earliest and threshold estimates bracket a meaningful temporal range.

Expected ordering: The earliest estimate should always be earlier than (or equal to) the threshold estimate, which should always be earlier than (or equal to) OD_max (zero-crossing). That is: earliest ≤ threshold ≤ OD_max. Note on two-peak OD profiles: Even without phage-resistant mutant development or host-range mutation, some phage-bacterium combinations produce two distinct OD decline events: a first partial lysis (reflecting early rounds of infection) followed by bacterial regrowth and then terminal lysis (culture clearing). This is most common with lysis-inhibition phages at intermediate bacterial densities. The first ODmax is the virulence-relevant landmark — it marks when phages first began lysing bacteria at a detectable scale. The pre-terminal ODmax (last local maximum before EOL) is the KOTE-relevant landmark for phage titer calibration, since it is the consistent event across curves at all titers that precedes culture-wide clearing. Peak lysis rate timing should likewise be measured during the terminal lysis decline. The KOTE Calibration tab uses the pre-terminal ODmax automatically; the main Analyzer tab reports both (as OD_max and, when detected, the second hump time in the second lysis row). If the threshold estimate appears earlier than the earliest estimate, this indicates a data quality issue — likely a noisy spike in the first derivative that created a false peak, or insufficient data before the true deviation.

To see the zero-crossing clearly, use the X-min and X-max controls in the Figure 1 or Figure 2 toolbar to crop the x-axis around the OD peak — X-min cuts off the early growth phase, X-max cuts off the post-lysis tail.

3a (continued). Statistical Detection and the Earliest-vs-Threshold Distinction

The Statistical detector runs the deviation analysis with multiple parameter combinations (different window sizes, threshold fractions, minimum consecutive points) and reports a robust summary. The results table shows it in two rows:

  • Earliest deviation (Statistical column): the minimum deviation time across all parameter combinations. This corresponds to the most-sensitive setting (e.g., threshold = 0.95, minConsec = 2, smallest window) finding the very first moment where treatment slope persistently drops below 95% of control slope. Earliest = the moment any Statistical method first detects something. Smallest temporal value of all the rows.
  • Threshold deviation (Statistical column): the trimmed mean across all parameter combinations (drop top and bottom 25%, average the middle 50%). This is the central estimate — the consensus across the parameter grid. Less sensitive than "earliest" but more robust to which specific parameter combination happens to fire first.

The gap between earliest and threshold is itself informative. A small gap (a few sample intervals) indicates the deviation event is sharp and well-defined — most methods agree on roughly when it happened. A large gap (tens of minutes or more) indicates the deviation is gradual, noisy, or low-amplitude — only the most sensitive methods catch the beginning, while less-sensitive methods need more accumulated divergence before firing.

Both rows have parallel "earliest" and "threshold" entries for Univariate too: Univariate's earliest is the peak-slope-midpoint estimate (no threshold required); Univariate's threshold is the trimmed mean across its own threshold grid (0.95, 0.85, 0.75 of peak μ).

Note on Multivariate training window logic. Multi's training baseline is bounded by three caps applied simultaneously: (1) the first 25% of dataset points; (2) an absolute 60-time-unit ceiling (for long plate-reader runs where 25% would extend past the deviation event); and (3) an early-peak cap that stops the training window at least 4 indices before the treatment OD reaches its maximum within the first 25% of data. Cap 3 is critical for fast-lysis datasets (T3, T7 short) where OD peaks at ~t = 48–52 min — without it, the 60-min cap would extend into the lysis trough and corrupt the training baseline. For delayed-lysis datasets (T1, T7 long/longer, T4), the early OD peak is much later, so cap 2 continues to govern. The cutoff additionally carries a noise floor of μ − 2σ (where σ is the standard deviation of training-window diff-slopes), ensuring the threshold is always meaningfully below the baseline even when the peak treatment slope is small.

3b. Three ODmax Methods and Their Trade-offs

The calculator reports three estimates of ODmax, each addressing different failure modes of the others:

  1. Peak-anchored calculus (the primary value). The algorithm first finds the discrete naive maximum, then fits a parabola through OD values in a small window around it (typically ±10 points). The parabola's apex is reported as ODmax. The apex is constrained to lie within a few sample intervals of the discrete maximum — if a wider apex would result (asymmetric local data, e.g. gentle rise then sharp lysis), the discrete value is used instead. This combines naive's robustness (anchored at the actual peak, not at a slope sign change that could fire anywhere) with calculus's continuity (sub-timepoint interpolation). It also delivers a built-in confidence diagnostic — see below.
  2. Naive discrete max (secondary, for comparison). The single timepoint at which OD is highest, with no calculus. Robust to noise but limited to sample resolution and can be fooled by post-lysis recovery (if the experiment runs long enough that recovering bacterial growth eventually exceeds the pre-lysis peak, the global max becomes the recovery endpoint — biologically meaningless as "ODmax of the phage curve"). When a meaningful end-of-lysis time exists, BOTH the peak-anchored method AND the naive value displayed in the table restrict the discrete-max search to pre-lysis timepoints (time ≤ end-of-lysis). This keeps the two values mutually consistent: the naive max shown is the pre-lysis discrete peak, not the post-regrowth global maximum. For datasets without a meaningful end-of-lysis (slow-acting phages where the curve never clearly falls), the naive max search is unconstrained — there's no regrowth phase to exclude.
  3. Slope zero-crossing (secondary, for comparison). The time at which the smoothed first derivative d(OD)/dt crosses from positive to negative. Requires persistent negative slopes (3 consecutive points) to declare the crossing — protects against single-point noise wobbles being misidentified as the peak. Continuous (interpolated) but can be fooled by intermediate inflections on multi-stage curves (e.g., lysis-inhibition curves where there's a brief slope flattening before the true peak). Important: ODmax does not always immediately precede terminal (culture-clearing) lysis. In some OD profiles — particularly with lysis-inhibition phages or at lower multiplicities of infection — a first partial lysis event is followed by bacterial regrowth and then a second, terminal lysis event. The first ODmax reflects the partial lysis event and is the virulence-relevant landmark (when did lysing begin?). The pre-terminal ODmax — the last local maximum before terminal clearing — is the KOTE-relevant landmark (what was the starting phage titer?). The calculator detects both when the two-peak pattern is present; the KOTE Calibration tab automatically uses the pre-terminal ODmax for calibration.

Peak-Anchored Confidence Diagnostic

The peak-anchored value carries a PRECISE / MODERATE PRECISION / LOW PRECISION / IMPRECISE label based on slope-sign consistency around the anchor point. Specifically: in a window around the discrete max, the algorithm computes short-window slopes on either side. It reports:

  • Left-positive fraction: of the slopes computed on points before the peak, what fraction are positive? (Should be near 1.0 for a real peak — OD was rising into it.)
  • Right-negative fraction: of the slopes computed on points after the peak, what fraction are negative? (Should be near 1.0 for a real peak — OD was falling after it.)

Confidence levels:

  • PRECISE (≥ 85% / ≥ 85%): well-defined peak. Both sides slope-consistent. The peak-anchored value can be relied on.
  • MODERATE PRECISION (≥ 65% / ≥ 65%): moderately defined peak. Some noise on one or both sides but the basic rise-fall structure is present.
  • LOW (< 65% on either side): poorly defined peak. The curve may be a plateau, noisy, or the peak is at a curve edge. Look at the raw curve before trusting the ODmax value.
  • IMPRECISE: the local parabola fit was not concave-down. The "discrete max" is not really a peak — it's a plateau edge, the end of a monotonic rise, or a noise spike with no real rise-and-fall structure.

Confidence reflects curve shape, not biological importance. A canonical fast-lysis curve (sharp rise, sharp fall around one latent period) yields PRECISE. A delayed-lysis curve where OD drifts upward and then very gradually drifts down can yield LOW PRECISION or IMPRECISE even though the experiment is interpretable — the "peak" is just genuinely ill-defined in the data, and the confidence flag is signaling that honestly.

Comparison Across Methods (Diagnostic Use)

When all three methods agree, the data has a clean well-defined peak and any value is trustworthy. When they disagree, the disagreement is itself informative:

  • Peak-anchored ≈ naive, both differ from zero-crossing: the slope zero-crossing fired on a noise wobble or an intermediate inflection. Trust peak-anchored.
  • Peak-anchored ≈ zero-crossing, both differ from naive: the naive max is being pulled to a post-lysis recovery point or a noise spike. Trust peak-anchored (which respects end-of-lysis bounds).
  • All three differ substantially with LOW PRECISION or IMPRECISE: the curve doesn't have a well-defined peak (plateau, monotonic, etc.). Look at the chart and choose a representative value by eye.

The naive and zero-crossing values are kept in the table as reference points for this kind of diagnostic comparison.

Note on AUC calculations: AUC windows that anchor to ODmax use the naive max time (not the peak-anchored value), because the AUC computation needs an actual sample point and the naive value is naturally aligned to one. For pre-lysis-recovery datasets (where the global naive max is post-lysis), this can produce an inappropriate AUC window — a known limitation. For most clean datasets the naive max is biologically meaningful and the AUC windows are correct.

4. Quality Metrics — R² and Noise Level

Pre-deviation R² is reported for Univariate only. It measures how flat the slope series d(OD)/dt is during the pre-deviation period — for clean exponential growth this series should be nearly constant (≈ μ_peak rising slowly), giving high R². Low R² indicates the slope was not steady before deviation, which undermines the Univariate detection's premise. R² is not reported for Multivariate because Multivariate's relevant series is the slope-difference (treatment − control), which is expected to hover near zero. A linear regression of a near-zero series explains almost no variance, so its R² is structurally near 0 regardless of data quality. Reporting it would mislead more than inform.

Noise level (σ / peak slope) is reported for both Univariate and Multivariate and is directly comparable between them. It is the standard deviation of slope values in a ±5-point window around the peak slope, divided by the peak treatment slope. The peak window is where the slope is approximately constant, so SD there represents true noise (not the rising trend of exponential growth). Interpretation:

  • < 2%: essentially noiseless (typical for noiseless simulations like Example 4 & 5)
  • 2–10%: typical clean plate-reader data
  • 10–25%: noticeable but manageable noise
  • > 25%: noisy; calculus-based detection may be unreliable; consider Statistical

Multivariate combines noise from two independently noisy curves, so its noise level is typically higher than Univariate on the same data. (If the two curves share correlated noise — e.g., parallel temperature fluctuations — some common-mode noise cancels in the subtraction and Multi noise can be lower than Uni.)

5. The Role of d(ln OD)/dt — Panel B

Taking the logarithm of OD before computing the first derivative gives d(ln OD)/dt — which equals μ (the specific growth rate) when growth is truly exponential. Unlike d(OD)/dt, which rises continuously during exponential growth, d(ln OD)/dt should be flat during exponential growth.

This makes Panel B a powerful noise diagnostic. If Panel B is flat and horizontal, pre-deviation growth was cleanly exponential and Panel A detection is reliable. If Panel B is noisy, rising, or trending, then either:

  • Growth was not cleanly exponential (e.g., lag phase, mixed populations, stationary approach)
  • Measurement noise at low OD values is creating spurious variation in the slope estimate

In either case, Panel B noise warrants caution. However, the magnitude of the variation matters greatly — a y-axis spanning 0.0001 ln-OD units that appears dramatic is actually negligible biologically. This is the same phenomenon seen when graphing the OD of a sterile-broth control: the variation looks enormous on the graph, but the absolute values are trivially small. Always check the y-axis scale before concluding that Panel B noise is biologically meaningful. When Panel B noise is large in absolute terms (y-axis spanning a substantial fraction of μ), the Multivariate or Statistical approaches should be preferred.

6. How Derivatives Are Computed in This Calculator

True instantaneous derivatives require continuous functions. Real OD data is sampled at discrete timepoints. The calculator approximates the first derivative at each timepoint using ordinary least squares (OLS) linear regression over a short sliding window of 3 consecutive timepoints. The slope of that fitted line is the derivative estimate at the center timepoint.

This is called a finite difference approximation — standard practice in numerical analysis. The 3-point window is small enough to be locally responsive (capturing rapid changes) but large enough to reduce the impact of individual noisy readings.

Any noise visible in Panel B at early timepoints — where the flat line appears to wobble — reflects real measurement noise in the OD readings. At low OD values, small absolute fluctuations create large proportional changes in ln(OD), amplifying noise in the d(ln OD)/dt estimate. As OD builds, signal-to-noise improves and Panel B stabilizes.

7. The Ideal Case (Example 4 and 5)

Loading Example 4 (pure noiseless exponential growth, no deviation) demonstrates the theory:

  • Panel A shows a smoothly rising curve — the continuously accelerating first derivative of exponential OD growth
  • Panel B shows a perfectly flat horizontal line at exactly μ = 0.02/min — confirming clean exponential growth
  • No deviation is detected, correctly

Loading Example 5 (noiseless exponential with a sharp theoretical deviation at t = 120 min) shows:

  • Panel A rises smoothly, then drops sharply at t = 120 min — the first derivative captures the deviation immediately
  • Panel B is flat at μ before deviation, then drops — the second derivative (rate of change of Panel B) signals the inflection
  • All three detection approaches should identify deviation at or near t = 120 min

8. AUC-Based Analysis: Virulence Index and Centroid Index

Alongside the landmark-based detection approaches discussed above, this calculator also computes two whole-curve summary metrics from the literature: the Virulence Index (VI) of Storms et al. (2020) and the Centroid Index (CI) of Hosseini et al. (2024). Both are based on the area under the curve (AUC) and require a phage-free control curve for computation. They are included for compatibility with the existing literature and for users who wish to compare results to published work.

Mathematics

Raw AUC is computed by trapezoidal integration of (time, OD) over a defined window. The integration baseline is y = 0 (matching the conventions of both Storms 2020 and Hosseini 2024).

Virulence Index is defined as VI = 1 − (AUCtreatment / AUCcontrol). For an ideally effective phage that completely prevents bacterial growth, AUCtreatment = 0 and VI = 1. For a phage with no effect (treatment curve identical to control), VI = 0. VI does not consider when the area accumulates; only how much area accumulates overall.

Centroid Index uses the centroid (x̄, ȳ) of the region under each curve. The centroid coordinates carry information about both how much OD-mass accumulated (ȳ) and when in the experiment it accumulated (x̄). CI is defined as CI = 1 − (x̄t · ȳt) / (x̄c · ȳc). This makes CI sensitive to late regrowth: a treatment curve with substantial post-lysis bacterial regrowth has its centroid pulled toward later times (higher x̄), producing a lower CI even if the simple AUC ratio (VI) would be similar.

Four integration windows

The classical use of VI and CI integrates from t = 0 to the end of the experiment. We additionally compute both indices over three landmark-anchored windows:

  • 0 → end of data — the traditional window. Sensitive to experimental duration and post-lysis regrowth.
  • 0 → end-of-lysis — excludes post-extinction regrowth, isolating the phage-mediated bactericidal/bacteriolytic phase. Falls back to end-of-data if end-of-lysis was not detected.
  • TD → ODmax — both endpoints anchored to detected landmarks. Captures phage-active phase up to the point of population-wide lysis, isolating bactericidal commitment dynamics without the lysis-decline phase.
  • TD → end-of-lysis — captures the full phage-active phase including the lysis decline. Both endpoints landmark-anchored.

Plus a user-adjustable fifth window in the calculator interface, allowing free exploration of integration limits.

The windows often give quite different VI and CI values for the same data — illustrating directly the "limit selection" sensitivity that Ceballos and Stacy (2021) identify as a fundamental weakness of AUC-based metrics.

Why TD as the lower anchor (and not DO)?

The lower anchor in landmark-anchored AUC windows is TD (threshold deviation) — the time at which d(OD)/dt has dropped by τ% from its peak. TD is used everywhere in the calculator as the universal deviation comparative for one practical reason: it is the only deviation estimator that can be produced by every detection approach this calculator supports. The Univariate approach can produce both DO (deviation onset, d²(OD)/dt² = 0) and TD; the Multivariate and Statistical approaches produce only TD; and the Sim Data tab's simulator produces only TD (its noise-free curves do not admit a meaningful Univariate calculus DO, since d²(OD)/dt² zero-crossing is ill-defined on a smooth curve). For cross-approach and cross-tab consistency, the only common landmark across all of these is TD, so TD is what the calculator uses as the AUC window anchor everywhere.

Mechanistically, TD is slightly later than DO: TD fires once the slope has dropped by τ% from its peak, while DO fires at the inflection (peak slope) itself. Both are valid "phage zero points" for AUC purposes; TD is simply the one with universal availability. On real Time-Kill data where Univariate also runs, DO and TD typically differ by half a sampling interval to a few sampling intervals depending on τ — small enough that the resulting VI and CI values are quite similar in either choice.

The y-baseline: what does AUC measure from?

The conventional Storms 2020 and Hosseini 2024 implementations integrate from y = 0. Mathematically clean, but biologically the "from y = 0" choice means the AUC also includes the substantial OD that exists below the phage-attributable signal — the residual turbidity that any bacterial culture contributes simply by being present, plus the broth itself, plus any post-lysis floor that remains. A more biologically motivated baseline would be the minimum OD observed after phage activity has begun — i.e., the lysis floor, or whatever the curve settles to between deviation onset and end-of-lysis. Integrating from this baseline strips away the residual turbidity and measures only the area above the floor — the bacterial biomass that phage still has to deal with, in OD-time units.

The calculator offers four baseline modes via radio buttons at the top of the AUC card: (1) y = 0 (literature default), (2) y = min OD post-deviation (the biological baseline), (3) Show both (renders both tables side-by-side for comparison), and (4) User-defined (set by hand — useful, e.g., for the OD of sterile broth, around 0.04 in many systems). Non-zero baselines use clip-to-zero arithmetic: any region of the curve falling below the baseline contributes zero area, with the curve-baseline crossing point computed exactly via linear interpolation. This matches the "area above the floor" interpretation.

Like the window choice, the baseline choice is itself a free parameter — different baselines will give different VI and CI values, sometimes substantially so. The "Show both" mode makes this sensitivity directly visible. None of these choices has a single "right" answer; what they have are different biological interpretations.

Limitations and relationship to deviation detection

VI and CI are whole-curve summary statistics. As such, they cannot distinguish bacterial killing from post-extinction regrowth of phage-resistant bacteria, they conflate multiple temporally distinct biological events (pre-deviation growth, deviation, lysis, post-lysis), and their values depend strongly on the integration window. Negative CI values can occur and are not errors — they indicate that the phage-treated curve had higher OD-weighted mass than the control, which typically signals substantial bacterial regrowth.

The landmark-based deviation framework that is the focus of this calculator addresses these limitations directly by identifying specific moments on the OD curve (deviation onset, lysis onset, end-of-lysis) rather than integrating across the whole curve. Deviation onset, in particular, is positioned closer in time to the actual phage-mediated bacterial-killing event than is any AUC-based metric. Nevertheless, VI and CI remain useful for cross-study comparison and as quick whole-curve summaries, and are provided here for those purposes.

References:

  • Storms ZJ, Teel MR, Mercurio K, Sauvageau D. (2020) The Virulence Index: a metric for quantitative analysis of phage virulence. PHAGE 1:27–36. doi: 10.1089/phage.2019.0001.
  • Hosseini N, Chehreghani M, Moineau S, Charette SJ. (2024) Centroid of the bacterial growth curves: a metric to assess phage efficiency. Commun Biol 7:673. doi: 10.1038/s42003-024-06379-z.
  • Ceballos RM, Stacy CL. (2021) Quantifying relative virulence: when μmax fails and AUC alone just is not enough. J Gen Virol 102:jgv001515. doi: 10.1099/jgv.0.001515.

Step 1: Upload Your Data

Supported formats: Excel (.xlsx, .xls) or CSV (.csv)

Data structure: Columns for Time, Control OD, and Treatment OD

Example: Time (min) | Control OD | Treatment OD

📁 Drop file here, click, or tap to browse

Drag and drop your data file, or click to select

— for small datasets copied from a spreadsheet or text
🔍 View Data Phage T4 r48 (rapid-lysis mutant) vs No Phage control — 126 timepoints, 0–500 min at 4-min intervals
🔍 View Data Phage T4 WT (lysis-inhibited wild type) vs No Phage control — 126 timepoints, 0–500 min at 4-min intervals
🔍 View Data Phage T4 WT (treatment) vs No Phage (control), with T4 r48 (rapid-lysis mutant) loaded as a reference curve overlay — single manual experiment, 23 timepoints with separate time columns per curve. All three curves appear on the chart; the reference curve is shown as a dashed gray line.
Example 4: Idealized noiseless exponential growth — OD(t) = 0.05 × e0.02t, μ = 0.02/min, doubling time ≈ 34.7 min. Both curves identical, no deviation. Use to verify Figure 1 shows a flat horizontal slope during pure exponential growth.
Example 5: Idealized noiseless exponential with theoretical deviation at t = 120 min — control continues exponential, treatment declines. No noise. Tests whether all three approaches detect deviation correctly.

Analyzing your data...

📊 Lysis Profile Landmark Identification

Deviation threshold τ: % drop of d(OD)/dt from peak Same threshold as in Step 3 above (linked); changing here re-runs detection.

Treatment Curve — Lysis Profile Landmark Identification

Parenthetical values shown alongside each landmark time are the corresponding treatment OD readings — e.g., "28.00 (0.150)" means at time 28 the OD value is 0.150. These are linearly interpolated between samples and provide visual reality checks for landmark placement.

Metric Univariate Multivariate Statistical
Detail section ↓ AUC-based analysis ↓ Univariate Detection results ↓ Multivariate Detection results ↓ Statistical Detection results
Charts 📈 Univariate slope chart 📊 Multivariate slope chart 📊 Deviation focus chart  ·  📊 Full range

AUC-Based Analysis

Virulence Index, Centroid Index — for comparison with the existing literature

🟢 Univariate Detection

🟢 Multivariate Detection

Quality metric for Multivariate: The results table shows noise level (σ / peak slope) — the standard deviation of pre-deviation slope differences as a fraction of the peak treatment slope. Lower = cleaner data. Multivariate noise level is comparable to Univariate noise level on the same data and is necessarily higher (the slope difference combines noise from both curves). R² is not reported for Multivariate because a linear regression of the near-zero slope-difference series is structurally uninformative — see Math tab §4 for the full explanation.

🔵 Statistical Detection

Statistical Detection — Individual Method Results (Treatment Curve)

↑ Fig 1 | ↓ Full Treatment | ↓ OD Ratio | ↑ Top of Results

📊 OD Curves

📊 OD Curves: The green dashed vertical line marks the Statistical Detection deviation time. Univariate and Multivariate deviation times are shown in the results table above but are not separately marked here.
Axes (blank = auto):

🔬ⁿ n-Analyzer — Multi-Curve Landmark Detection

Analyze a set of OD curves simultaneously — one time column, N treatment columns, optional control column. Each curve is analyzed independently using Univariate detection (Multivariate when Univariate fails and a control is available). Results appear as a landmark table with one row per curve. Landmark definitions match the main Analyzer tab.

📂 Load Data

🧪 Time-Kill: OD vs CFU Comparison

Specialized analysis for experiments combining optical density (OD) measurements with colony-forming unit (CFU) plating in the same run. Loads three curves — phage-free bacterial OD, with-phage OD, with-phage CFU — and addresses two distinct biological questions.

Question 1 — When did bacterial genetic killing occur? (time-kill, loss of colony-forming ability — the genetic / culturability sense of "killing"). The CFU drop is the ground truth: CFUs measure cells that can still divide. The report ranks OD-based candidates (deviation onset, deviation, ODmax, end-of-lysis) by how closely each matches the CFU 10× drop time. Deviation is the leading hypothesis here because, unlike ODmax or end-of-lysis, its timing captures the moment biomass accumulation in the phage-containing culture first lags the control — temporally upstream of any lysis-based observable.

Question 2 — How and when did phages affect bacterial structural wholeness? (cumulative lytic effect on culture biomass — the structural / physical sense of "impact"). This is a different biological question from Q1: cells can be genetically dead (Q1) long before they physically lyse (Q2). Phages first commit cells to death (deviation begins), then later lyse them (OD declines), and eventually extinction of turbidity (end-of-lysis). Q2 has both a temporal component (ODmax, end-of-lysis times) and a magnitude component (VI, CI — AUC-based scalars). There is no CFU equivalent for Q2 — CFU measures viable cells, not turbidity.

The literature has often conflated these two questions, treating AUC-based virulence as if it answers "when did killing happen." It does not — AUC produces a scalar, not a time. The CFU comparison in this report makes the distinction operationally clear.

💡 Working hypothesis: Threshold deviation appears to be the most useful estimator of bacterial killing time, with appropriate sampling frequency. See the Conclusions from Limited Experimentation box in the 💡 Concept tab for the five reasons supporting this and the sampling-frequency caveat. The Time-Kill comparison below lets you test this against your own paired OD+CFU data.
Detection method used: All deviation timings shown here come from Univariate Detection on the phage-containing OD curve (R or T). Univariate uses only the with-phage curve and works well for the manually-collected, relatively sparse datasets typical of this tab. Multivariate Detection compares treatment-curve and control-curve slopes and is theoretically more robust to non-exponential bacterial growth, but it requires denser sampling than is usually available in manual experiments — when both slope series are noisy, the differenced residual becomes noisier still. Statistical detection is intended for very noisy data. For Multivariate or Statistical comparison on the same dataset, run it through the 🔬 Analyzer tab.

A downloadable HTML report includes all inputs, outputs, charts, and AI-parsing metadata, suitable for archival, supplementary materials, or upload back to Claude for synthesis across experiments.

Load Time-Kill data




ℹ️ Accepted data format

Paste data with this column structure (tab- or comma-separated; header row recommended):

Time | "B" OD | Time | "R" OD | Time | "R" CFUs

Each curve may have its own time column (typical for plate-reader and manual experiments where readings are sequential). All six columns are required.

Column meanings: "B" = phage-free bacterial culture; "R" = with-phage culture (R = reaction or resistance-testing); OD = optical density (any units); CFUs = colony-forming units per ml.

📊 Load an example dataset
Eight T1 experiments + five paired T4 experiments — eighteen datasets total
Phage T1 (short latent period, single phage per experiment) — eight chronological experiments establishing the deviation-corresponds-to-CFU-time-kill hypothesis:
T1 Exp 1 (2025-12-13a): pilot pair, day 1
T1 Exp 2 (2025-12-13b): pilot pair, day 1
T1 Exp 3 (2025-12-14a): densest CFU sampling
T1 Exp 4 (2025-12-14b): sharp lytic decline
T1 Exp 5 (2025-12-15a): standard
T1 Exp 6 (2025-12-15b): noisier OD
T1 Exp 7 (2025-12-16a): noisier OD
T1 Exp 8 (2025-12-16b): standard
Phage T4 (r48 rapid-lysis mutant vs WT) — five paired experiments demonstrating that deviation-based timings track CFU killing even when ODmax fails (T4 WT plateau-and-rise profiles):
T4 Exp 1 (2025-12-05a): slow killing
T4 Exp 2 (2025-12-06a): moderate killing
T4 Exp 3 (2025-12-09a): coarser CFU sampling
T4 Exp 4 (2025-12-09b): fast killing
T4 Exp 5 (2025-12-12a): densest CFU sampling

About the example datasets: Eighteen datasets organized as two phage groups. Phage T1 (Experiments 1–8): eight chronological single-phage experiments acquired between 2025-12-13 and 2025-12-16 in E. coli B. T1 has a short latent period (~5 min); the OD curve produces a clean lytic peak. These eight experiments establish that deviation onset on the OD curve corresponds to CFU 50% drop time with a mean absolute offset of about 3–5 minutes (n=8). Because T1's latent period is short, ODmax also corresponds reasonably to the CFU 10× drop (~1.6 min mean absolute offset) — this is an expected consequence of short latent period rather than evidence that ODmax is generally reliable. Phage T4 (Experiments 1–5, ten datasets): five paired experiments acquired between 2025-12-05 and 2025-12-12 (chronologically earlier than the T1 series but reported second because T4 introduces the more complex r48-vs-WT comparison) in E. coli B. Each T4 experiment compares T4 r48 (rapid-lysis mutant, short latent period, deep OD lysis trough) against T4 WT (longer latent period, frequently producing a plateau-and-rise OD profile without a clear lytic peak). These five paired experiments demonstrate that when latent period is longer and the OD curve lacks a clean lytic peak, ODmax fails by tens of minutes while deviation-based timings still track CFU killing within ~3–5 min. The within-experiment T4 r48-vs-WT difference in deviation onset is exactly 0.50 min in all five experiments — at the limit of OD sampling resolution — directly demonstrating that deviation captures the bacterial killing event (shared between r48 and WT) rather than the lysis event (which differs by tens of minutes). Together, the T1 and T4 datasets establish that deviation-based detection is latent-period-independent while ODmax-based detection is reliable only for short-latent-period phages. T1 Experiments 1, 4, 5, 6, 7, 8 had below-detection CFU entries excluded; T4 Experiment 3 had spurious zero CFU entries removed. The data loaded by these buttons are the cleaned versions used in the manuscript analysis.

📖 Methods

📑 Contents

Overview

The Phage OD Deviation Calculator implements three detection approaches, described in order from least to most complex. Each is described in the 💡 Concept tab; this tab covers operational details, output interpretation, and guidance on using the calculator effectively.

The Three Approaches

Univariate Detection

Univariate Detection operates on the treatment curve alone — no phage-free control is required. It computes the first derivative of OD with respect to time (d(OD)/dt, Panel A of Figure 1) at each timepoint using a short sliding-window OLS regression. During exponential growth this rises continuously; deviation is detected as the first sustained drop from the rising curve. Panel B (d(ln OD)/dt) serves as a noise diagnostic — a flat Panel B confirms clean exponential growth; a noisy Panel B warrants caution. Reliability is measured by the pre-deviation R² (Univariate only) and the noise level (σ/peak slope, comparable between Univariate and Multivariate).

Univariate Detection is most powerful when pre-deviation exponential growth spans a sufficient number of timepoints, and when deviation occurs while growth is still exponential, which is best achieved by starting experiments with log-phase bacteria that are adapted to experimental conditions. See the Concept tab for a discussion of experimental flexibility.

Multivariate Detection

Multivariate Detection requires a phage-free control curve. At each timepoint it computes the first derivative d(OD)/dt (Panel A of Figure 2) for both treatment and control curves. When phage have no effect, both first derivatives track together on the rising curve. Deviation is detected as the first moment the treatment first derivative drops and stays below the control first derivative. Panel B (d(ln OD)/dt for both curves) serves as a noise diagnostic. No curve fitting or assumption about growth shape is required.

Multivariate Detection is most useful when pre-deviation growth is not cleanly exponential (low Univariate R² or high noise level), but the phage-free control curve provides a reliable empirical reference.

Statistical Detection

Statistical Detection also requires a phage-free control curve. At each timepoint and for each combination of window size, threshold fraction, and minimum consecutive points, the ratio of treatment slope to control slope is tested. When the ratio drops below the threshold and stays there for the required number of consecutive points, a deviation is recorded. This is run across a full grid of parameter combinations — two sub-approaches (stat-raw using raw OD slopes; stat-ln using ln-OD slopes) — and all detections are trimmed and averaged to produce a robust consensus estimate.

Statistical Detection is most useful when data is too noisy for the slope-change calculus of Univariate or Multivariate — the grid sweep and trimming provide robustness against individual noisy readings that would otherwise cause false detections.

The stat-raw and stat-ln sub-approaches are trimmed independently; their trimmed means are combined with equal weight: Statistical = (stat-raw + stat-ln) / 2.

Results Summary Table

What "0.95 ×μ_peak" means: A threshold of 0.95 means d(OD)/dt must drop below 95% of its peak value to register a sustained-drop event. This is a fraction of the peak first derivative — a multiplicative threshold against a known reference. The same notation now applies to both Univariate and Multivariate (sharing the unified 5%-drop threshold), where Multivariate's cutoff = pre-deviation mean − (1 − 0.95) × peak_treatment_slope, giving the threshold the same meaning of "5% drop from the treatment curve's peak first derivative."

OD_max for each approach: Univariate and Multivariate report the same interpolated zero-crossing of d(OD)/dt — a continuous, calculus-based estimate. Statistical does not use derivatives, so it reports OD_max as the discrete timepoint at which the maximum measured OD occurred — an actual data point. These two definitions agree closely but are not identical (the interpolated zero-crossing may fall between sampling intervals; the discrete max is snapped to a measured timepoint).

Deviation onset (= time of peak d(OD)/dt): Shown for both Univariate and Multivariate since both compute the first derivative of the treatment curve and find its peak. Mathematically, deviation onset is the zero-crossing of d²(OD)/dt² going from positive (growth accelerating) to negative (growth decelerating), which is equivalent to the time at which d(OD)/dt attains its maximum. The two values should match (same curve, same algorithm). Not applicable to Statistical, which doesn't compute derivatives. Caveat: on datasets where the bacterial culture exits mid-log phase before phage-induced lysis (e.g., long plate-reader runs with slow-acting phage), peak d(OD)/dt occurs during the natural deceleration of the host culture, not at the phage event. Univariate cannot distinguish these cases on its own; Multivariate, which uses the phage-free control curve to subtract out natural deceleration, is the appropriate approach for such datasets.

Pre-deviation R²: Shown for Univariate only. Measures how flat the d(OD)/dt slope series is during the pre-deviation period — high values (e.g. >0.85) indicate clean exponential growth and reliable detection; low values indicate that the treatment curve was not cleanly exponential before deviation. R² is not shown for Multivariate because Multivariate's regression-of-slope-differences metric is structurally low even for excellent data (see Math tab §4 for full explanation).

Noise level (σ / peak slope): A directly comparable noise metric for both Univariate and Multivariate. Computed as the standard deviation of slope values in a ±5-point window around the peak slope, divided by the peak slope. The window is positioned where the slope is approximately constant (at its maximum), so variation within it represents noise rather than the rising trend of exponential growth. Lower is better: ~0% = essentially noiseless; 5–10% = mild noise; 25%+ = noisy. Multivariate combines noise from two independently noisy curves, so its noise level is typically higher than Univariate on the same data.

Std dev (across methods): Shown only for Statistical Detection, where the threshold × window-size grid produces multiple deviation-time estimates whose spread is informative. For Univariate and Multivariate (which use a single shared 5% threshold), all methods within an approach return the same interpolated crossing time — the spread is zero by construction, which is not informative, so the row is omitted for those approaches.

AUC-based analysis (4th column): Three whole-curve summary metrics are computed alongside the landmark-based deviation detection: raw AUC (the trapezoidal area under each curve), Virulence Index (VI) per Storms et al. 2020, and Centroid Index (CI) per Hosseini et al. 2024. Each is computed over three integration windows: 0 → end of data (the traditional whole-experiment window), 0 → end-of-lysis (excludes post-extinction bacterial regrowth), and TD → end-of-lysis (isolates the phage-active phase, anchored at threshold deviation — the universal cross-approach deviation comparative used everywhere in this calculator). Raw AUC is always computed; VI and CI require a phage-free control curve. VI = 1 − (AUC_treat / AUC_ctrl), ranging from 0 (no impact) to 1 (perfect killing). CI = 1 − (x̄_t · ȳ_t) / (x̄_c · ȳ_c), additionally sensitive to when in the experiment the OD-mass was distributed (later mass — e.g., regrowth — penalizes the index). Negative CI values are displayed as-is and indicate the phage-treated curve had higher OD-weighted mass than the control (typically due to substantial bacterial regrowth). These AUC-based metrics are useful for comparison with the existing literature but have known limitations (whole-curve summaries cannot distinguish phage-mediated bacterial killing from later regrowth of phage-resistant bacteria; they conflate multiple temporally distinct biological events; and they depend strongly on the integration window). The landmark-based deviation detection in columns 2–4 addresses these limitations directly by isolating specific time points rather than integrating across the whole curve.

The results table shows four columns — Metric | Univariate | Multivariate | Statistical — for each curve analyzed. Deviation times for Univariate and Multivariate are computed using first-derivative (d(OD)/dt) interpolation and the halfway method described above. Pre-deviation R² (Univariate only) indicates how cleanly exponential pre-deviation growth was; noise level (σ/peak slope) is shown for both Univariate and Multivariate for direct comparison. When all three approaches agree closely, you have strong multi-method evidence for the deviation time. When they disagree, the pattern is informative:

  • Univariate earlier than Statistical → pre-deviation exponential growth was clean; Univariate is detecting the true early signal
  • Univariate later than Statistical, or Univariate absent → pre-deviation growth was not cleanly exponential; Statistical or Multivariate may be more reliable
  • Multivariate between the two → typical; residual slope detection is intermediate in sensitivity

If a reference curve is loaded it is automatically analyzed, and its results table appears directly below the treatment table for easy comparison.

Three Landmarks, Two Killings

The phage-bacterial OD curve is best understood as a sequence of three calculus landmarks, each marking a distinct biological event:

  • Deviation onset (first inflection point of OD; peak of d(OD)/dt; second derivative crosses zero) — onset of phage-mediated bactericidal commitment.
  • Lysis onset (maximum of OD; d(OD)/dt = 0; second derivative at minimum) — onset of population-wide cell lysis.
  • End-of-lysis (second inflection point of OD; minimum of d(OD)/dt; second derivative crosses zero again) — moment when the lysis cascade begins to subside (sometimes described as "extinction" of a culture's previous turbidity).

This calculator reports all three. The deviation onset is reported in two flavors: "earliest" (calculus-based midpoint) and "threshold" (interpolated 5%-drop crossing). Lysis onset is reported as both the interpolated zero-crossing (calculus-based) and the discrete OD maximum (data-based). End-of-lysis is reported as the midpoint of the bracket around the minimum d(OD)/dt.

OD_max and Deviation Time Definition

Why threshold-based detection matters: The threshold-based deviation time (midpoint of the bracket where d(OD)/dt drops below threshold×μ_peak for ≥ minConsec consecutive points) serves two purposes: (1) it is directly comparable within an approach across experiments — since both Univariate and Multivariate use the same bracket-midpoint logic, threshold times from the same approach can be compared across datasets; (2) it is more robust than the "earliest" estimate for data that is continuous or nearly continuous, where the first derivative decreases gradually rather than dropping sharply — a threshold requirement prevents detecting trivially small initial drops. The "earliest" estimate (Univariate only) gives the theoretical lower bound but has no Multivariate equivalent because the difference series in Multivariate is doubly noisy.

Expected ordering of estimates: earliest ≤ threshold ≤ OD_max. The earliest estimate should never be later than the threshold estimate; the threshold estimate should never be later than OD_max (the zero-crossing). This ordering is mathematically expected: the "earliest" fires at the first drop from peak, the threshold fires only after a sustained drop, and OD_max is where the curve has already peaked. Violations of this ordering indicate data quality issues.

OD_max is defined as the time at which the first derivative d(OD)/dt crosses zero — computed by linear interpolation between the last timepoint where d(OD)/dt > 0 and the first timepoint where d(OD)/dt < 0. This gives a continuous time estimate, not restricted to a measured timepoint. The threshold-based deviation time is computed as the interpolated crossing time: linear interpolation between the last above-threshold and first below-threshold timepoints gives the exact time where d(OD)/dt crosses the threshold. This is a continuous estimate independent of the sampling interval — deviation is not forced to occur at a measured timepoint. The threshold and minimum-consecutive parameters are still used to confirm the sign change is real (not a single noisy point), but the reported time is always this midpoint.

Statistical Detection — Individual Method Results

Note: by default, these individual-method tables are hidden to reduce clutter; they are revealed on user request via the "Show Statistical Detection Method Details" toggle in the results display.

Green cards show Statistical Detection methods included in the trimmed mean; red cards show excluded outliers. Stat-raw and stat-ln methods are displayed in separate side-by-side grids. This transparency lets you assess consensus quality and identify any outlier parameter combinations.

Univariate Detection — Figure 1 (Slope Charts)

Figure 1 shows two side-by-side panels for the treatment curve:

  • Panel A: d(OD)/dt on a linear scale — the actual signal used for detection. The peak of this curve marks the first inflection point of OD (= deviation onset); its zero-crossing marks OD_max (= lysis onset); its minimum marks end-of-lysis. The horizontal green line shows the peak slope (μ); the dashed line shows the threshold (default 5% drop = 0.95×μ).
  • Panel B: d(ln OD)/dt — included as a noise diagnostic. During clean exponential growth this curve should be approximately flat at the value μ (the exponential growth rate); deviations from flatness reveal noise.

Vertical markers across both panels indicate the calculus-based "earliest" deviation (orange), the threshold-based deviation (green), OD_max (purple), and end-of-lysis (red). The same set of markers appears on Multivariate Figure 2 below.

The x-axis range can be adjusted via the X-min and X-max controls in the Figure 1 and Figure 2 toolbars; both endpoints synchronize across the two figures for direct comparison. X-min cuts off the early portion of the curve (the rising exponential phase); X-max cuts off the late portion (post-lysis). Useful for zooming in on the peak region when investigating ODmax divergence or end-of-lysis timing.

Deviation vs. Traditional Time-Kill: A Precision Argument

Traditional time-kill curves measure bacterial viability by plating at coarse intervals (typically 30 min to several hours). This coarseness is a feature when the goal is a qualitative distinction — culture alive vs. culture dead — and a limitation when the goal is precise timing. Time-kill methodology has traditionally all but abandoned timing precision in favor of robust binary outcome scoring.

OD-based deviation detection inverts this trade-off. Because OD is measured continuously and at high frequency, and because deviation timing is computed via interpolation rather than snapped to a measured timepoint, deviation gives a quantitative, sub-sampling-interval estimate of when phage killing first manifests in population dynamics. The "earliest" estimate captures the most sensitive possible detection; the "threshold" estimate (5% drop from peak) provides a more robust, consistent landmark that allows direct comparison across approaches and between datasets. Both are continuous in time.

An important caveat: deviation at threshold occurs later than the earliest detectable departure from exponential growth, and therefore corresponds to a state in which somewhat more bacteria have been productively infected than at the earliest point. Whether this matters depends on the question — for comparing phage-host pairs the threshold estimate is reproducible and comparable; for inferring the absolute earliest kinetics, the calculus-based "earliest" estimate is more sensitive.

What Deviation Onset Does and Does Not Mean Biologically

Unless deviation is defined very late (e.g., at or near OD_max), deviation onset does not mean that all (or even a majority of) phage-sensitive bacteria have been infected. Rather, it marks some aspect of the start of that process — the moment when biomass accumulation in the phage-containing culture first measurably lags that of the phage-free control. By the time of deviation onset, only a fraction of bacteria may yet have been productively infected; the rest will be infected over the remaining course of the experiment.

Caveat: this interpretation may apply less directly to phages whose infection does not substantially impact bacterial replication rates during the infection — for such phages, deviation timing reflects more directly the timing of lysis itself than the timing of bacterial death-commitment.

Limitations of Multi and Statistical When Cultures Age

An important consideration for Multivariate and Statistical Detection: when bacterial cultures are older at the point of deviation — i.e., the phage-free control curve has begun to deviate from clean exponential growth due to nutrient depletion, density-dependent slowing, or stationary-phase entry — it can take a very long time before the treatment curve reaches OD_max or undergoes the lysis-to-extinction transition. Multi and Statistical Detection compare treatment against a control whose own dynamics are no longer exponential, which complicates their interpretation. In such cases, Univariate Detection (which uses only the treatment curve and seeks its own inflection point) is often more reliable, since it does not require the control to be cleanly exponential at the deviation point.

Diagnostic Value of No-Deviation Outcomes

When the calculator detects no deviation from exponential growth — that is, when the slope d(OD)/dt does not drop persistently below its peak value — this is itself an important diagnostic result, not a failure of detection. A no-deviation outcome strongly suggests one of:

  • Null phage impact — the phage is not effectively killing this bacterium under the conditions tested (resistance, insufficient adsorption rate, restriction, lysogeny, or a mismatch of phage and bacterial physiology).
  • The experiment ended too early — deviation would have occurred outside the observation window.
  • Bacterial growth was atypical — the pre-deviation slope never stabilized (e.g., extended lag, biphasic growth), making the "drop from peak" criterion fail by construction.

The first interpretation — null phage impact — is biologically informative and worth reporting in its own right. In phage-bacterial screening, a clean "no deviation" outcome distinguishes ineffective phage-host pairs from those producing measurable killing, even before considering quantitative deviation timing.

Recommended Experimental Practice

Starting with log-phase (exponentially growing) bacteria produces cleaner pre-deviation OD curves and more reliable deviation detection. OD rises almost immediately from inoculation, the slope series reaches a clear plateau quickly, and there is less ambiguity about where the pre-deviation phase begins. A one- or two-timepoint instrument-settling artifact at t=0 is normal and does not affect detection.

Auto-Parameter Adjustment

Window sizes for Statistical Detection are automatically adjusted based on data spacing:

  • Data spacing: Tightly-spaced data (1–5 min intervals) uses smaller windows; sparse data (10+ min intervals) uses larger windows
  • Target duration: Windows are sized to cover approximately 15–45 minutes of actual time, regardless of sampling frequency

Charts

  • Univariate — Figure 1 (Slope Charts): Two panels — d(OD)/dt (linear, used for detection) and d(ln OD)/dt (noise diagnostic) — with threshold lines and landmark markers
  • Deviation Focus: Zoomed view of the OD curves centered on the deviation timepoint
  • Lysis Focus: Extended view showing complete lysis (appears only if data extends well beyond deviation)
  • Full Range: Complete treatment data for context

Comparing Multiple Treatments

  1. Run the analysis separately for each treatment (different browser tabs, or re-upload)
  2. Use the 📋 Copy Thresholds button to ensure identical Statistical Detection parameters across all analyses
  3. Download results as CSV for each treatment and compile in a spreadsheet

Contact & Support

For questions, bug reports, or methodology discussions: deviation@phage.org

Citation

To cite this tool: Abedon, S.T. (2026). Phage OD Deviation Calculator. deviation.phage.org. 10.5281/zenodo.19023877

Additional manuscripts describing the computational methodology and validation of the Deviation approach are in preparation.

⚙️ Tech

📑 Contents

A precise account of how the Phage OD Deviation Calculator detects the three landmarks of the phage-bacterial OD curve — deviation onset, lysis onset (OD_max), and end-of-lysis — together with the quality metrics, parameters, and pseudocode, suitable for methods sections and peer review.

1. Overview — Three Landmarks, Two Killings

The calculator analyzes a phage-bacterial optical-density (OD) curve to extract three biologically meaningful landmarks corresponding to successive features of the second derivative d²(OD)/dt²:

  • Deviation onset — first inflection point of OD; peak of d(OD)/dt; second derivative crosses zero (positive → negative). Marks phage-mediated bactericidal commitment (the first killing).
  • Lysis onset — OD maximum; d(OD)/dt = 0; second derivative at minimum. Marks population-wide cell lysis (the second killing).
  • End-of-lysis — second inflection point of OD; minimum of d(OD)/dt; second derivative crosses zero again (negative → positive). Marks the moment the lysis cascade begins to subside ("extinction").

Deviation onset is the operationally most informative landmark for inferring phage time-kill, since it precedes the latent-period delay inherent in lysis-based detection. All three landmarks are reported in the results table.

Three detection approaches are implemented for deviation onset: Univariate Detection (single-curve, first-derivative-based), Multivariate Detection (two-curve, first-derivative-based), and Statistical Detection (two-curve, slope-ratio grid). All three are run when a phage-free control curve is provided; only Univariate Detection runs without one. Figures 1 and 2 in the Analyzer show Panel A (d(OD)/dt, used for detection) and Panel B (d(ln OD)/dt, noise diagnostic) for Univariate and Multivariate respectively.

2. Data Preparation and Alignment

Control and treatment OD time series are extracted from the uploaded file. If separate time columns are provided, the treatment series is interpolated onto the control time grid using linear interpolation. A minimum of 10 valid timepoints is required.

3. Instantaneous Slope Estimation

For all three approaches, local slopes are estimated using a 3-point sliding window of ordinary least-squares (OLS) linear regression. For a given window size W and timepoint i:

slope = (n·ΣxᵢYᵢ − ΣxᵢΣYᵢ) / (n·Σxᵢ² − (Σxᵢ)²)    // OLS

For Univariate and Multivariate Detection, this window is fixed at 3 points. For Statistical Detection, window sizes target 15, 30, and 45 minutes of elapsed time.

4. Univariate Detection Algorithm

Operates on the treatment curve alone. Detects the first inflection point of OD — equivalently, the peak of d(OD)/dt — and reports it in two flavors (earliest and threshold-based). Also computes lysis onset (zero-crossing of d(OD)/dt) and end-of-lysis (minimum of d(OD)/dt).

// Step 1: Compute d(OD)/dt at each timepoint (3-point OLS on raw OD)
localSlope[i] = OLS slope of OD_treatment over points [i-3..i]

// Also compute d(ln OD)/dt for noise diagnostic (Panel B)
lnSlope[i] = OLS slope of ln(OD_treatment) over points [i-3..i]

// Step 2: Training window = first 25% of timepoints
fitEndIdx = floor(n × 0.25)

// Step 3: Find peak d(OD)/dt in first 75% of data (= deviation onset landmark)
μ_peak = max(localSlope[i] for i ≤ 0.75·n)
t_peak = time at which μ_peak occurs

// Step 3b: Zero-crossing of d(OD)/dt (= lysis onset = OD_max)
t_lysisOnset = linear interpolation between last-positive and first-negative slope

// Step 3c: Minimum of d(OD)/dt after lysis onset (= end-of-lysis)
t_endOfLysis = midpoint of bracket around min(localSlope[i] for i > t_lysisOnset)

// Step 4: Correlation coefficient R² of pre-peak slope series (quality metric)
R² = flatness of slope series up to peak (0–1; higher = cleaner exponential growth)

// Step 5: Detect first sustained drop below threshold × μ_peak
// Thresholds: 0.75, 0.85, 0.95 × μ_peak
// minConsecutive: 2, 3, ... (at least 2 required)
// Report first timepoint of sustained run

// Step 6: Trimmed mean across threshold × minConsecutive grid
trimCount = ceil(n × 0.25) from each end
uniMean   = mean of included deviation times

5. Multivariate Detection Algorithm

Requires phage-free control curve. Detects when the slope of the difference between treatment and control ln-OD first drops persistently below zero.

// Step 1a: Compute d(OD)/dt for both curves (3-point OLS on raw OD) → Panel A
treatLinSlope[i] = OLS slope of OD_treatment over points [i-3..i]
ctrlLinSlope[i]  = OLS slope of OD_control  over points [i-3..i]

// Step 1b: Compute d(ln OD)/dt for both curves → Panel B (noise diagnostic)
lnDiff[i]       = ln(OD_treatment[i]) − ln(OD_control[i])
diffSlope[i]    = OLS slope of lnDiff over points [i-3..i]

// Step 2: Training window = first 25% of timepoints
// During pre-deviation phase, diffSlope ≈ 0 (both growing at same rate)

// Step 3: Characterize training slope series
μ̄  = mean(diffSlope in training window)   // ≈ 0 pre-deviation
σ  = SD(diffSlope in training window)     // noise floor
R² = NOT computed for Multivariate (structurally low; see Math tab §4)
// Noise level = SD(diffSlope) / peakTreatSlope (relative noise, comparable to Uni)

// Step 4: Detect first sustained drop below μ̄ − k×σ
// k = 1.0, 1.5, 2.0; minConsecutive ≥ 2
// Report first timepoint of sustained run

// Step 5: Trimmed mean across k × minConsecutive grid

6. Statistical Detection Algorithm

Requires phage-free control curve. Runs two sub-approaches (stat-raw and stat-ln) across a full parameter grid and takes a trimmed mean consensus.

// For each window size W ∈ {W₁₅, W₃₀, W₄₅}:
//   For each threshold T ∈ {0.75, 0.85, 0.95}:
//     For each minConsecutive C:
//       Compute treatmentSlope[i] and controlSlope[i] (OLS over W points)
//       ratio[i] = treatmentSlope[i] / controlSlope[i]
//       Flag timepoint when: ratio < T AND controlSlope > 0
//       Deviation = first timepoint of ≥ C consecutive flags
//       → one method result per (W, T, C, approach)

// stat-raw: OLS on raw OD values (absolute growth rate)
// stat-ln:  OLS on ln(OD) values (specific growth rate; skipped if any OD ≤ 0)

// Trimming per sub-approach:
sorted    = methods.sort(ascending by deviationTime)
trimCount = ceil(n × 0.25)
included  = sorted[trimCount … n − trimCount]
rawMean   = mean(included stat-raw times)
lnMean    = mean(included stat-ln times)

// Combined Statistical mean:
statMean = (rawMean + lnMean) / 2   // equal-weighted

7. Auto-Parameter Selection (Statistical Detection)

Parameter Default Derivation
Window sizes (W)Auto: targets 15, 30, 45 minmax(3, round(target / avgSpacing))
Thresholds0.75, 0.85, 0.95Fixed; user-adjustable ±0.05
Min consecutive (C)Auto: derived from window sizemax(2, round(W / 4))
Trim fraction25% from each end, per sub-approachceil(n × 0.25) independently
Control slope guardcontrolSlope > 0 requiredPrevents detection during flat/declining control

8. Reported Outputs

  • Univariate: trimmed mean deviation time, SD, range, methods (incl/total), pre-deviation R², noise level σ/peak, peak slope μ, training window end
  • Multivariate: trimmed mean deviation time, SD, range, methods (incl/total), noise level σ/peak (R² not computed — structurally low), slope mean μ̄
  • Statistical: trimmed mean (equal-weighted stat-raw + stat-ln), SD, range, methods (incl/total); individual method cards (green = included, red = excluded)

9. Limitations and Assumptions

  • Univariate: requires cleanly exponential pre-deviation growth; unreliable if pre-deviation R² is low (< ~0.85) or noise level is high (> ~25%), or if too few pre-deviation timepoints exist
  • Multivariate: requires that treatment and control share the same growth environment; noise in either curve propagates into the slope difference
  • Statistical (stat-ln): skipped entirely if any OD value ≤ 0
  • All approaches detect only the first sustained deviation; secondary deviations are not reported
  • Linear interpolation onto the control time grid introduces errors that can be substantial when treatment timepoints are sparse and the underlying curve is changing rapidly — exponential growth is nonlinear, so linear interpolation between widely-spaced points underestimates the true curve. Tight sampling (1–5 min) minimizes this; sparse sampling (≥10 min) does not

To cite this tool: Abedon, S.T. (2026). Phage OD Deviation Calculator. deviation.phage.org. https://doi.org/10.5281/zenodo.19023877

🧮 Phage Biology, Phage Therapy, and Teaching Calculators

Loading calculators…

📐 KOTE Calibration & Titer Estimation

Development preview — not yet publicly linked

This tab implements two functions for kinetic optical density-based phage titer estimation (KOTE assays). Calibration Generator: upload OD curves with known titers (at one, two, or three bacterial concentrations) to produce a reusable calibration JSON encoding the best-performing metrics and their regression parameters. Titer Estimator: load a calibration JSON and upload an unknown OD curve to obtain an ensemble titer estimate weighted across all qualifying metrics.

⚠️ Equivalence requirement: Calibration and estimation experiments must be run under identical conditions — same bacterial strain, growth phase, media, temperature, plate reader wavelength, time interval, and starting bacterial concentration(s). Calibration curves generated in one laboratory may not transfer directly to another.
💡 Dilution spacing: Finer dilution series produce more reliable calibration curves. Two-fold dilutions are ideal for calibration; no coarser than four-fold is recommended. Ten-fold dilutions provide insufficient resolution for robust BLR analysis.

💡 Estimating unknown titers: Submit multiple unknown curves at different dilutions rather than a single curve. If the titer is completely unknown, use ten-fold dilutions spanning 3–4 orders of magnitude. If the titer is approximately known, use two-fold dilutions over 1–2 orders of magnitude centered on the expected titer for maximum precision. Multiple curves within the calibrated range are averaged by the ensemble estimator, substantially improving accuracy.

Step 1: Experimental Conditions

Step 2: Upload Calibration Curves

Upload one CSV per bacterial concentration. CSV format: first column Time_min, then one column per known titer with the titer value (PFU/ml) as the column header. Include a column headed 0 or control for the no-phage control. Each OD value should be the mean of technical replicates. Up to three bacterial concentrations supported.

Concentration A
Concentration B (optional)
Concentration C (optional)

Step 3: Analysis Settings

🧫 Simulation Data Analyzer

Development preview — not publicly linked

Upload or paste output from a phage–bacteria population dynamics model. The calculator synthesizes a simulated culture density curve (B + infected cells), treats B(no phage) as the control, and applies the full deviation-detection algorithm — reporting all landmarks just as the Analyzer tab does for real OD data. All four model variables are plotted together on a shared axis (cells/ml or PFU/ml).

Relationship to the Time-Kill tab: This tab simulates the kind of phage-bacteria experiment analyzed on the 🧪 Time-Kill tab. Where Time-Kill takes measured paired OD+CFU data from a wet-lab experiment, Sim Data takes computed trajectories from the Bull population-dynamics model and runs the same landmark detection on them. The two tabs share landmark definitions and reporting conventions so that simulated and experimental results are directly comparable. A typical workflow: fit the Bull model to a Time-Kill dataset (via the Time-Kill tab's Bull-parameter inference), then come here to explore how landmarks behave under perturbations that would be hard or costly to vary experimentally.

Generate or load a simulation


🧬 Run Bull Simulation — modify parameters to generate a TSV (click to expand)

Coupled recurrence equations for phage-bacteria dynamics with delayed lysis (Bull, in preparation). Output TSV is in Jim's standard format and loads directly into the analysis pipeline below.

💧 Drop TSV / CSV / TXT / JSON file here, or use the buttons below
📋 Paste data instead (TSV / CSV / JSON text)
ℹ️ Accepted file formats

Sim Data JSON (canonical format, produced by this calculator or Jim's model):
{"model_parameters":{"k":…,"b":…,"L":…},"data":[{"time":…,"B_nophage":…,"B_uninfected":…,"Pf":…,"inf_cells":…},…]}

Jim-format TSV (auto-detected by k=…b=…L=… header line):
Row 1: model parameters  ·  Row 2: column headers  ·  Remaining rows: time=X.X   B(no phage) = X   B=X   Pf=X   inf_cells=X

Plain CSV or TSV — five columns, header row required:
time, B_nophage, B_uninfected, Pf, inf_cells (matched case-insensitively)

All concentrations assumed cells/ml (bacteria) or PFU/ml (free phage).

🧫ⁿ n-Sim Data — cross-titer simulation analysis

No multi-titer data loaded.

This tab analyzes simulation data across multiple initial phage densities (P₀). To use it: open the Sim Data tab and load a multi-titer Jim-format TSV file — one with multiple "Initial phage density = …" delimited blocks (e.g., the SA2.tsv format, which stacks six simulations at k, b, L fixed and steps P₀ through 10², 10³, 10⁴, 10⁵, 10⁶, 10⁷).

Once such data is loaded, this tab will display:

  • Cross-titer landmark table — detected DO, TD, ODmax, T3L, PLR, 95% lysis, EOL at each P₀.
  • Landmark vs. log(P₀) chart — each landmark plotted across the titer range, with linear-fit slopes. Theory predicts each landmark shifts earlier by ≈ L per log of P₀.
  • Gap-constancy chart — DO→ODmax, DO→T3L, DO→PLR, DO→EOL across titers. These gaps depend on phage biology, not P₀, so they should be approximately constant.
  • Latent-period recovery — the file header declares the true L. Compare detected DO→T3L (the latent-period proxy) against ground truth across titers as a validation check.
Phage OD Deviation Calculator — deviation.phage.org — DOI: 10.5281/zenodo.19023877 — Version 2026.05.27