Write the plate analysis program of a university kinetics core for a protease inhibitor campaign (inhibition mechanism, Km, kcat and Ki from fluorogenic progress curves, with the plate map, reagent and instrument records applied); it is run on further plates with known constants.
harbor run -t reactive-labs/enzyme-inhibitionharbor download reactive-labs/enzyme-inhibitionYou are Lena Moreau, a postdoc in Funmi Adeyemi's group at Mardale University. The group's TrsP resistance panel (project ADEY-TRSP-2026) is measured by the Protein Biochemistry and Kinetics Core (PBKC) on its SP-4 plate reader under SOP-KIN-007. Each plate tests one compound against one TrsP variant with the fluorogenic substrate Ac-LTFK-AMC. Today is Monday 1 June 2026, and Funmi wrote this morning:
What I need is one program that takes a plate folder exactly as the core exports it (the reader file and the LIMS run sheet) and gives back the mechanism, Km, kcat and the Ki values for that plate, done the way SOP-KIN-007 says. Sam will run it on every plate of the campaign, including the ones still in the LIMS queue from the second half of May, and compare it with the values the core has worked out for those plates before we accept it. So it has to cope with whatever the reader and the bench threw at us between February and the end of May, not only with the 34 plates you have. Please send me the results for those as well.
In /app/inputs:
plates/: the 34 plates exported so far, one folder per plate (KP-nnnn/). Each folder holds the reader
export KP-nnnn_kinetic.txt and the LIMS run sheet KP-nnnn_runsheet.txt with the plate map.reagents/: enzyme prep batches, AMC standard stock QC and memo, substrate lots.campaign/: the variant panel and the compound list.docs/: SOP-KIN-007 rev C, validation report VR-KIN-007-02, the reader's logbook export, and mails.previous_analyst/: the script that has been used so far./app/output/analyze.py, run as
python3 /app/output/analyze.py <plate_dir> <out.json>
It reads one plate folder in the format of those in hand and writes one JSON object:
{"plate_id": "KP-0500", "mechanism": "competitive", "km_uM": 27.0, "kcat_per_s": 1.9,
"kic_uM": 0.85, "kiu_uM": null}
| Key | Content |
|---|---|
plate_id |
plate ID from the run sheet (not scored) |
mechanism |
one of none, competitive, uncompetitive, noncompetitive, mixed, as defined in SOP-KIN-007 section 2 |
km_uM |
Michaelis constant of the variant, µM, at 30.0 °C |
kcat_per_s |
turnover number per active site, s⁻¹, at 30.0 °C |
kic_uM |
inhibition constant for the free enzyme, µM; null where the mechanism has none (uncompetitive, none) |
kiu_uM |
inhibition constant for the enzyme-substrate complex, µM; null where the mechanism has none (competitive, none). For noncompetitive give the one constant in both keys. |
The program runs with Python 3.12, numpy, scipy and pandas, on one CPU core with 3 GB of memory and no
network, and must finish a plate within 60 seconds. It is run as another user from a copy of
/app/output: it may load helper files that you put in /app/output (found relative to __file__), but
/app/inputs is not there when it runs.
/app/output/results.csv with one row per plate in hand and the columns
plate_id,mechanism,km_uM,kcat_per_s,kic_uM,kiu_uM (empty cell for a constant that does not apply).
The core runs your program on 40 further plates from the same reader, assay and campaign, run between
February and the end of May 2026 and exported in the same way, whose constants and mechanisms are known. They
include variants and compounds that are not among your 34 plates. The plates in hand have known values too, and
results.csv is compared in the same way.
Each plate is scored out of 1:
| Part | Weight | Credit |
|---|---|---|
| mechanism | 0.10 | exact match |
| Ki | 0.25 | only when the mechanism is right: relative error of the constants that the mechanism has (kic_uM for competitive, kiu_uM for uncompetitive, both for noncompetitive and mixed, averaged); for a correct none, the mean of the Km and kcat credits of that plate |
| Km | 0.20 | relative error |
| kcat | 0.45 | relative error |
A relative error earns full credit up to the tolerance (Km 12 %, kcat 7 %, each Ki 20 %; for mixed, the larger
of the two true constants 35 %) and falls linearly to zero at three times the tolerance. When the mechanism is
wrong, the Km and kcat parts count half. A plate
scores zero if the program fails, runs out of time or writes no readable JSON, or if the mechanism is missing
or not one of the five values, or km_uM or kcat_per_s is missing or not a positive finite number. A
missing or null Ki that the mechanism needs loses only its own part. The 40 further plates must be done within
1200 seconds in total; plates not reached by then score zero.
The final score is 80 % the mean over the 40 further plates and 20 % the mean over the 34 plates in
results.csv (a plate missing from the file scores zero).