Cleavr · Tools

qFlow: quantitative flow cytometry workbench

A single-page workbench for the quantitative-flow-cytometry family: absolute receptor quantification from calibration beads, MESF/ERF/ABC unit conversion, %positive gating and MFI from event-level data, stain and separation indices, spillover compensation, and FCS-file parsing. Everything runs locally in your browser, and nothing is uploaded or stored. The receptor-quantification and subtype logic are numerically identical to receptor_quantification.py and flow_cytometry_validation.py; the browser and the scripts produce the same numbers on the same input.

Fit a per-date calibration curve (linear or log-log), convert raw MFI into absolute antibody binding capacity (receptors per cell), and compare the protein-level subtype pattern against the RNA-level pattern from the computational screen. Absolute counts require a fitted calibration curve; rows without one are excluded and flagged, never approximated from a raw MFI/isotype ratio.

1. Calibration beads

one row per bead population per calibration run

molecules_per_bead comes from the bead kit's lot-specific certificate of analysis, not measured. Need at least 3 populations per date to fit a curve.

Date Bead lot Population Molecules / bead MFI

2. Measurements

one row per experiment: cell line × gene × replicate

Cell lines are matched against the Lehmann-subtype lookup table (Lehmann et al. 2011, PMID 21633166; cross-checked by Espinosa Fernandez et al. 2020, PMID 32353087). Unrecognized cell line names are flagged, not silently dropped.

Date Cell line Gene MFI Isotype MFI % positive Replicate Notes

3. RNA reference (optional)

for protein-vs-RNA subtype concordance

Paste the group_medians block from a gene's results/<gene>/<gene>_analysis_results.json (produced by biomarker_pipeline.py), or upload the whole file. One entry per gene you're testing.

Calibration curves

Run analysis to fit calibration curves.

Quantification results

Run analysis to compute ABC / receptors per cell.

Subtype comparison

Run analysis to compare protein vs. RNA patterns across subtypes.

Log

Nothing run yet.

Convert raw fluorescence (MFI) into standardized units: MESF (molecules of equivalent soluble fluorochrome), ERF (equivalent reference fluorophores, the NIST-traceable successor), or PE molecules / ABC via QuantiBRITE-style beads. Enter the bead standard's assigned unit value against its measured MFI, fit the curve, then convert any MFI (or a whole column of them) either way. QuantiBRITE PE with a 1:1 PE:antibody conjugate yields antibody binding capacity directly.

1. Bead standard

assigned units vs. measured MFI, ≥ 3 points

Assigned unit values come from the bead lot's certificate of analysis. For QuantiBRITE PE, enter PE molecules per bead. The log-log model is standard for QuantiBRITE (log10 PE/bead vs. log10 geometric-mean fluorescence).

PopulationAssigned unitsMFI

2. Convert

Fit a curve first.
Fit a curve first.

Compute percent-positive and summary statistics (median / MFI, geometric mean, arithmetic mean, robust SD) from event-level single-cell data. Paste a CSV or numeric column, or push a channel over from a parsed FCS file (FCS import tab). Set a gate threshold manually, or derive it from a negative-control column as median + k×rSD.

Stain index and separation index quantify how cleanly a positive population separates from background, the standard metric for titrating antibodies and comparing fluorochrome brightness. Stain index = (MFIpos − MFIneg) / (2 × SDneg). The separation index uses the robust SD of the negative population instead, which is more resistant to outliers and the definition used by FCS Express. Compute from raw event data, or from summary statistics you already have.

Spillover compensation. Enter the spillover matrix as percentages. Row i, column j is the fraction of fluorochrome i's signal that appears in detector j. The diagonal is fixed at 100%. Compensation inverts this matrix and applies it to measured values: corrected = measured × spillover−1. Enter one or more measured event/MFI vectors below to get compensated values.

Parse an FCS 3.0 / 3.1 list-mode file entirely in your browser: read the TEXT segment keywords, list the parameters, and decode the event matrix (32-bit float, 64-bit double, or fixed-width integer data types). Once loaded, any channel can be pushed to the Gating tab. Nothing is uploaded; the file is read locally with FileReader.

No file loaded.

Methodology: equations & references

1. Calibration curve fit

For each calibration date, ordinary least squares is fit on raw values (linear model) and on log10-transformed values (log-log model); whichever fit has the higher R² is kept, unless a specific model is forced. Implemented as explicit summations, not a stats library, so every step is auditable.

Linear model: units = a·MFI + b Log-log model: log10(units) = a·log10(MFI) + b => units = 10^(a·log10(MFI) + b) Ordinary least squares (both models fit this way, x/y substituted accordingly): mean_x = (1/n) * sum(x_i) mean_y = (1/n) * sum(y_i) a (slope) = sum((x_i - mean_x)(y_i - mean_y)) / sum((x_i - mean_x)^2) b (intercept) = mean_y - a * mean_x R^2 = 1 - [ sum((y_i - y_pred_i)^2) / sum((y_i - mean_y)^2) ] Minimum 3 bead populations (kits typically ship 4-6). R^2 below 0.95 is flagged as noisier than kit manufacturers typically expect.

2. Antibody binding capacity (ABC) & standardized units

units_target = curve applied to target-antibody MFI units_isotype = curve applied to isotype-control MFI Net receptors per cell = (units_target - units_isotype) / (F/P) MESF = molecules of equivalent soluble fluorochrome (bead standard). ERF = equivalent reference fluorophores (NIST-traceable successor to MESF). PE molecules -> ABC: with a 1:1 PE:antibody conjugate (F/P = 1) and 1:1 antibody:antigen binding, PE molecules per cell equals antibody binding capacity. Background subtraction of the isotype control is what makes the number a receptor count rather than a raw fluorescence readout.

3. Gating, %positive, and summary statistics

%positive = 100 * (events above gate threshold) / (total events) MFI = median of the channel (median is the standard "MFI" in flow) geo mean = exp( mean( ln(x) ) ) over positive values robust SD (rSD) = ( P84.13 - P15.87 ) / 2 (robust analogue of SD) Negative-control gate = median_neg + k * rSD_neg (default k = 2)

4. Stain & separation index

Stain index = (MFI_pos - MFI_neg) / (2 * SD_neg) Separation index = (MFI_pos - MFI_neg) / (2 * rSD_neg) (robust SD variant)

5. Compensation

Spillover matrix S: S[i][j] = fraction of fluorochrome i seen in detector j, diagonal S[i][i] = 1. Measured (row vector) = True * S. Compensated True = Measured * S^(-1) (S inverted by Gauss-Jordan elimination).

6. Subtype comparison

Mean calibrated receptors/cell is averaged per cell line, then per subtype (BL1/BL2/M/LAR, Lehmann classification). Subtypes are ranked low-to-high on the protein side and compared against the same ranking on the RNA side (TCGA medians from biomarker_pipeline.py). Cell lines not in the lookup table, and measurement rows without a calibration curve for their date, are excluded and flagged rather than silently dropped or approximated.

References

  1. Gratama JW, D'hautcourt JL, Mandy F, et al. Flow cytometric quantitation of immunofluorescence intensity: problems and perspectives. European Working Group on Clinical Cell Analysis. Cytometry. 1998;33(2):166-78. DOI. General ABC/MESF calibration-bead framework.
  2. Wang L, Gaigalas AK, Marti G, et al. Formalization of the MESF unit of fluorescence intensity. Cytometry B Clin Cytom. 2005;68(1):45-52. DOI. Definition of the MESF unit.
  3. Wang L, Gaigalas AK. Development of multicolor flow cytometry calibration standards: assignment of equivalent reference fluorophores (ERF) unit. J Res Natl Inst Stand Technol. 2011. PMC4550335. NIST ERF unit, successor to MESF.
  4. Pannu KK, Joe ET, Iyer SB. Performance evaluation of QuantiBRITE phycoerythrin beads. Cytometry. 2001;45(4):250-8. PMID 11746094. QuantiBRITE PE log-log calibration and PE-to-ABC conversion.
  5. Maecker HT, Trotter J. Flow cytometry controls, instrument setup, and the determination of positivity. Cytometry A. 2006;69(9):1037-42. DOI. FMO gating and the stain-index concept.
  6. Roederer M. Spectral compensation for flow cytometry: visualization artifacts, limitations, and caveats. Cytometry. 2001;45(3):194-205. PMID 11746088. Spillover-matrix inversion and compensation.
  7. Spidlen J, Moore W, Parks D, et al. Data File Standard for Flow Cytometry, version FCS 3.1. Cytometry A. 2010;77(1):97-100. DOI. FCS 3.1 file format used by the FCS parser.
  8. Fang Y, Malik M, England SK, Imoukhuede PI. Absolute Quantification of Plasma Membrane Receptors Via Quantitative Flow Cytometry. Methods Mol Biol. 2022;2475:61-77. DOI. qFlow protocol for RTKs/GPCRs, PE-based absolute quantification.
  9. Lehmann BD, Bauer JA, Chen X, et al. Identification of human triple-negative breast cancer subtypes and preclinical models for selection of targeted therapies. J Clin Invest. 2011;121(7):2750-67. PMID 21633166. Cell-line-to-subtype lookup table.
  10. Espinosa Fernandez JR, Eckhardt BL, Lee J, et al. Identification of triple-negative breast cancer cell lines classified under the same molecular subtype using different molecular characterization techniques. PLoS One. 2020;15(4):e0231953. PMID 32353087. Cross-check of the same cell lines; source of the "stable" flag.