Kinetics Kalculator
Kinetics Kalculator is a Python package designed for analyzing biochemical kinetics data. It provides tools for loading experimental data, calculating reaction rates, adjusting for background activity, and visualizing results using various plots. This package is particularly useful for experiments involving enzyme kinetics and Michaelis-Menten analysis.
For the sphinx-compiled documentation, see here.
Installation
You can install Kinetics Kalculator from PyPI using pip:
pip install kinetics-kalculator
Alternatively, you can install it in editable mode if you're working with the source code:
git clone https://github.com/yourusername/kinetics-kalculator.git
cd kinetics-kalculator
pip install -e .
Usage
Below is a an illustrative example of how to use KineticsKalculator. This example demonstrates how to load data, label conditions, convert measurements, calculate rates, and visualize results.
For more details and a worked example, see the examples folder.
Example Workflow
import pandas as pd
from pathlib import Path
from kinetics_kalculator.kinetics_kalculator import KineticsKalculator
# Define paths to your data files
kinetics_data_path = Path("examples/EX_kinetics_data.csv")
standard_curves_path = Path("examples/EX_standard_curves.json")
# Load standard curves into a dictionary
all_standard_curves = pd.read_json(standard_curves_path, typ="series").to_dict()
experiment_specific_standard_curve = all_standard_curves[21062324]["mscarlett"]
# Initialize the KineticsKalculator
kalculator = KineticsKalculator(
data_path=kinetics_data_path,
standard_curve_parameters=experiment_specific_standard_curve,
)
# Label replicates and conditions
kalculator.label_replicates_and_conditions(
condition_columns=["substrate_concentration", "enzyme_concentration"]
)
# Convert "value" column to concentration using the standard curve
kalculator.convert_values_to_concentration_with_standard_curve()
# Visualize concentration vs. time for different conditions
kalculator.plot_concentration_vs_time_for_each_condition()
# Subset data to a specific time range
kalculator.subset_dataframe_to_time_range(100, 400)
# Calculate rates of change
kalculator.calculate_rates(
time_column="time",
value_column="value",
group_by_columns=["condition"],
print_fit_summary=True,
)
# Adjust rates for background activity
kalculator.adjust_rates_for_background(
rate_column="rate",
sample_type_column="sample_type",
negative_control="negative_control",
)
# Plot Michaelis-Menten curve
kalculator.plot_michaelis_menten_curve()
Output graph examples:
Data Dictionary
The KineticsKalculator relies on a dataframe to perform calculations. The required columns are below; any of the "generated" columns may also be pre-populated.
Input DataFrame (Required)
| Name | Type | Required | Description |
|---|---|---|---|
| time | float | Yes | The time at which each measurement was taken. Can be any unit. |
| value | float | Yes | The measured value (e.g., absorbance) that will be converted to concentration. Can be any unit. |
| well | string | Yes | Identifier for the well or sample location in the experimental setup. |
| substrate_concentration | float | Yes | Concentration of the substrate used in the experiment (units: molarity) |
| enzyme_concentration | float | Yes | Concentration of the enzyme used in the experiment (units: molarity) |
| sample_type | string | Yes | Type of sample, such as "negative_control", or "sample". |
Additional Columns (Generated)
| Name | Type | Description |
|---|---|---|
| condition | string | Generated experimental condition description, typically a combination of substrate and enzyme concentrations. |
| rate | float | Calculated rate of change for each condition. |
| intercept | float | Intercept from the linear fit used to calculate the rate. |
| r_value | float | Correlation coefficient from the linear fit. |
| p_value | float | P-value from the hypothesis test for the linear fit slope. |
| std_err | float | Standard error of the estimated gradient. |
| rate_minus_background | float | Rate measurment with background activity removed. Used to calculate final kinetic constants. |
Metadata
Release files for kinetics_kalculator 0.1.0
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 | |
|---|---|---|---|---|
| kinetics_kalculator-0.1.0.tar.gz | 1.8 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kinetics_kalculator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.8 MB
Release files / kinetics_kalculator-0.1.0.tar.gz
| Download URL | kinetics_kalculator-0.1.0.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1059b3259d6e7775a54283d290ac33c804b16dfe3720cbae8801b3c4d8f3c11b
|
|
BLAKE2b-256 checksum How to use checksums |
4018fb9b800ae019e50fef625b6dfe9d4c4f0bb454673b1da829ed23d753d0b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / kinetics_kalculator-0.1.0-py3-none-any.whl
| Download URL | kinetics_kalculator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51af4ae59d4b4f8f82cc4132d8fe9559d678055782819882036c1e2364aad3bf
|
|
BLAKE2b-256 checksum How to use checksums |
7f005558238c7342dc8b43231008ae49e24fbaabff9fcbb49dbf4bb6c79d276d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Security for kinetics_kalculator 0.1.0
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.