High-resolution mass spectrometry: the QC drifts to 3.84 ppm, the samples after it know
Goal Read the QC export of an LC-HRMS screening without losing a decimal, and flag every sample acquired after a QC outside its mass tolerance.
An environmental laboratory screens micropollutants in water on an Orbitrap. The transients and spectra stay on the instrument; lumnik reads what the processing software exports.
a key;value block, a header over two lines, n.d. and < LOD in the intensity column;
every m/z kept with its five decimals;
the air conditioning fails: the QC reads 3.84 ppm, the four samples after it raise a decision.
apiVersion: apps.lumnik.io/v1kind: Processmetadata:name: scenario-hrms-qc-aspec:scope: qc-hrms-aon: { event: data.row.changed, table: connector.t_scenario_hrms_a }when: - type=Sample - inj>0 # the injection's first line: one decision per sample, not per compound - qc_max_ppm>3 # the QC acceptance: |Δm| <= 3.0 ppm on every calibrant ionemit:type: decision.after-failed-qc-amessage: "{sample} (injection {inj}): the QC before it reads {qc_max_ppm} ppm, acceptance 3.0 ppm"key: sample
$ lm process apply -f manifests/20-after-a-failed-qc.yamlApplied process "scenario-hrms-qc-a" → table connector.t_scenario_hrms_a, emits decision.after-failed-qc-a
apply
Applied process "scenario-hrms-qc-a" → table connector.t_scenario_hrms_a, emits decision.after-failed-qc-a
$ lm connector run scenario-hrms-arun scheduled: 97d08501-09b6-4476-8e71-2227be9f201a$ lm run get 97d08501-09b6-4476-8e71-2227be9f201aID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
97d08501 scenario-hrms-a default Completed 75 68 7 0 2026-11-07 02:06 2026-11-07 02:06 yes• 1 file(s) unchanged since they were last read — not read again$ lm inbox --process scenario-hrms-qc-aID WHEN PROCESS MESSAGE ENTITY_KEY
25178 just now scenario-hrms-qc-a W-26-0422 (injection 12): the QC before it reads 3.84 ppm, acceptance 3.0 ppm W-26-0422
25177 just now scenario-hrms-qc-a W-26-0421 (injection 11): the QC before it reads 3.84 ppm, acceptance 3.0 ppm W-26-0421
25176 just now scenario-hrms-qc-a W-26-0420 (injection 10): the QC before it reads 3.84 ppm, acceptance 3.0 ppm W-26-0420
25175 just now scenario-hrms-qc-a W-26-0419 (injection 9): the QC before it reads 3.84 ppm, acceptance 3.0 ppm W-26-0419
default
Completed · IN 75 · OUT 68 · SKIPPED 7 · DEAD-LETTERS 0
hub
1 | QC | QC-SST | 13:30 | 0.35 | 0.35
hub
2 | Sample | W-26-0413 | 13:48 | 0.35 | 0.89
hub
3 | Sample | W-26-0414 | 14:06 | 0.35 | 0.61
hub
4 | Sample | W-26-0415 | 14:24 | 0.35 | 0.74
hub
5 | Sample | W-26-0416 | 14:42 | 0.35 | 1.38
hub
6 | Sample | W-26-0417 | 15:00 | 0.35 | 2.57
hub
7 | Sample | W-26-0418 | 15:18 | 0.35 | 3.29
hub
8 | QC | QC-SST | 15:36 | 3.84 | 3.84
hub
9 | Sample | W-26-0419 | 15:54 | 3.84 | 3.75
hub
10 | Sample | W-26-0420 | 16:12 | 3.84 | 4.10
hub
11 | Sample | W-26-0421 | 16:30 | 3.84 | 3.23
hub
12 | Sample | W-26-0422 | 16:48 | 3.84 | 4.17
hub
13 | Cal | Recalibration | 17:06 | | 0.12
hub
14 | Sample | W-26-0423 | 17:24 | | 0.79
hub
15 | Sample | W-26-0424 | 17:42 | | 0.56
hub
16 | QC | QC-SST | 18:00 | 0.25 | 0.25
hub
17 | Sample | W-26-0425 | 18:18 | 0.25 | 0.79
hub
18 | Sample | W-26-0426 | 18:36 | 0.25 | 0.70
W-26-0419
W-26-0419 (injection 9): the QC before it reads 3.84 ppm, acceptance 3.0 ppm
W-26-0420
W-26-0420 (injection 10): the QC before it reads 3.84 ppm, acceptance 3.0 ppm
W-26-0421
W-26-0421 (injection 11): the QC before it reads 3.84 ppm, acceptance 3.0 ppm
W-26-0422
W-26-0422 (injection 12): the QC before it reads 3.84 ppm, acceptance 3.0 ppm
The rule reads the preceding QC, not the bracket: W-26-0417 and 0418, acquired before the failed QC while the drift built up, reach 2.6 and 3.3 ppm and are not flagged.
A sample acquired after a recalibration and before the next QC is covered by no QC; the page shows it, no decision says it.
Only the mass error is judged. The QC's resolving power and intensity are read; no rule judges them here.
A lost identification caused by the drift (a false n.d.) is not detected: the decision only says not to trust the sample.
Samples, intensities and drift synthetic; the theoretical masses are exact.
Laboratory · HRMS
A QC standard between each series of samples.
Caffeine, MRFA, reserpine: their mass error tells whether the samples after them can be trusted.
195.08765 · 524.26496 · 609.28066
The problem
The QC reads 3.84 ppm. The batch goes on.
The tolerance is 3.0 ppm.
Four samples are acquired after it, as if nothing happened.