pyKinGenie
Fit binding kinetics from SPR, BLI, and solution traces. pyKinGenie imports sensorgrams, aligns and plots traces, and estimates binding rates and affinities across concentrations.
Install
python -m pip install pykingenie
To run the examples below, clone this repository and run python -m pip install -e . from the checkout with Python 3.11 or newer. For development tools, use uv sync --extra dev. Installation guide
Input files
Pass a path or a list of companion files for one experiment to KineticsAnalyzer.load(). It chooses the reader from the file contents. Use detect_file_format(path) to check what a file is recognized as.
| Input | Files and metadata to supply | Example |
|---|---|---|
| Octet BLI | The .frd files for one run. Add the optional .fmf file for plate information. |
Sensor file, plate file, workflow |
| Gator BLI | A run ZIP or Setting.ini, ExperimentStep.ini, and the Assay_*_Channel*.csv files. A ZIP extracts next to itself. |
Run ZIP |
| Biacore native | One .blr result file. The reader uses its recorded cycles, injection events, and concentrations. |
Result file, workflow |
| Paired-column SPR text | One TXT, CSV, or TSV file with matching _X time and _Y response columns for each curve. Add injection timings and concentrations as described below. |
Biacore T200, Run/Ch/Cy |
| Carterra SPR text | One CSV with a row per curve in Label, X1, Y1, X2, Y2, … format. Export the sensorgram worksheet as CSV and add timings and concentrations. |
Carterra notebook |
| Generic surface steps and traces | Two files. The steps table has a duration in seconds (Step Time) and a type (Step Type Name) per row. The traces table starts with X Values and has one response column per sensor. Supply Concentration in the steps table or concentrations= in µM for the association steps. |
Steps, traces |
| KinGenie surface CSV | One table with Time, Signal, Smax, and Analyte_concentration_micromolar_constant. Add Cycle for single-cycle data. |
Surface CSV |
| KinGenie solution CSV | One table in column order Time, Signal, Protein_concentration_micromolar, Ligand_concentration_micromolar. For a plain time-and-signal table, use KinGenieCsvSolution.read_csv() directly. |
Solution CSV |
Delimited readers detect commas, semicolons, and tabs. The two SPR text readers also accept .gz files and detect decimal commas. Use standard CSV quotes around decimal-comma values in comma-separated files. Other readers expect decimal points.
Timing and concentrations for SPR text
- Pass
association_endandassociation_start(default 0). Boundaries are in seconds, including withtime_unit="min". Setconcentrationsas a list in file order or a mapping by curve label. Values are in µM unless you setconcentration_unit. Labels with a molarconc=value can supply the concentration. - Pass a TitrationAnalysis Data Info Sheet (
.xlsx, CSV, or TSV) asinfo=to supply timing, concentrations, and sample IDs. Explicit arguments take precedence. Carterra also acceptstop_concentrationanddilution_factor, withhighest_last=Falseif the highest concentration is first. - For independent paired-column curves, timings can be shared or provided per curve. For a titration without regeneration, use
single_cycle=True, give one start, end, and concentration per injection, and assign each curve its ownsample_id. Carterra uses one timing window for all rows and requires acquisition order andcycle_durationfor a single-cycle run. SPR fit examples
Fit a surface experiment
This example uses the bundled single-cycle simulation. For experimental data, review the selected curves and concentrations and apply any alignment or reference subtraction before generating fits. Octet preprocessing example
from pykingenie import KineticsAnalyzer, plot_association_dissociation
analysis = KineticsAnalyzer()
analysis.load("test_files/single_cycle_kingenie.csv")
analysis.merge_ligand_conc_df()
analysis.generate_fittings(analysis.combined_ligand_conc_df)
fitted, failed = analysis.submit_kinetics_fitting(shared_smax=True)
if failed:
raise RuntimeError("A surface fit failed.")
print(fitted[0].fit_params_kinetics)
plot_association_dissociation(analysis).show()
The default fit is 1:1. Use fitting_model to select mass transport, induced fit, two-site binding with optional cooperativity, heterogeneous ligand, or bivalent analyte. Use trim_time in generate_fittings() to leave the first seconds of each phase out of the fit. Analyzer API source · Model examples · Benchmarks
Fit a solution experiment
from pykingenie import KineticsAnalyzer
analysis = KineticsAnalyzer()
analysis.load("test_files/kingenie_solution.csv")
analysis.merge_conc_df_solution()
analysis.generate_fittings_solution(analysis.combined_conc_df)
analysis.submit_fitting_solution("one_binding_site")
print(next(iter(analysis.fittings.values())).fit_params_kinetics)
Solution fits also support single and double exponentials, induced fit, and conformational selection.
Results and examples
- Fitters keep results in memory by model and settings. Use
fit_resultsto inspect them,save_fit_result()for a named snapshot, andrestore_fit_result()to restore one. Usecompare_saved_fits()for reduced χ² and BIC on the same observations. Fitter API source - Use the top-level Plotly functions or the alternative Reflex XY plotting notebook.
- See the advanced Carterra fit for shared surface capacity and leave-one-out sensitivity, and SPR parser validation for import comparisons.
Contributing
Questions and contributions are welcome at oburastero@gmail.com. If you use pyKinGenie, please cite Burastero (2026).
AI assistants may help with documentation, boilerplate tests, plotting, and file handling. Mark files that contain AI-generated code. A person must write, or review, understand, and validate, changes that affect numerical results before merge. This includes models, fitting, preprocessing, and parameter interpretation. Validate against simulations with known parameters or validated datasets, and inspect AI-assisted preprocessing and fits before reporting estimates.
Released under the MIT License. See the third-party notices for sample data and other included materials.
Metadata
Release files for pykingenie 1.0.22
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pykingenie-1.0.22.tar.gz | 299.2 kB | Without provenance | Details for pykingenie-1.0.22.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pykingenie-1.0.22-py3-none-any.whl | Python 3 | none | any | Details for pykingenie-1.0.22-py3-none-any.whl |
Total release size: 478.3 kB
Release files / pykingenie-1.0.22.tar.gz
| Download URL | pykingenie-1.0.22.tar.gz |
|---|---|
| Size | 299.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e7bb7de068b39519ad319b18db430e6e36aa82d9466e277b66afd339d2034c6
|
|
BLAKE2b-256 checksum How to use checksums |
0c097e9ad4aa7fde449ea6a5bde0b568dbdfa1301956b5cededaa53fbce44bb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / pykingenie-1.0.22-py3-none-any.whl
| Download URL | pykingenie-1.0.22-py3-none-any.whl |
|---|---|
| Size | 179.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
440d075148c5c6f0a098e2bccc10febfb597b4e4255e3dd206f709672f73ec92
|
|
BLAKE2b-256 checksum How to use checksums |
f3cbf1abd7f0c8d366c6816b5ed2c1a980b758ad3a4be6da3a85493af9db1f18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for pykingenie 1.0.22
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.