Skip to main content

No project description provided

Project description

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:

example concentration vs. time graph example concentration vs. time graph

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kinetics_kalculator-0.1.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kinetics_kalculator-0.1.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file kinetics_kalculator-0.1.0.tar.gz.

File metadata

  • Download URL: kinetics_kalculator-0.1.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for kinetics_kalculator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1059b3259d6e7775a54283d290ac33c804b16dfe3720cbae8801b3c4d8f3c11b
MD5 ffa8fc786e792e07ff49e80562f00645
BLAKE2b-256 4018fb9b800ae019e50fef625b6dfe9d4c4f0bb454673b1da829ed23d753d0b3

See more details on using hashes here.

File details

Details for the file kinetics_kalculator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kinetics_kalculator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51af4ae59d4b4f8f82cc4132d8fe9559d678055782819882036c1e2364aad3bf
MD5 acbf451a2698f102a2a2d17254c9bf16
BLAKE2b-256 7f005558238c7342dc8b43231008ae49e24fbaabff9fcbb49dbf4bb6c79d276d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page