Expand description
Plate-reader assay analysis: the standard next steps after reading a plate, as deterministic, documented building blocks.
- Layouts: well roles (blank, standard, sample, positive/negative control, empty),
samples, compounds, concentrations and dilutions from a plate-map grid or long CSV, from
the layout a vendor export embeds (Gen5
Well ID, SkanItSample, BMGContent), or from well flags. - Wells: blank subtraction (mean of the blanks), replicate groups (mean, SD, CV %), outlier flags (modified z-score or Grubbs).
- Standard curves: linear, 4PL, 5PL least squares with weighting, parameter standard errors and confidence intervals, R², residuals, back-calculated concentrations with range flags and LLOQ/ULOQ.
- Dose-response: IC50/EC50 with confidence interval, Hill slope, top and bottom per compound, optionally normalised to controls.
- Kinetics and growth curves: max slope (Vmax), lag, time to max, AUC; growth rate, doubling time, logistic fit.
- Assay quality: Z′, signal/background, signal/noise, SSMD, CVs.
Methods and conventions: book/src/guides/plate-analysis.md. Validation against SciPy, R drc and
growthcurver (run as black boxes) and against vendor-computed results stored in Gen5 and
SkanIt exports: docs/provenance/plate-analysis.md.
§Example
use std::path::Path;
use openreadout_assay::{Analysis, AssayRequest, analyze_file};
use openreadout_core::Registry;
let req = AssayRequest {
analysis: Analysis::Curve,
standards: Some("A1,A2=100;B1,B2=50;C1,C2=25;D1,D2=12.5;E1,E2=6.25".into()),
blank_wells: Some("H1,H2".into()),
..AssayRequest::default()
};
let out = analyze_file(®istry(), Path::new("elisa.txt"), &req)?;
for w in &out.wells {
println!("{} {:?} {:?}", w.well, w.back_calculated, w.flag);
}Modules§
- fit
- Curve models and least-squares fitting: straight line (closed form), four- and five-parameter logistic (Levenberg–Marquardt with analytic derivatives, several starting points), parameter standard errors and confidence intervals, and inverse prediction (back-calculation of a concentration from a signal).
- kinetics
- Per-well kinetic metrics (enzyme-style reads) and growth-curve metrics (OD over hours).
- layout
- Plate layouts: which well holds what (role, sample, compound, concentration, dilution).
- stats
- Descriptive statistics and the Student-t distribution (quantiles for confidence intervals, Grubbs critical values). Written from the textbook definitions: the regularized incomplete beta function by its continued fraction (DLMF 8.17.22) evaluated with the modified Lentz method, and ln Γ by the Lanczos approximation.
Structs§
- Assay
Output openreadout analyze assay-wells|assay-curve|dose-response|kinetics|growth|assay-qc --jsondata.- Assay
Request - An assay-analysis request. Every field has a default;
analysispicks what to compute. - Blank
Summary - Blank subtraction applied.
- Compound
Row - Dose-response of one compound.
- Curve
Point - One point of a fit.
- Curve
Report - Standard-curve report.
- FitReport
- A fitted curve.
- Group
Stats - Statistics of a group of control wells.
- Growth
Row - Growth metrics of one well.
- Kinetic
Row - Kinetic metrics of one well.
- Layout
Summary - Layout summary.
- Obs
- One value.
- Outlier
Summary - Outlier rule and result.
- Param
Row - One fitted parameter.
- Plate
Data - A plate: its reads, values and any layout the file embeds.
- Quality
Report - Assay quality of the plate (values as read, before blank subtraction).
- Read
Info - One measurement channel.
- Read
Summary - The read analysed.
- Sample
Row - One replicate group.
- WellRow
- One well.
Enums§
- Analysis
- The analysis to run.
- Blank
Mode - Blank subtraction.
- FitOn
- What the standard curve is fitted to.
- Normalize
- Dose-response normalisation.
- Outlier
Rule - Outlier rule within a replicate group.
- Reduce
- How a kinetic read becomes one value per well in the endpoint analyses (wells, curve, dose-response, qc).
Constants§
- DEFAULT_
GRUBBS_ ALPHA - Default Grubbs alpha.
- DEFAULT_
MAD_ THRESHOLD - Default modified z-score cut-off.
- DEFAULT_
WINDOW - Smallest default window (points); the default is this or a tenth of the time points,
whichever is larger (
crate::kinetics::default_window). - LOQ_
TOLERANCE_ PERCENT - Standards whose mean back-calculated recovery is within 100 ± this percent (and CV at most this) set LLOQ/ULOQ.
- MAD_
MIN_ GROUP - Smallest replicate group the modified z-score is applied to (the MAD of fewer values is degenerate: with three values it is the smaller of two distances).
Functions§
- analyze_
file - Run
reqon the plate inpath(seeload_plate). - load_
plate - Load the plate of
path: a long CSV (well,value, …) is read directly; anything else is opened with the registry (plate-reader exports). - render_
plot - Render the curve of a
curveordose-responseresult as PNG bytes.Nonewhen the result has no curve. - render_
text - A human-readable summary of a result.
- run
- Run an analysis on a plate.
useris the layout fromuser_layout. - to_csv
- Rows as CSV: the union of the rows’ keys in first-seen order; nested
extramaps are flattened toextra.<key>. - user_
layout - Build the user layout of a request: the layout file, then
layout_text, then the well flags (blank_wells,positive_wells,negative_wells,empty_wells,standards), each overriding the previous well by well. - write_
tables - Write the tidy tables of
outunderprefix; returns the paths written. A table path that is one ofinputsis refused.